Contents

Toons

To create an animation, just do the following:

The animation window

A resizeable window will pop up when you choose the Toon item form the Viewaxes submenu. This has 10 buttons on it. They are Some computer systems cannot produce the required amount of graphics memory for a pixmap and if this happens, you cannot currently run the animation. You will be told this and the animation window will never appear.


DASL: Dynamical Animation Scripting Language

In order to use the animation components of XPP, you must first describe the animation that you want to do. This is done by creating a script with a text editor that describes the animation. You describe the coordinates and colors of a number of simple geometric objects. The coordinates and colors of these objects can depend on the values of the variables (both regular and fixed, but not auxiliary) at a given time. The animation then runs through the output of the numerical solution and draws the objects based on that output. I will first list all the commands and then give some examples.

Basically, there are two different types of objects: (i) transient and (ii) permanent. Transient objects have coordinates that are recomputed at every time as they are changing with the output of the simulation. Permanent objects are computed once and are fixed through the duration of the simulation. The objects themselves are simple geometric figures and text that can be put together to form the animation.

Each line in the script file consists of a command or object followed by a list of coordinates that must be separated by semicolons. For some objects, there are other descriptors which can be optional. Since color is important in visualization, there are two ways a color can be described. Either as a formula which is computed to yield a number between 0 and 1 or as an actual color name started with the dollar sign symbol, $. The ani file consists of a lines of commands and objects which are loaded into XPP and played back on the animation window. Here are the commands:

dimension xlo;ylo;xhi;yho

speed delay

transient

permanent

line x1;y1;x2;y2;color;thickness

rline x1;y1;color;thickness

rect x1;y1;x2;y2;color;thickness

frect x1;y1;x2;y2;color

circ x1;y1;rad;color;thickness

fcirc x1;y1;rad;color

ellip x1;y1;rx;ry;color;thickness

fellip x1;y1;rx;ry;color

comet x1;y1;type;n;color

text x1;y1;s

vtext x1;y1;s;z

settext size;font;color

end

All commands can be abbreviated to their first three letters and case is ignored. At startup the dimension of the animation window in user coordinates is (0,0) at the bottom left and (1,1) at the top right. Thus the point (0.5,0.5) is the center no matter what the actual size of the window on the screen. Color is described by either a floating point number between 0 and 1 with 0 corresponding to red and 1 to violet. When described as a floating point number, it can be a formula that depends on the variables. In all the commands, the color is optional except settext. The other way of describing color is to use names which all start with the $ symbol. The names are: $WHITE, $RED, $REDORANGE, $ORANGE, $YELLOWORANGE, $YELLOW, $YELLOWGREEN, $GREEN, $BLUEGREEN, $BLUE,$PURPLE, $BLACK.

The transient and permanent declarations tell the animator whether the coordinates have to be evaluated at every time or if they are fixed for all time. The default when the file is loaded is transient. Thus, these are just toggles between the two different types of objects.

The number following the speed declaration must be a nonnegative integer. It tells tha animator how many milliseconds to wait between pictures.

The dimension command requires 4 numbers following it. They are the coordinates of the lower left corner and the upper right. The defaults are (0,0) and (1,1).

The settext command tells the animator what size and color to make the next text output. The size must be an integer, { 0,1,2,3,4 } with 0 the smallest and 4 the biggest. The font is either roman or symbol. The color must be a named color and not one that is evaluated.

The remaining ten commands all put something on the screen.

REMARK. As with lines in ODE files, it is possible to create arrays of commands using the cobination of the [i1..i2] construction. Some examples are shown below.