用Mathematica玩转莫比乌斯带

2025-05-17 09:26:43

1、 莫比乌斯带的参数方程是:x=cost(3+r*cos(t/2)),y=sint(3+r*cos(t/2)),z=r*sin(t/2)。其中,r代表的是莫比乌斯带的宽度。 用Mathematica画出图形,可以使用ParametricPlot3D:ParametricPlot3D[{Cos[t] (3 + r Cos[t/2]), Sin[t] (3 + r Cos[t/2]), r Sin[t/2]}, {r, -1, 1}, {t, 0, 2 Pi}

用Mathematica玩转莫比乌斯带

3、 我一直好奇,如果莫比乌斯带很宽,当年Mobius还有可能扭出这个单侧曲面吗?让我们来看看r很大的时候,莫比乌斯带长什么模样!ParametricPlot3D[{Cos[t] (3 + r Cos[t/2]), Sin[t] (3 + r Cos[t/2]), r Sin[t/2]}, {r, -2,2}, {t, 0, 2 Pi}, Axes -> False, Mesh -> None,Boxed -> False 和ParametricPlot3D[{Cos[t] (3 + r Cos[t/2]), Sin[t] (3 + r Cos[t/2]), r Sin[t/2]}, {r, -6,6}, {t, 0, 2 Pi}, Axes -> False,Mesh -> None, Boxed -> False

用Mathematica玩转莫比乌斯带

4、 把上面的过程,变成互动模型:Clear[a];Manipulate[ParametricPlot3D[{Cos[t] (3 + r Cos[t/2]), Sin[t] (3 + r Cos[t/2]), r Sin[t/2]}, {r, -a, a}, {t, 0, 2 Pi}, Axes -> False, Mesh -> None, Boxed -> False], {a, 1, 30} 或者导出为动态图:Export["C:\\Users\\Administrator\\Desktop\\a.gif",Table[ParametricPlot3D[{Cos[t] (3 + r Cos[t/2]), Sin[t] (3 + r Cos[t/2]), r Sin[t/2]}, {r, -a, a}, {t, 0, 2 Pi}, Axes -> False, Mesh -> None, Boxed -> False, ], {a, 1, 30}]

用Mathematica玩转莫比乌斯带

5、 用ColorFunction改变颜色:Manipulate[ParametricPlot3D[{Cos[t] (3 + r Cos[t/2]), Sin[t] (3 + r Cos[t/2]), r Sin[t/2]}, {r, -a, a}, {t, 0, 2 Pi}, Axes -> False, Mesh -> None, Boxed -> False, ColorFunction -> Function[{t, r}, Hue[t]]], {a, 1, 30}]

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