Making animations from VTK

We start with a simple program which generates the frames. I wrote a program which uses some vtkSphereSources to show pretty illumination patterns on a shiny sphere. One of the frames is shown above.

Here is the program ballanim.tcl in HTML or as the straight TCL. There are lots of comments explaining what's going on. Hopefully, it will be clear how to adapt this program to vary the parameters that matter for your application. Running this program generates a number of image files in PPM format. These will be used as the basis of the animations.

On the PC, its very very easy to make two kinds of animations, and below I show how to make MPEGs and animated GIFS. Obviously, if you've generated frames on the UNIX side of the world, you have to transfer them over to a PC. Put all the frames into one directory.


Making an MPEG animation

The 2xCDROM setting produced ball1.mpg (1.8 megs), and the 4xCDROM setting produced ball2.mpg (2.0 megs).

Making an animated GIF

MPEGS are a good format for scientific animations, because their color palette is not limited to 8-bits, as GIFs are. Animated GIFs are fun to put on web pages, or for very simple animations which only require a few frames. Here is the result I produced, shrinking the frame size down to 64 by 64, and choosing a 1/100 second delay between frames:

Other URLS: