Animp draws a 3D model of particles in a 100x100x100 cube. The particles' coordinates should range from 0-99 in x, y and z. Each particle is colored based on selecting one of a set of colors specified as red, green and blue components which may be specified as integers from 0 to 255 or floating point numbers from 0.0 to 1.0. In addition each color has an alpha value which is used by OpenGL to blend colors when an object is transparent or translucent. Alpha values are specified as values from 0 to 255 or from 0.0 to 1.0 like colors. An alpha value of 1.0 (or 255) yields an opaque object and an alpha value of 0.3 yields a translucent object which gets * 70% of its color from object behind it.
Animp colors
The colors used by animp are stored in a movie file as bytes. If the program which writes a movie file uses floating point values they will be scaled from the 0.0 to 1.0 range to be in the 0 to 255 range.
Here are some sample colors
Red | Green | Blue | Alpha | Description |
0 | 0 | 0 | 255 | Black |
255 | 255 | 255 | 255 | White |
255 | 0 | 0 | 255 | Opaque red |
1.0 | 0.0 | 1.0 | 255 | Opaque magenta (purple) |
0.0 | 1.0 | 1.0 | 255 | Opaque cyan |
255 | 0 | 0 | 50 | Translucent red |
0.0 | 0.0 | 1.0 | 0.3 | Translucent blue |
1.0 | 1.0 | 0.0 | 0.3 | Translucent yellow |
1.0 | 1.0 | 1.0 | 0.3 | Translucent white |
Animp frames
An animp movie file consists of a sequence of frames. First there is a single frame which consists of objects which are part of each other frame and in the same position. This static frame is written once to the movie file and is logically part of the remaining frames without wasting a lot of space. The remaining frames each specify one frame of the animation.
Each frame consists of objects which are opaque and objects which are translucent. They are stored separately in the movie file to make it simpler to draw the opaque objects first and sort the translucent objects.
Animp spheres
An animp sphere is specified by giving its center position, diameter and color. The center position is specified as 3 values for x, y and z. These values are 2 byte integers which are currently in the 0-100 range. It is more likely that the coordinates will expand than the other parts of a sphere.
The diameter of the sphere is specified as a single byte which ranges from 0 to 255.
The color is also a single byte. It is an index into the collection of colors for the movie file with the first color index being 0.
Generated on Thu Nov 27 08:17:11 2003 for Animp - Animated Particles by
1.3.2