MathGroup Archive 1999

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

Search the Archive

Re: Animation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16603] Re: [mg16553] Animation
  • From: "F. P. Laussy" <laussy at nat.fr>
  • Date: Wed, 17 Mar 1999 23:55:08 -0500
  • References: <199903160900.EAA09522@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

Naum Phleger wrote:
> 
>     I have a 3-D image generated on Mathematica that I would like to rotate
> on a web page.  I am first trying to rotate it with Mathematica but I am
> having trouble with the animation.  I can make a table of objects that I
> want to animate (display in rapid succession).  I load the
> Graphics`Animation` package and then use the ShowAnimation command.  I also
> can express my set of pictures with a parameter t running from 0 to 1 and
> tried using the Animate[plot,{t,0,1}] command.  Neither worked.  Both just
> displayed the pictures one at a time in a list.
>     Does the front end know how to animate?  If so what am I doing wrong?
> If not then where can I view my animation?

The Mathematica Front End should be able to display animations merely
by displaying the many frames you computed and rendered in a rapid
overlapping, on any of the picture of the list. To do this, simply
double click on one item of the list, that will enable animation tools.

Yet this is not my point. As you wish to use your animation for the
web, and because you said you got the table of pictures right, I think
what follows can help you.

The idea is to save the images on disk and to make the job done by
something else than Mathematica (namely, whirlgif, see below).

Let us say your table is the result of evalutation number 999 (this
one will be easy to recognize, and to make it easy). Then your table
is displayed as Out[999]:={-Graphics-, -Graphics-, -Graphics-,
-Graphics-, etc..., with the images in between.

First of all, save the images on your disk. This can be done quickly
with a

Table[ImageName[i]=
    "/home/Naum/webanimation/anim"<>If[i<10,"0",{}]<>
      ToString[i]<>".gif",{i,1,Length[Out[999]]}];

Where you replace /home/Naum/... by what is needed on a Power Mac.

Then do a

Table[Display[ImageName[i],Out[999][[i]],
    "GIF",ImageResolution->$Whateverisgood],{i,1,Length[Out[999]]}]

with your additional options following ImageResolution. Please notice
that if your animation reach a thousand frames, you should correct the
above line for the final output to appear in right order if using the
-i (incremental) option when making the animation.

Finally use Whirlgif (http://www.msg.net/utility/whirlgif/), or any
tool providing likewise services, to compute a gif animated image to
be displayed by a web browser. Something like whirlgif -i anim01.gif
-o animation.gif should readily make the animation 'animation.gif'
available.

F.P.L



  • References:
    • Animation
      • From: "Naum Phleger" <naum@condor.physics.ucsb.edu>
  • Prev by Date: Re: the simplest way?
  • Next by Date: Re: Normalize a vector ????
  • Previous by thread: Animation
  • Next by thread: Re: Animation