The xCellerator Project
animation mPower Reference Home

animation[n,{x, xmin,xmax}, {tmin, tmax, dt}, options] generates a sequence of calls to visualization by interpolating into n, which is the output of NDSolve. Variables x[1],x[2],x[3],... will be plotted in cells 1, 2, 3,... at times tmin, tmin+dt, tmin+2dt,....

Options are the same as visualization.

The option cellCoordinates is required.

Any valid option for Plot can be used.

Additional Options:

RGBColors→{{1,0,0},{0,1,1}} gives a range of colors to use for filling the cell, the first color corresponding to data values ≤ xmin, the second corresponding to data values ≥ xmax. Each color must be a triple of numbers between 0 and 1. Colors for values between xmin and xmax are assigned by linear interpolation of the color value in RGBSpace.

legend→Automatic, location of color legend.

missingCellColor→Black, color to be used to fill any cells for which data for x[i] is not found in the solution.

Example:

animation[n, {W, 0, .1}, {0, 500, 25}, 
  cellCoordinates -> xyz, 
  RGBColors -> {{1, 0, 1}, {0, 1, 0}}, 
  cellNumbers -> False, 
  wallThickness -> 0.001, 
  Background -> White, Frame -> True]

where

n is an output of NDSolve that contains solutions for variables W[1][t],W[2][t],...,W[n][t] on the intervale 0≤t≤500 (at least) and n is the number of cells in xyz.
xyz is a list of cell center coordinates {{x1,y1},..,{xn,yn}}.
will produce a sequence of images at times t=0,25,50,..,500 with the W=0 mapped to RGB[1,0,1] and W=0.1 mapped to RGB[0,1,0]. The sequence of images is illustrated below (converted to an animation):

Click to view avi animation.


SourceForge.net Logo






[16-Feb-2006]