Hi, everyone. Often, we need to control the size and location of the exit pupil in an optical design so that filters or other elements can be placed there. It’s fairly easy to place a dummy surface at the exit pupil and then use operands on thickness, diameter, or global position to control the exit pupil location and size.
For the Double Gauss system below, I’ve added two surfaces at rows 13 and 14: one going to the exit pupil, and one returning to the original position using a pickup. Surface 14 will be located at the exit pupil, then. I’ve also moved the original thickness traveled to the image plane down to surface 15, preceding the image plane.
To move the dummy surface to the exit pupil, I rely on the fact that rays that intersect at the stop should also intersect (or nearly so) at the exit pupil. To find the Z location of the exit pupil at wavelength 2 for the on-axis field position, I choose rays at 0 pupil height that are separated by small field angles. Here I’ve used field angles in Y, but one could use a cone of rays for more accuracy. I also set the thickness of surface 13 to be a variable.
(I can add additional groups of rays at other heights in the pupil, if I want to also find the tilt and curvature of the pupil.)
Plotting the design with multiple field angles clearly shows the stop at the center of the system. And after optimization, the the on-axis exit pupil is about 108 mm behind the image plane. Surface 14 can now be used to control the exit pupil diameter and location.
A few additional notes: The exit pupil typically moves as a function of field angle. You can see this effect by turning ray aiming on and choosing “Draw Real Exit Pupil” in the layout plots, as shown below. (This is a real effect; if you peer backward into a camera lens and move the lens in X and Y, the exit pupil will move around in space.)
Also, locating the pupil can be inexact, because the pupil image may be blurred; the rays selected in the Merit Function may not come together perfectly. (This is also a real effect; if you peer into a camera lens you will see the exit pupil but it likely will not be in sharp focus.) The rays overlap perfectly only at the stop itself.