VisTrails Home


From VisTrailsWiki

Jump to: navigation, search


Making a Movie

Here are steps that can be followed to construct an animated gif (movie) from a set of images that have been constructed using VisTrails or MicroSoft's Excel.

Whitworth's (1981) Isothermal Free-Energy Surface
|   Tiled Menu   |   Tables of Content   |  Banner Video   |  Tohline Home Page   |

Generate a Sequence of (PNG) Images

Inside VisTrails

Test Animated gif
  • Use the "Explore" feature of VisTrails to sample a parameter range and thereby generate a sequences of spreadsheet images.
    • For example, vary the Camera's Azimuth by 3 degrees between images.
    • In order to ensure a reasonably good size/resolution for each image, we have found it beneficial to generate at most five images per "Explore" session.
  • After viewing the spreadsheet results, use the spreadsheet's "Export/Separately" menu option to dump the image sequence into a new (otherwise empty) file folder.
    • If the images are laid out across the spreadsheet horizontally, by default, VisTrails will name the files: a1.png, a2.png, a3.png, etc.
    • If the images are laid out across the spreadsheet vertically, by default, VisTrails will name the files: a1.png, b1.png, c1.png, etc.

Inside Excel & Paintbrush

  • Construct a 2D x-y plot with all of the detail that you would want to put in a single printed journal figure.
  • Take a snapshot of the figure:
    • Place the mouse cursor somewhere on the boundary of the figure frame;
    • CTRL-mouse-click generates a drop-down menu; selecting "Save as Picture …" copies a bitmapped image to the Mac's clipboard.
  • Open "Paintbrush" and paste the image into an otherwise blank window; save the image into the desired file folder.
  • Return to Excel; make the necessary changes in spreadsheet parameters to construct the next 2D x-y plot for the desired movie sequence; as before, save this new image (using a different, but preferably sequentially numbered) name into the desired folder.

Creating the Animation

Animated GIF

  • Via the Mac's terminal window, change directories into the folder that contains the image sequence.
  • As necessary, rename image files in order to define the desired image sequence:
    • The "convert" program (see next instruction step) expects the file names to be in a consecutively numbered sequence;
    • Assuming PNG-formatted image types, we recommend using the numbering sequence: a01.png, a02.png, a03.png, etc.
    • If you want a smooth back-and-forth animation loop and you are starting with 9 images (numbered a01 thru a09), make additional copies of images such that the entire animation is: 1-2-3-4-5-6-7-8-9-8-7-6-5-4-3-2. But the last seven images should be named a10.png, a11.png, a12.png … a16.png.
  • Type one of the following two commands (2nd one preferred!):
convert -set delay 3 -colorspace GRAY -colors 16 -dispose 1 -loop 0 -scale 50% *.png Output.gif
convert -set delay 10 -colors 1024 -dispose 1 -loop 0 -scale 100% *.png Output.gif
  • Related information:
    • I initially extracted the first of these recommended "convert" instructions from Jens Nöckel's web site.
    • My Mac contains a manual on this "convert" instruction (man convert); it points out that, "The convert program is a member of the ImageMagick(1) suite of tools."
    • The Mac's "convert" manual also refers to a convert website.
  • Finally, rename the "Output.gif" file to something that better identifies the content; upload the renamed "Output.gif" file to the VisTrails wiki site; and insert it into the desired wiki page just as you would insert a single image.

Related Discussions

Personal tools