MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Animate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66997] RE: [mg66956] Animate
  • From: "David Park" <djmp at earthlink.net>
  • Date: Tue, 6 Jun 2006 06:28:26 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

You  have to select the group of 6 graphics cells, close them up, and then
double click on the image to start the animation. Or just double click on
any image without closing them up.

Alternatively, you could attach the following lines of code, which will
automatically do this for you.

Needs["Graphics`Animation`"]

Module[{n}, Animate[Plot[Sin[n x], {x, 0, 2 Pi}], {n, 1, 6, 1}]]
SelectionMove[EvaluationNotebook[], All, GeneratedCell]
FrontEndTokenExecute["OpenCloseGroup"]; Pause[0.5];
FrontEndExecute[{FrontEnd`SelectionAnimate[200, AnimationDisplayTime -> 0.1,
AnimationDirection -> Forward]}]

The 'A' button from the DrawGraphics palette that comes with the
DrawGraphics package, for those who have it, will paste in those lines of
code.

Also, don't forget that you can control the animation with keyboard keys.
1) up/down arrows will advance one frame at a time.
2) left/right arrows will start animation in forward or reverse direction.
3) 'p' will pause or restart the animation.
4) 'c' will put the animation in the ForwardBackward mode.
5) The number keys will control the speed of the animation.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/




From: MR [mailto:marcinrak at gmail.com]
To: mathgroup at smc.vnet.net

Hey everyone

Module[{n}, Animate[Plot[Sin[n x], {x, 0, 2 Pi}], {n, 1, 6, 1}]];

running the above command doesn't yield an animation in one plot, but
much rather six different still plots which appear one beneath the
other.

Any ideas?



  • Prev by Date: Re: Function argument
  • Next by Date: Re: tensors, matrices, and rotation
  • Previous by thread: Re: Animate
  • Next by thread: RE: Animate