MathGL can save points and primitives of 3D object. It contain a set of variables listed below.
width of the image;
height of the image
depth of the image, usually =sqrt(width*height);
number of points (vertexes);
array of coordinates of points (vertexes), each element is array in form [x, y, z];
number of primitives;
array of primitives, each element is array in form [type, n1, n2, n3, n4, id, s, w, p, z, color].
Here type is kind of primitive (0 - mark, 1 - line, 2 - triangle, 3 - quadrangle, 4 - glyph), n1...n4 is index of point for vertexes and n2 can be index of glyph coordinate, s and w are size and width if applicable, z is average z-coordinate, id is primitive identification number, p is scaling factor for glyphs.
number of glyph positions
array of glyph positions, each element is array in form [dx,dy]
number of glyph descriptions
array of glyph descriptions, each element is array in form [nL, [xP0, yP0, xP1, yP1 ...]]
. Here nL
is the number of line vertexes; and xP, yP, xQ, yQ
are coordinates of lines. Line coordinate xP=0x3fff, yP=0x3fff denote line breaking.