The VERT_T3D function transforms a 3D array by a 4x4 transformation matrix and returns the transformed array. The 3D points are typically an array of polygon vertices that were generated by SHADE_VOLUME or MESH_OBJ.

This routine is written in the IDL language. Its source code can be found in the file ```
vert_t3d.pro
```

in the ```
lib
```

subdirectory of the IDL distribution.

The 4x4 transformation matrix to use. The default is to use the system viewing matrix (!P.T).

Normally, a copy of *
Vertex_list*
is transformed and the original *
Vertex_list*
is preserved. If NO_COPY is set, however, then the original *
Vertex_List*
will be undefined after the call to VERT_T3D. Using the NO_COPY requires less memory.

Normally, when a [*
x*
, *
y*
, *
z*
, 1] vector is transformed by a 4x4 matrix, the final homogeneous coordinates are obtained by dividing the *
x*
, *
y*
, and *
z*
components of the result vector by the fourth element in the result vector. Setting the NO_DIVIDE keyword will prevent VERT_T3D from performing this division. In some cases (usually when a perspective transformation is involved) the fourth element in the result vector can be very close to (or equal to) zero.

Set this keyword to a named variable that will hold receive the fourth element of the transformed vector(s). If *
Vertex_list*
is a vector then SAVE_DIVIDE is a scalar. If *
Vertex_list*
is an array then SAVE_DIVIDE is an array of *
n*
elements. This keyword only has effect when the NO_DIVIDE keyword is set.

Transform four points representing a square in the x-y plane by first translating +2.0 in the positive X direction, and then rotating 60.0 degrees about the Y axis.

points = [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], $

[1.0, 1.0, 0.0], [0.0, 1.0, 0.0]]