用Mathematica处理多点调控曲线

2025-06-29 20:23:14

在《多点调控曲线简介》里面,我们介绍了多点调控曲线的定义,并且用Desmos初步研究了它的一些有趣的性质,读者可以去看一看。 这里,我们要用Mathematica进一步处理多点调控曲线。

用Mathematica处理多点调控曲线

2、 我们为了看图,要把A和B也绘制出来:Show[Graphics[{Red, Point[{A, B}]}],ContourPlot[ 1/Norm[XY - A] + 1/Norm[XY - B] == 6, {x, -1, 1}, {y, -1, 1}, ContourStyle -> XYZColor[1, 0, 1]]]

用Mathematica处理多点调控曲线

4、 如果点B是负调控点,会怎么样呢?Show[Graphics[{Red, Point[A], Green, Point[B]}],ContourPlot[ 1/Norm[XY - A] - 1/Norm[XY - B] == 6, {x, -1, 1}, {y, -1, 1}]]

用Mathematica处理多点调控曲线用Mathematica处理多点调控曲线

2、 互动效果:Manipulate[Show[Graphics[{Red, Point[A], Green, Point[B], Blue, Point[G]}], ContourPlot[ 1/Norm[XY - A] + 1/Norm[XY - B] + 1/Norm[XY - G] == a, {x, -1, 2}, {y, -1, 2}], ImageSize -> {500, 500}], {a, 2.3, 10, 0.1}]

用Mathematica处理多点调控曲线用Mathematica处理多点调控曲线

4、 把A、B、G变成定位器,便于移动A、B、G的相对位置(在移动的过程中,坐标也发生变化)。Manipu造婷用痃late[XY = {x, y};ContourPlot[ 1/Norm[XY - A] + 1/Norm[XY - B] + 1/Norm[XY - G] == a, {x, -1, 2}, {y, -1, 2}],{{A, {0, 0}}, Locator, Appearance -> "A"},{{B, {1/2, 1/3}}, Locator, Appearance -> "B"},{{G, {1/3, 1}}, Locator, Appearance -> "G"},{a,2.3, 10, 0.1}] 和Manipulate[XY = {x, y};ContourPlot[ 1/Norm[XY - A] + 1/Norm[XY - B] - 1/Norm[XY - G] == a, {x, -1, 2}, {y, -1, 2}], {{A, {0, 0}}, Locator, Appearance -> "A"}, {{B, {1/2, 1/3}}, Locator, Appearance -> "B"}, {{G, {1/3, 1}}, Locator, Appearance -> "G"}, {a, 2.3, 10, 0.1}]

用Mathematica处理多点调控曲线

其他情形

1、 我们尝试着用Mathematica的定位器来演示更多调控点的调控曲线,并试图说明,正负调控点分别位于曲线的内部和外部。 四个调控点,两正两负:Manipulate[XY = {x, y};ContourPlot[ 1/Norm[XY - A] + 1/Norm[XY - B] - 1/Norm[XY - c] - 1/Norm[XY - G] ==a, {x, -1, 2}, {y, -1, 2}],{{A, {0, 0}}, Locator, Appearance -> "A"},{{B, {1/2, 1/3}}, Locator, Appearance -> "B"},{{c, {1, 1/5}}, Locator, Appearance -> "C"},{{G, {1/3, 1}}, Locator, Appearance -> "G"}, {a,0.5, 2, 0.1}]

用Mathematica处理多点调控曲线

3、 三正三负的六点调控曲线:Manipulate[XY = {x巳呀屋饔, y};ContourPlot[ 1/Norm[XY - A] + 1/Norm[XY - B] + 1/Norm[X鳔柩寞泷Y - c] - 1/Norm[XY - d] - 1/Norm[XY - e] - 1/Norm[XY - G] == a, {x, -1, 2}, {y, -1, 2}], {{A, {0, 0}}, Locator, Appearance -> "A"}, {{B, {1/2, 1/3}}, Locator, Appearance -> "B"}, {{c, {1, 1/5}}, Locator, Appearance -> "C"}, {{d, {1, 1/2}}, Locator, Appearance -> "D"}, {{e, {1, 1}}, Locator, Appearance -> "E"}, {{G, {1/3, 1}}, Locator, Appearance -> "G"}, {a, 1.5, 2, 0.1}]

用Mathematica处理多点调控曲线
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢