SimAnimate Cellzilla2D Home


Returns a sequence of graphics images visualizing the results of a simulation, with the concentration of one particular species illustrated as a function of position in each image. The concentration is represented by a range of colors, one color per cell. Can optionally also generate a movie file.


Return Value (single solution mode)

SimAnimate[solution, variable, template, {StartTime,EndTime, Interval}, {ColorMin, ColorMax}, {ValMin, ValMax}] returns a list of graphics objects. These can visualized as a movie using ListAnimate, or exported as image files and converted with an external program such ss ffmpeg.

solution - is the output of RunSim

variable - is any variable in the solution, e.g., if X is used, then the output will use the color of X[1][t] for cell 1, X[2][t] for cell 2, ...

template - is the template used to generate the reaction network with CelleratorNetwork.

{StartTime, EndTime, Interval} - the times used for the animation.

{ColorMin, ColorMax} - Any two RGB colors; the color of of cell i is calculated from the value of X[i][t] using linear interpolation between ValMin and ValMax. Values less than the minimum or more than the maximum or plotted at ColorMin or ColorMax. These colors can either be color names such as Pink or RGB color specifications using RGBColor. A list of named colors can be found here.

Return Value (Sequence of solutions from files)

SimAnimate[variable, options] generates a pop-up menu allowing the user to scroll through the file directory and select the folder that contains the solution files that were generated by grow.

SimAnimate[variable, folder, options] bypasses the pop-up menu.

Note that ffmpeg and the desired codecs (mov, avi, etc) must be installed for this version to work. Installation of these programs is operation system dependent.

Options (Sequence of solutions from files)

Any option from ShowTissue or Plot may be used, as well as the following:

"Frames"→4 Integer number of frames per second for ffmpeg.
"Values"→{ValMin, ValMax} Same as above.
"ImageType"→"jpg" File type for each frame. Values depend on which CODECs are installed; typically "jpg","png" will work best.
"InputFolder"→"Unknown" Name of folder to look in. If omitted or set equal to "Unknown" a pop-up selection menu will appear.
"ShowTime"→True T/F if time should be affixed to frame title.
"Label"→var Optional label for each frame. Default value is name of symbol being plotted. "None" turns off labeling.
"Dome"→False If True, project onto a parabolic dome.
"Radius" Meristem radius if "Dome"→True
"h"→0,"k"→0 (x,y) coordinates of Meristem center if "Dome"→True.
"Origin"→{0,0} Coordinates for center of plot. This might be a little different from (h,k) because viewpoint angle may move the dome away from the center of the viewbox.
"type"→"mov" Type of movie file desired. Note that the appropriate CODEC (mov, avi, etc.) must be installed; and that different CODECs may have type-specific restrictions on ImageSize (a Plot option) or "FrameRaate"
"PlotTimes"→{start, end} Start and end times of movie. If not specified, will use start and end times of the solution.


[ Download Example as Zipped Mathematica Notebook ]

Implementation Notes

See Also

ShowTissue, SimShow, SimShowAt, SimShowFinal