Re: Two sphers joined by a line and moving on an ellipse! (animation)
- To: mathgroup at smc.vnet.net
- Subject: [mg82747] Re: [mg82701] Two sphers joined by a line and moving on an ellipse! (animation)
- From: "Ricardo Samad" <resamad at gmail.com>
- Date: Tue, 30 Oct 2007 03:32:22 -0500 (EST)
- References: <200710291032.FAA06083@smc.vnet.net>
Hi Mark, you didn=B4t tell what is the animation that you want, so below I send a Manipulate and an animate codes: a = 2; b = 3; r = 0.5; Manipulate[Show[{ ParametricPlot3D[{a Cos[\[Theta]], b Sin[\[Theta]], 0}, {\[Theta], 0, 2 \[Pi]}, PlotRange -> (Max[{a, b}] + r), Axes -> False, Boxed -> False, PlotStyle -> {Thick, Dashed}] , Graphics3D[{ Sphere[{a Cos[\[Theta]1], b Sin[\[Theta]1], 0}, r], Sphere[{a Cos[\[Theta]2], b Sin[\[Theta]2], 0}, r], {Thick, Orange, Line[{{a Cos[\[Theta]1], b Sin[\[Theta]1], 0}, {a Cos[\[Theta]2], b Sin[\[Theta]2], 0}}]} }]}], {\[Theta]1, 0, 2 \[Pi]}, {{\[Theta]2, \[Pi]}, 0, 2 \[Pi]}] Animate[Show[{ ParametricPlot3D[{a Cos[\[Theta]], b Sin[\[Theta]], 0}, {\[Theta], 0, 2 \[Pi]}, PlotRange -> (Max[{a, b}] + r), Axes -> False, Boxed -> False, PlotStyle -> {Thick, Dashed}] , Graphics3D[{ Sphere[{a Cos[\[Theta]1], b Sin[\[Theta]1], 0}, r], Sphere[{a Cos[\[Theta]2], b Sin[\[Theta]2], 0}, r], {Thick, Orange, Line[{{a Cos[\[Theta]1], b Sin[\[Theta]1], 0}, {a Cos[\[Theta]2], b Sin[\[Theta]2], 0}}]} }]}], {\[Theta]1, 0, 2 \[Pi]}, {{\[Theta]2, \[Pi]}, 0, 2 \[Pi]}] Hope this helps. Ricardo On 10/29/07, markmgg at googlemail.com <markmgg at googlemail.com> wrote: > > Hello everybody, > > I'am trying to create an animation of two sphers joined by a line and > moving on an ellipse. > > I have ploted the ellipse as > > Graphics[{Dashed, Circle[{0, 0}, {10, 5}]}] > > and the two sphers joined by a line as > > Graphics3D[{Sphere[{0, 0, 0}, 1], > Sphere[{-5, -1, -1}], {Thick, Orange, > Line[{{0, 0, 0}, {-5, -1, -1}}]}}, Boxed -> False, > ImageSize -> 100] > > after that I could not make any further step! > > I would appreciate any help. > > > thanks, Mark > > > -- ____________________________________ Ricardo Elgul Samad tel: (+55 11) 3133-9372 fax: (+55 11) 3133-9374 Centro de Lasers e Aplica=E7=F5es IPEN/CNEN-SP AV. Prof. Lineu Prestes 2242 Cidade Universit=E1ria 05508-000 S=E3o Paulo - SP Brazil ____________________________________
- References:
- Two sphers joined by a line and moving on an ellipse! (animation)
- From: markmgg@googlemail.com
- Two sphers joined by a line and moving on an ellipse! (animation)