Forgot password?
 Create new account
View 1128|Reply 2

Mathematica画球面(阿基米德)螺线

[Copy link]

462

Threads

969

Posts

9934

Credits

Credits
9934

Show all posts

青青子衿 Posted at 2019-2-19 17:53:18 |Read mode
Last edited by 青青子衿 at 2019-3-1 11:06:00
  1. Manipulate[
  2. Show[ContourPlot3D[
  3.    x^2 + y^2 + z^2 == 1, {x, -1.2, 1.2}, {y, -1.2, 1.2}, {z, -1.2, 1.2},
  4.    Mesh -> None,
  5.    ContourStyle -> Directive[Yellow, Opacity[0.5]]],
  6.   ParametricPlot3D[{Sin[t/2], Cos[t/2] Sin[(k t)/2], -Cos[t/2] Cos[(k t)/2]},
  7.    {t, -2 \[Pi], 2 \[Pi]},
  8.    PlotStyle -> {Red, Thickness[0.01]}]], {k, 1, 20, 1}]
Copy the Code
\begin{align*}
\boldsymbol{r}(t)=\left\{\sin\frac{t}{2},\cos\frac{t}{2}\sin\frac{kt}{2},-\cos\frac{t}{2}\cos\frac{kt}{2}\right\}
\end{align*}
Clelia curve
en.wikipedia.org/wiki/Clélie
spherical (Archimedean) spiral

701

Threads

110K

Posts

910K

Credits

Credits
94167
QQ

Show all posts

kuing Posted at 2019-2-19 21:27:16
画球的(ContourPlot3D[...] 这部分)可以用 Graphics3D[{Opacity[0.5], Yellow, Ball[{0, 0, 0}, 1]}] 代替。

701

Threads

110K

Posts

910K

Credits

Credits
94167
QQ

Show all posts

kuing Posted at 2019-2-19 21:51:54
导出gif动图可以这样:
  1. test=Table[Show[Graphics3D[{Opacity[0.5],Yellow,Ball[{0,0,0},1]}],
  2. ParametricPlot3D[{Sin[t/2],Cos[t/2] Sin[(k t)/2],-Cos[t/2] Cos[(k t)/2]},{t,-2Pi,2Pi},PlotStyle->{Red,Thickness[0.01]}]],{k,1,15,0.2}];
  3. Export["test.gif",test]
Copy the Code
运行十几秒后在我的文档里就可以找到 test.gif 这个文件,不过这样生成的 gif 会稍微有点大,而且只循环两次,所以建议用其他工具再优化一下。
6273b251gy1g0c2nh5ryzg20a00avhdt.gif

手机版Mobile version|Leisure Math Forum

2025-4-20 22:00 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list