数学建模社区-数学中国

标题: 求教动态函数三维图像的合成(大神进) [打印本页]

作者: Fsen09    时间: 2012-7-6 15:05
标题: 求教动态函数三维图像的合成(大神进)
效果大致就是一个大球自转然后一个小点绕大球公转,分别做出两个图像最后不知道怎么合成啊 T.T
1 R5 u1 }1 R* a+ n! A/ v$ }代码如下+ @# Z2 Q9 E$ c* _3 \; @. {/ ~) m
大球自转Animate[ParametricPlot3D[{5 Sin[a] Cos[b + t], 5 Sin[a] Sin[b + t],
* `; d% l9 T" }2 S, L) H# ~   5 Cos[a]}, {a, 0, 2 Pi}, {b, 0, 2 Pi}, Axes -> False,
7 m. e: t- y1 ]4 l# j  Boxed -> False, Mesh -> True, PlotPoints -> 50,
' l$ W5 u/ r# f8 P+ n  Lighting -> True], {t, 0, Pi}]
0 }) p5 c) E0 G4 O& t( ~小球公转Animate[Graphics3D[{PointSize[0.1], Point[{Cos[a], Sin[a], 0}]}, 2 G! ?# a1 q6 o) r2 q
  PlotRange -> {{-1, 1}, {-1, 1}, {-2, 2}}], {a, 0, 2 Pi}]
' j0 v. y5 Y1 \7 N0 x( |只求效果 欢迎大神自己编写代码 本人新人勿喷
作者: sycxyc    时间: 2012-7-7 16:08
修改一下就行了
/ P3 r1 s" X8 ?* LAnimate[Show[{ParametricPlot3D[{5 Sin[a] Cos[b + t],5 Sin[a] Sin[b + t], 5 Cos[a]}, {a, 0, 2 Pi}, {b, 0, 2 Pi},Axes -> False, Boxed -> False,Mesh -> True, PlotPoints -> 50, Lighting -> Automatic, PlotRange -> {{-10, 10}, {-10, 10}, {-5, 5}}],Graphics3D[{PointSize[0.1], Point[{8 Cos[a], 8 Sin[a], 0}]},PlotRange -> {{-10, 10}, {-10, 10}, {-2, 2}}]}],{t, 0, Pi}, {a, 0, 2 Pi}]




欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) Powered by Discuz! X2.5