We’re going to be optimizing the eyeglass lens to take on a free-form shape, in an attempt to provide accommodation to the eye as it rotates downward. Our next step is to set variables in the Lens Data Editor (LDE). The only things we’re interested in varying are the shapes of the front and back surfaces of the eyeglass lens.

In the LDE, set the Radius, Conic, and 2nd Order Term through 12th Order Term of Surface 2 (glasses-front) to variables – there should be eight parameters total for this surface that are now allowed to vary. Then in the Extra Data Editor (EDE) set the Max Term # of Surface 3 (glasses-back) to 40 and the Norm Radius of the same surface to 20.0. Now set all forty polynomial coefficient terms for Surface 3 to be variables.

Before we can optimize the shape of the eyeglass lens, we need to set up a Merit Function. In the Merit Function Editor (MFE), go to Tools|Default Merit Function. Set the Optimization Function and Reference values to “RMS,” “Wavefront,” and “Centroid.” Set the Pupil Integration Method to “Gaussian Quadrature” and choose 3 Rings and 6 Arms. Note that the Assume Axial Symmetry box will already be un-checked and we will leave it that way:

Default Merit Function Tool

Click “OK” and ZEMAX will automatically generate a few thousand optimization operands for us.

Before we start optimizing, we just need to add a couple of edge thickness operands, to keep the edges of the eyeglass lens from becoming too thick or too thin. The eyeglass lens comprises an Extended Polynomial surface type, and so it is not going to remain rotationally symmetric during optimization. Therefore, we must use operands that check the edge thickness at multiple points around the lens. XNEG and XXEG are just such operands. We will add these operands to the merit function to ensure that the edge thickness of the eyeglass lens is between 1 and 8mm thick.

Insert two new operands at the beginning of the Merit Function. Below are the settings to use for these two new operands:

First new operand 
Type = XNEG
Surf1 = 2
Surf2 = 3
Zone = 0
Target = 1
Weight = 1


Second new operand
Type = XXEG
Surf1 = 2
Surf2 = 3
Zone = 0
Target = 6
Weight = 1