Authored By: Mark Nicholson
How Do I Change the Size and Shape of an Optical Component?This article is also available in Japanese.Question: Zemax draws all my optical surfaces as if they has circular apertures. How do I make it draw a rectangular cross-section, or some general cross-section?By default, Zemax assumes that all optical surfaces are of circular shape, and it computes the size of the circle by tracing marginal rays and setting the
semi-diameter of the surface equal to the largest radial distance a marginal ray makes. (In non-sequential ray-tracing, the aperture of objects is defined as an object-specific set of parameters.)
This makes each surface just big enough to allow the marginal rays through. It is usually required to make the real lens larger than this: for example, the lens mount will need some glass to clamp against, and so the lens must be made larger than this semi-diameter. In some cases, the surface is in a caustic, and the marginal rays are not the limiting rays that should be used to define the component size. In other cases, it is required to make lenses with rectangular or other cross-sections. This is easy to achieve.
One way to make the lens larger than the circular aperture computed by Zemax, is to simply type the desired semi-diameter into the semi-diameter column in the Lens Data Editor. Alternatively, click on General...Miscellaneous and tell Zemax to add a margin either as a fixed amount in lens units, or as a percentage of the semi-diameter. This is particularly useful during optimization, as it ensures the lens is always large enough to be mounted.

To define other aperture shapes, double-click on the surface, and in its properties dialog, go to the Aperture tab:

You may add circular, elliptical, rectangular or user-defined apertures to the surface. It is usual, but not required, to use the same aperture shape on both sides of the component. For example, here is a cylindrical lens ground to have a rectangular aperture:

See the sample file provided with Zemax at {Zemax root}\Samples\Sequential\Miscellaneous\Cylinder.zmx for a good example.
More complex apertures are easily defined using the user-defined aperture capability. All aperture types can be decentered for ease of placement.