Defining polygon objects is one of many ways of creating user-definable objects in ZEMAX.  Polygon objects are objects that are composed of a collection of triangles in 3D space, whose vertices are defined in an ASCII text file.  The file format may be created and edited in any text editor, such as Notepad, and consists of a series of rows of data.  Each row begins with a single letter or symbol, followed by the data for that symbol.  For a complete description of the supported symbols and their syntax, refer to the “Defining Polygon Objects” section in the Non-Sequential Components Chapter of the ZEMAX User’s Guide.

To fully demonstrate how to construct a polygon object, define individual faces or face groups, where to save the file, and how to load it in ZEMAX, let’s create a cube using the POB capabilities.  A cube has a total of six faces, but only a total of 8 vertices need to be defined.  We can then connect each of these vertices using the rectangle symbol supported by the polygon object in ZEMAX.

We can start with a blank Notepad Editor.  Lines which begin with the exclamation mark (!) indicate a comment line.  It is always useful to include comments so that you can remember what you have done when you view the definition of this object later on.

Notepad Editor

Let’s first define the 8 vertices of the cube.  The syntax we must use is described by the vertex symbol: V.  Lines which define a vertex must start with the letter V, followed by the vertex number and the x, y, z coordinates of the vertex:

V number x y z

The number designates the x,y,z positions to a vertex number, which may then be used later on in our definition of the polygon object.  This makes is convenient so that we do not have to define the x,y,z coordinates each time this vertex is used.  Instead, we just reference the number. 

The x,y,z coordinates are relative to the local (0,0,0) of the polygon object.  Be aware that the (0,0,0) coordinate of the polygon object is positioned globally within the NSC Editor.

So, let’s assume that we want the vertex of the cube to be at the center of the front face, and that the dimensions of the cube are 10 x 10 x 10.  Note that the units are defined under the System > General dialog.  Therefore, if my system units are in millimeters, then the cube will have dimensions of 10 x 10 x 10 millimeters.  If I switch the system units to inches, then the cube will be 10 x 10 x 10 inches.

Notepad Editor - Defining the Vertices

Again, a total of 8 vertices are defined by their respective x, y, and z positions.  Here is a graphic which represents the collection of points that we have just defined above:

NSC 3D Layout - Location of Vertices

Note that we have not yet connected any of the vertices.  The blue lines in the graphic above are shown just for visual purposes – they help distinguish the cubic shape and give depth to the picture.

The red arrows indicate the local coordinate axes, with the origin at the vertex of our polygon object.  The local axis for each object may be drawn by checking the “Draw Local Axis” box under the Draw tab of the Object Properties dialog:

Object Properties - Draw Local Axis