- Home
- Non Sequential Ray Tracing
- Objects
- Creating Polygon Objects in ZEMAX
Connecting the Vertices
Now that the vertices are defined, we can construct the cube using a series of rectangle calls. The rectangle syntax requires the four vertex numbers which make up the rectangle, in addition to two other parameters:
R vertex1 vertex2 vertex3 vertex4 isreflective face
The vertex numbers must be integer vertices previous defined in the file, and the order of the vertices is not arbitrary – they must be listed in a continuously clockwise or counter-clockwise order. A “bow-tie” order is not supported, as indicated by the diagram below:
As an example, the following line would create the front face of our cube, connecting vertices 1, 2, 3, and 4:
R 1 2 3 4 0 0
The isreflective argument is an integer value which can be -1, 1, or 0. Each face of the polygon object can either be reflective, refractive, or absorbing. If the is reflective flag was set to 1 in the example above, then the surface would be considered as a reflective surface, and syntax would look like:
R 1 2 3 4 1 0
For the isreflective flag, 0 stands for refractive, 1 stands for reflective, and -1 stands for absorbing. Separate from what is defined in the POB file, each face of each object can be made reflective or absorbing from the Object Properties dialog:
Note that this selection overrides whatever has been set in the POB file. For example, if one of the faces in the POB file was set to reflective, it can be changed to absorbing in the Object Properties dialog without having to edit the POB file. If Object Default is selected, then the property assigned in the POB file is assumed.
The face argument determines which face group the surface is related to. This is discussed in more detail on page 4.
So, to continue the definition of each face of the cube, we need a total of six rectangle commands, each of which will be refractive:
