Monday, February 7, 2005

How to make animated gif images

Animated GIF images are a good choice for creating animations of model results because the files are relatively small and portable compared to other movie formats. You make an animated GIF using, for example, gifsicle, as such:

gifsicle --colors 256 -O1 -l0 -d20 frames*.gif > movie.gif

The options are -O1 stores only the changed pixels, -l0 loops forever, and -d20 sets the delay to 20 hundreths of a second between frames. The trick is creating a bunch of GIF frames. I do this in MATLAB by first outputting to TIFF files, like this:

print -dtiff -r100 -zbuffer frame03.tiff

In matlab, use the eval function to write a series of frames like this:

frame = 1;
for n = 1:TOTALFRAMES;
plot commands;
eval(['print -dtiff -r100 -zbuffer frame',num2str(frame,'%2.2i'),'.tiff']);
frame=frame+1;
end


I make the figure as big in inches as I want it in hundreds of pixles (the -r100 gives me 100 pixels per inch). Then convert these images to GIFS using convert by ImageMagick like this:

convert frame03.tiff frame03.gif

Here is a script that gets you from a bunch of numbered TIFF frames to an animated GIF. Go knock yourself out.

The TGLO/TABS Current Prediction System: 2003 Annual Report

A year late, but still hot off the presses: the The TGLO/TABS Current Prediction System: 2003 Annual Report. This document covers basic information about the TGLO TABS modeling effort, covering input fields, model and grid information, output data styles and formats, and visualization techniques. Enjoy.

TAMU GCOOS Wiki

A new 'superblog' has been created to cover ongoing GCOOS and TABS developments, the TAMU GCOOS Wiki found at http://pong.tamu.edu/tiki

Thursday, February 3, 2005