MESH Function
Defines a polygonal mesh object that can be used by the RENDER function.
Usage
Input Parameters
vertex_list—A double-precision floating-point array of 3D points; the array's size is 3 * number_of_vertices.
polygon_list—A longword integer 1D array defining the polygons; the array's size is number_of_polygons * number_of_edges.
For more information on these two parameters, see the PV‑WAVE User Guide.
Returned Value
result—A structure that defines an object consisting of multiple polygons.
Keywords
Color—A 256-element double-precision floating-point vector containing the color (intensity) coefficients of the object. The default is Color(*)=1.0.
For more information, see the PV‑WAVE User Guide.
Kamb—A 256-element double-precision floating-point vector containing the ambient (flat shaded) coefficients. The default is Kamb(*)=0.0.
For more information, see the PV‑WAVE User Guide.
Kdiff—A 256-element double-precision floating-point vector containing the diffuse reflectance coefficients. The default is Kdiff(*)=1.0.
For more information, see the PV‑WAVE User Guide.
Ktran—A 256-element double-precision floating-point vector containing the specular transmission coefficients. The default is Ktran(*)=0.0.
For more information, see the PV‑WAVE User Guide.
Materials—A byte array of size number_of_polygons defining the materials list. The purpose of this keyword is similar to that of the Decal keyword for quadric objects. Its use permits the specification of properties for each polygon where each polygon specifies an index into the Color, Kamb, Kdiff, and Ktran property arrays.
For more information, see the PV‑WAVE User Guide.
Transform—A 4-by-4 double-precision floating-point array containing the local transformation matrix whose default is the identity matrix. For more information, see the PV‑WAVE User Guide.
Discussion
MESH can be used by the RENDER function to render collections of 3D polygons, such as iso-surfaces, or spatial-structural data.
Note: Any non-coplanar polygons in a mesh are automatically reduced to triangles by RENDER. |
The Transform keyword can be specified to alter the scaling, as well as the orientation and position of the polygons defined by MESH.
Examples
vertices = [[-1.0, -1.0, 1.0],$ [-1.0, 1.0, 1.0],$ [ 1.0, 1.0, 1.0],$ [ 1.0, -1.0, 1.0],$ [-1.0, -1.0, -1.0],$ [-1.0, 1.0, -1.0],$ [ 1.0, 1.0, -1.0],$ [ 1.0, -1.0, -1.0]] polygons = [4, 0, 1, 2, 3,$ 4, 4, 5, 1, 0,$ 4, 2, 1, 5, 6,$ 4, 2, 6, 7, 3,$ 4, 0, 3, 7, 4,$ 4, 7, 6, 5, 4] T3D, /Reset, Rotate=[15, 30, 45] cube = MESH(vertices, polygons, Transform=!P.T) WINDOW, Xsize=256, Ysize=256 TV, RENDER(cube)
See Also
CONE, CYLINDER, RENDER, SPHERE, VOLUME
For more information, see the PV‑WAVE User Guide.