Personal tools
You are here: Home Documentation Users Guide 5. Animations & Gif Images 5.1 OVERVIEW
Document Actions

5.1 OVERVIEW

There are two modes for animating in Ferret. One can animate "on the fly" in an interactive sesion, or a sequence of Ferret plots can be stored and then animated. For stored sequences of plots, each plot is stored as one frame in a movie file. Ferret stores movie frames in Hierarchical Data Format (HDF), a format designed by the National Center for Supercomputing Applications (NCSA). A movie file can then be displayed as an animated sequence of frames with NCSA's xds—X Data Slice (not distributed with Ferret; see the section in this chapter "Displaying an HDF movie", for details). A series of gif images can also be animated, see Ch5 Sec1.2 below.


5.1.1 Animating on the fly

In a Ferret session, display an animation with the command,

yes? REPEAT/ANIMATE[/LOOP=n]

to start an animation sequence. Given LOOP=n, the entire animation sequence will repeat n times.

Example:

yes? set data coads_climatology
yes? repeat/l=1:12/animate/loop=5 (shade sst; go fland)

NOTE: In order to properly display, it is necessary to have backing store enabled for the Xserver.


5.1.2 Note on using whirlgif to make a movie

The following sections detail making movies with HDF, but another method has been brought to our attention. An easy way to make movies from gif files generated by Ferret is a public domain utility called whirlgif. The documentation for whirlgif indicates that it is available for a variety of systems. 

In addition we have had reports that gifsicle, http://www.lcdf.org/gifsicle/ is another unix-based tool that works well for creating animations from a set of gif images. No doubt there are other simlilar tools. The procedure for creating a set of Ferret gif images would be the same; see the documentation of gifsicle or other tools for how to use them to create the animation.


Whirlgif is extremely easy to use:

1. Make your gif files with a Ferret command like:

yes? REPEAT/J=1:36 (GO scriptfile `j`; FRAME/FILE=whirl-`j`.gif)

where the scriptfile uses the argument j to determine the plot characteristics. See sections later in this chapter for more on the REPEAT command and creating GIF files.

2. Make a file (for example call it whirlgif-infile) that consists of a list of the gif files (including repeats if you want):

> more whirlgif-infile
whirl-1.gif
whirl-2.gif

This file can be as long as you want and may specify files more than once to repeat any of the images if you wish.

3. From the unix command line use whirlgif to make the movie:

> whirlgif -o movie_filename.gif -i whirlgif-infile

That's it. Whirlgif simply concatenates the gif files with some connecting information needed to do the animation. The resulting movie gif file is just about as large as the sum of the input frames.

These show nicely on the web, or you can use xanim (under unix) to view locally.

It can be found at

http://linux.maruhn.com/sec/whirlgif.html

We have found that it is a simple program that works without much study.

[ Previous links at http://www.msg.net/utility/whirlgif/
and http://www.danbbs.dk/~dino/whirlgif/index.html  seem to have changed. ]


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: