Hi guys,

I am new to learning ZPL. I have a list of macros that I am tasked to write at work. Here are the list below with their purpose. I was hoping anyone have written similar macro, p[lease share or give me tips on how to write them. Thanks.

- Compute the paraxial ABCD matrix between 2 surfaces.
- Bend a lens. Given one radius, compute the other radius to maintain the focal length.
- Macro to plot and optionally list the distortion over the full image format
- Calculate relative or absolute dn/dT values based on the Schott equations
- Draw the aperture(s) associated with a surface.
- Define a macro function to compute the clearance between two surfaces, including the sags of the two surfaces
- Compute the angular boresight error in object space of the system due to the decentration of a surface or a group of surfaces.
- Compute the edge thickness between two surfaces at a specified x,y location
- Plot the FOV points
- Tabulate the focal lengths of each component in the specified surface range. A component is a single surface mirror, a lens, or a cemented lens
- Compute the local focal length in the x and y directions over the FOV.
- List and plot focal length vs. wavelength or the percent change in focal length vs. wavelength
- Do a ghost analysis between two specified surfaces
- Define a macro function to compute the size of a one-bounce or two-bounce ghost image at a specified image surface.

Please share if you have any of these macros or guide me. Thank you so much

**Best answer by Sandrine Auriol**