Meshes
Meshes
Meshes are used to draw lines from one point to another. A mesh offers the flexibility to draw virtually any shape within Partiview, from a line between two points to complex, three-dimensional grids and surfaces.
The mesh command is typically used in a file and takes the form:
mesh -t texnum -c colorindex -s style {where the mesh command is issued with the -t, -c, and -s options (see below). After the mesh options is an open curly brace followed by numu numv, which specifies the dimensions of the mesh.
numu numv
x y z u v
...
}
If you wish to draw a line between points, then numu will be 1 while numv will equal the number of points to connect. If you want a square, 4000 x 4000 grid with lines every 200 units, then numu numv will both equal 21. The data points (x, y, z) as well as the optional u and v coordinates for texture mapping are listed below these dimensions. The mesh command is concluded with a closing curly brace.
The -c option sets a colorindex that points to a color set using the cment command. The -t option loads a texture whose texnum is set using the texture command. Finally, the -s option sets the style of the mesh. The style can take the following values:
- solid draws a filled surface,
- wire draws a wire-frame connecting each of the vertices,
- point draws a point at each vertex, leaving them unconnected.
For example, start Partiview with the Test Data and load the file mesh.speck via the command
read mesh.speck
You will see a few meshes appear and upon inspection of the mesh.speck file, you will notice that there are three mesh commands. The first connects seven points into the pyramid whose apex is at y = 0. The second is a square grid in the xz-plane, and the third draws a solid mesh in the y = - 1 plane upon which the blue ring texture is placed. Use this file as an example for other meshes you'd like to create.
© 2002-2005 American Museum of Natural History
Last Modified: 2006-04-28 by Brian Abbott
