Vis > visualization > explorer > Explorer Sample Map 6
Explorer Sample Map 6
Sample Map - Animated Isosurface (Global Data)
Description
Similar to "isosfc_sample_2.map", but with looping and animation capabilities. The looping capability is provided by a "For" module, and the animation is accomplished using captured images in "AnimateImages". This map is really only suitable for use on an Indigo2 or faster/bigger machine.
And, yes, it is a bit more complicated...{:-)
Looping in Explorer can be tricky <:-}. One important thing to keep in mind is how to stop a loop or keep it from starting. One way to stop a loop already in progress is to use the "Break Loop" option available with the right mouse button for the loop controller module (in this case, the "For" module). A loop-controlling module can be identified by the small green light in the center of the title bar. Also note that purple "wires" are used to indicate a loop.
An easy way to prevent looping is to insert a "Switch" module in the flow and turn it "Off". This sample map has two "Switch" modules to control unwanted firing. The first, just downstrem of the "For" module, keeps the loop from propagating. The other is in the (tight) loop from Render's Sync port to the Snap port, preventing unwanted "snapping" of the image. Turn the latter switch "On" only when you're ready to start capturing images in "AnimateImages". The image-"snapping" process can be rather time consuming.
The wiring in this map may appear quite involved, but much of the confusion actually reflects the rather powerful ability to make use of the metadata present in the netCDF file. For instance, "missing data" can be detected and automatically accounted for when computing the isosurface or histogram. Also, information about the coordinates can be used to construct axes with tic-marks and labels, and the figure can be annotated with the name of the variable and its units.
Steps in getting this map to work:
- Maximize "For" and refire it - this will leave the "Current Value" at 20. ;
- Set "Switch2" to "On" - this will fire everything through for time index 20 ;
- Set "Switch" to "On" - this will "snap" the image and put it on Render's "Snapshot" output port;
- Maximize "AnimateImages" and set the image mode to "Add" so that subsequent images will be put into memory;
- Set whatever viewing angle and zoom factor (25. is good) you like in Render;
- In the "For" panel, hit "Refire" again, starting up the loop in which all 20 times will be rendered and the images saved in "AnimateImages" - now just wait.....;
- Hit "Play/Pause" in "AnimateImages" to play the sequence back. The playback rate is about 10 frames/sec for the default window size of "AnimateImages". To slow the animation down, increase the "Delay".
Note: the "AnimateImages" window may not refresh if it is covered and uncovered again, so take note of where the pause/play button is so that you can stop the animation. Also, to make the other buttons appear again, just pass the cursor over them. This compromise was made to maximize the playback speed of "AnimateImages".
Also, storing the images is rather memory intensive - about 1MB per image at the default window size. For all practical purposes, this limits the length of the animation to only a couple dozen frames, and only on a (64MB) Indigo2. (A version which buffers the images to disk is in progress.)
Availability
This map is available (gzip-compressed) here.


