mathematica 9用动画来演示产生旋转曲面的过程不能运行m = 20;For[i = 0,i 1,AxesLabel -> {"X","Y","Z"},PlotPoints -> 30]]
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/23 17:29:43
mathematica 9用动画来演示产生旋转曲面的过程不能运行m = 20;For[i = 0,i 1,AxesLabel -> {"X","Y","Z"},PlotPoints -> 30]]
mathematica 9用动画来演示产生旋转曲面的过程不能运行
m = 20;
For[i = 0,i 1,AxesLabel -> {"X","Y","Z"},
PlotPoints -> 30]]
mathematica 9用动画来演示产生旋转曲面的过程不能运行m = 20;For[i = 0,i 1,AxesLabel -> {"X","Y","Z"},PlotPoints -> 30]]
……谁告诉你可以用这个方法来演示动画的?而且你的变量又没和图形的自变量相关联,怎么可能动?起码也这样吧?:
Animate[ParametricPlot3D[{Sin[z]*Cos[u], Sin[z]*Sin[u], z}, {z, 0, Pi}, {u, 0, i}, AspectRatio -> 1, AxesLabel -> {"X", "Y", "Z"}, PlotPoints -> 30], {i, 0, 2 Pi}]
————————
我明白了,你所看的大概是基于版本5甚至更早的版本的入门书吧?我想起来了.之前听人提过,在版本6之前,Mathematica的动态交互功能较弱,那时候的确存在一种使用For循环的制作动态图像的功能,但是那个方法在如今的版本里面已经行不通了.
如今如果想使用For循环来实现动态图功能,也不是不行,但是,就得这样:
i = 0; m = 80;
Dynamic@ParametricPlot3D[{Sin[z]*Cos[u], Sin[z]*Sin[u], z}, {z, 0, Pi}, {u, 0, i/m 2 Pi}, AspectRatio -> 1, AxesLabel -> {"X", "Y", "Z"}, PlotPoints -> 30]
For[i = 0, i
Animate[ParametricPlot3D[{Sin[z] Cos[u], Sin[z] Sin[u], z}, {z,
0, \[Pi]}, {u, 0, i}, AspectRatio -> 1,
AxesLabel -> {"X", "Y", "Z"},
PlotRange -> {{-1., 1.}, {-1., 1.}}], {i, 0,...
全部展开
Animate[ParametricPlot3D[{Sin[z] Cos[u], Sin[z] Sin[u], z}, {z,
0, \[Pi]}, {u, 0, i}, AspectRatio -> 1,
AxesLabel -> {"X", "Y", "Z"},
PlotRange -> {{-1., 1.}, {-1., 1.}}], {i, 0, 2 \[Pi]}]
你的For循环没意义,可能你的本意是想让坐标取值逐步增加吧,有点想当然了。用Animate函数,并在选项里加个PlotRange看起来舒服些
收起