How to Model the Human Eye in ZEMAX

Transcription

How to Model the Human Eye in ZEMAX
How to Model the Human Eye in ZEMAX
Michael D. Tocci, Ph.D.
21-April-2007
Introduction
Accurate simulation and modeling of the human eye can be tricky. Entire volumes have
been written on the subject, and it is a subject that continues to spur new developments. In
this study, we will create model of a human eye in ZEMAX using the Liou & Brennan 1997
eye model. This is a fairly up-to-date and comprehensive model of the eye. It accounts for
many realistic factors that other models do not, such as an offset pupil, a curved retina
surface, an inward-pointing eyeball, and a crystalline lens with two different gradient
refractive index profiles (one for the front half and a second profile for the rear half). The
prescription for this eye model (along with a wealth of other extremely important and
interesting information) can be found in the book titled “Optics of the Human Eye,” by David
A. Atchison and George Smith (2000). After successfully generating this eye model in
ZEMAX, we will use it to design a free-form progressive eyeglass lens.
Human Eye Model
We’ll begin by setting up the human eye model. You can open the attached file
“Human_Eye_Model.ZMX” to skip typing in all the surfaces by hand (in that case, you can
skip ahead to the section titled, “Optimizing the PAL”).
If you’re going to type the file in by hand instead of loading the attached file, you’ll want to
first put ZEMAX into Sequential Mode, and then set the System|General|Units Lens Units to
“Millimeters”. Next you’ll want to set the Wavelengths (found in the System section) to “F,
d, C (Visible)” as shown below:
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
Next, go to System|General|Aperture and set the Aperture Type to “Float By Stop Size” and
then go to System|General|Glass Catalogs and add the catalog “MISC” to your Glass
Catalogs. Set just one Field, of Type “Angle(Deg)” with an X-Field value of 5:
Now insert 3 surfaces before the STOP and insert another 3 surfaces after the STOP. Below
is a step-by-step guide to setting up all the surfaces, one at a time.
Surface 0
This surface is not actually labeled Surface 0 in the ZEMAX Lens Data Editor, it’s labeled
“OBJ” and it’s the object surface. Below are the settings for Surface 0 (note that any
settings not mentioned here should be left with their default values):
Surf:Type = Standard
Comment = Object
Radius = Infinity
Thickness = 1.00E+009
Surface 1
The first surface (after the Object) is just a dummy plane, and we use it to make our layout
drawings easier to understand. Below are the settings for Surface 1:
Surf:Type = Standard
Comment = Input Beam
Radius = Infinity
Thickness = 50.0
(Note: that the actual value of the thickness of this surface is not important: feel free to
change it as necessary to make your layout drawings look just right)
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
Since we’re not actually interested in seeing this surface in the layout drawings (we only
want to see the rays after they pass through the surface), let’s right click the Surf:Type cell
for this surface, then click the Draw tab, and then check the Do Not Draw This Surface box.
Surface 2
This is the outer cornea surface. Below are the settings for Surface 2:
Surf:Type = Standard
Comment = Cornea
Radius = 7.77
Thickness = 0.55
Glass = Model; 1.376, 50.23
Semi-Diameter = 5.00
Conic = -0.18
Note: to set these glass parameters you will need to right-click the Glass cell, select “Model”
as the Solve Type from the drop down list, and then type in the values like this:
Surface 3
This is the interface between the cornea and the aqueous humor. Below are the settings for
Surface 3:
Surf:Type = Standard
Comment = Aqueous
Radius = 6.4
Thickness = 3.16
Glass = Model; 1.336, 50.23
Semi-Diameter = 5.00
Conic = -0.60
Surface 4
This surface is not actually labeled Surface 4 in the ZEMAX Lens Data Editor, it’s labeled
“STO” and it’s the aperture stop of the system. This is our eye model’s pupil plane. Below
are the settings for Surface 4:
Surf:Type = Standard
Comment = Pupil
Radius = Infinity
Thickness = 0.00
Glass = Model; 1.336, 50.23
Semi-Diameter = 1.25
In order to model the offset pupil location, we’ll need to decenter this surface. Right click
the Surf:Type cell for this surface, and then click the Tilt/Decenter tab. Set this surface to
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
have an X-decenter value of -0.5mm and then for After Surface select “Reverse This
Surface,” as shown below:
Surface 5
This is the anterior (front) portion of our model’s crystalline lens. Below are the settings for
Surface 5:
Surf:Type = Gradient 3
Comment = Lens-front
Radius = 12.4
Thickness = 1.59
Semi-Diameter = 5.00
n0 = 1.368
Nr2 = -1.978E-003
Nz1 = 0.049057
Nz2 = -0.015427
Surface 6
This is the posterior (rear) portion of our model’s crystalline lens. Below are the settings for
Surface 6:
Surf:Type = Gradient 3
Comment = Lens-back
Radius = Infinity
Thickness = 2.43
Semi-Diameter = 5.00
n0 = 1.407
Nr2 = -1.978E-003
Nz2 = -6.605E-003
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
Surface 7
This is the rear surface of the crystalline lens (that is, it is the interface between the
crystalline lens and the vitreous body of the eye). Below are the settings for Surface 7:
Surf:Type = Standard
Comment = Vitreous
Radius = -8.1
Thickness = 16.23883
Glass = Model; 1.336, 50.23
Semi-Diameter = 5.00
Conic = 0.96
Surface 8
This surface is not actually labeled Surface 8 in the ZEMAX Lens Data Editor, it’s labeled
“IMA” and it’s the image surface. This is the retina of our model. Below are the settings for
Surface 8:
Surf:Type = Standard
Comment = Retina
Radius = -12.0
Semi-Diameter = 5.00
A quick check of the system’s 3D Layout (where First Surface is set to Surface 2, instead of
the default Suface 0) shows that something is not quite right:
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
{Note: I like to make ZEMAX draw graphics as white lines on a black background. This is set
under File...Preferences...Graphics:
How to set black backgrounds for graphics
There are other choices available...experiment!}
Now back to the layout drawing. The top and bottom marginal rays are getting cut off by
the pupil. This can’t be right, especially since we’ve chosen our system’s Aperture Type to
be “Float By Stop Size”: the top and bottom marginal rays should, by definition, successfully
pass though the pupil. Something is amiss with our pupil. When our pupil is suspect, we
always check the Pupil Aberration Fan (this is an analysis tool that can be found under
Analysis | Fans | Pupil Aberration). Our system’s pupil aberration fan looks like this:
The pupil aberration fan is telling us that there is 40% pupil aberration in the negative Xdirection. This is caused by the fact that ZEMAX is getting confused about where to aim rays
so they pass through our offset pupil (remember: we decentered the pupil 0.5mm – which
is 40% of the pupil semi-diameter – in the negative x-direction).
Luckily, ZEMAX has an easy fix for this problem: Ray Aiming. Go to System|General and
then click the Ray Aiming tab. Now set Ray Aiming to Paraxial, as shown below:
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
Click the OK button and now we see that the Pupil Aberrations are eliminated:
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
And the 3D Layout shows the top and bottom marginal rays successfully passing through
the pupil:
This is the Liou & Brennan (1997) eye model. At this point, your Lens Data Editor should
look like this:
Change the Settings on the 3D Layout so that Rotation Z = 90, and set it so that the First
Surface is Surface 1 (input beam) and you’ll see the top-down view of the model, complete
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
with offset pupil and off-axis field (I’ve added some annotations to the drawing below to
label the various parts of the model):
To analyze this lens, let’s first look at the spot diagram:
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
Next we’ll check the FFT MTF:
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
Note that I’ve chosen a Max Frequency setting of 100 lp/mm. This corresponds to a singlespot resolution of 5 um, which corresponds closely to the resolution required for 20/20
Snellen Visual Acuity. You can see that this model should produce a well-resolved image up
to 100 lp/mm, and therefore is a good model of a 20/20 human eye.
Finally, in order to get a good feel for how well this “patient” can see, we’ll check the
Diffraction Image Analysis. The diffraction image analysis feature is similar to the
geometric image analysis feature, except the complex system Optical Transfer Function
(OTF) is used to compute the image appearance. This method accounts for the finite pass
band and other diffraction related effects real optical systems have on image formation.
For this, let’s set it up to image the letter “F” at a size that corresponds with 20/20 Snellen
Acuity. Go to Analysis|Image Analysis|Diffraction Image Analysis, and then click Settings
and set the values as shown below:
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
Here is the resulting Diffraction Image Analysis diagram:
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
External Optics
At this point, with a good human eye model set up in ZEMAX, it’s possible to add external
elements to the design. For example, if you have a measured cornea-shape map, you could
replace the cornea surface with a “Grid Sag” surface and import the data into ZEMAX. Or if
you had a specially-designed intraocular lens (IOL) to model, you could replace the two
gradient surfaces with the IOL prescription.
In this example, we will be designing a Progressive Addition Lens (PAL) and we’ll start by
adding an eyeglass lens to the front of our model. We’ll optimize this PAL to provide good
imaging for near, mid-range, and far objects.
To ensure a realistic modeling of the eye’s movement as the “patient” moves her eye up
and down, we will want to keep the eyeglass in place, and have the eye model rotate about
its center. That is, we’ll have to place a coordinate break at the center of the eyeball, and
then have the entire eye model rotate about this point. To do this, we’ll first place the
eyeglass lens into the Lens Data Editor, and then we’ll move forward an appropriate amount
of Thickness to get to the center of the eye. Then we’ll put in a Coordinate Break surface,
and then we’ll move backwards to the desired location of the eye model’s first surface, the
cornea. This might seem a little confusing at first, but it’s really quite simple, as you’ll see.
First, insert three surfaces between the Input Beam (Surface 1) and the Cornea (Surface 2).
These three surfaces will represent the front and rear surfaces of the eyeglass lens, and a
coordinate break to tilt the eye. You’ll notice that I’ve chosen to place the eyeglass lens
15mm from the eye.
We’re going to place the Coordinate Break surface at the center of the eyeball (which I
estimate to be approximately 13mm from the front cornea surface). This way, the eye will
rotate about its center, in a way that mimics the actual motion of a human eye. Below is a
guide to setting up these three new surfaces.
You’ll see below that the thickness from the back of the eyeglass lens to the coordinate
break (at the eyeball’s center) is 28mm (that’s 15mm from eyeglass to cornea plus 13mm
from cornea to center of eyeball). Then, after the coordinate break, there is a thickness of
negative 13mm, to get back to the cornea surface.
Surface 2
This is the front surface of the eyeglass lens.
Surf:Type = Even Asphere
Comment = glasses-front
Radius = 100.0
Thickness = 3.0
Glass = POLYCARB
Semi-Diameter = 20.0
Surface 3
This is the rear surface of the eyeglass lens.
Surf:Type = Extended Polynomial
Comment = glasses-back
Radius = 100.0
Thickness = 28.0
Semi-Diameter = 20.0
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
Surface 4
This is the coordinate break located at the center of the eyeball.
Surf:Type = Coordinate Break
Comment = center of eye
Thickness = -13.0
Now let’s add a couple of new configurations. Open the Multi-Configuration Editor (MCE),
and hit Ctrl-Shift-Insert twice. We’ll need two extra Multi-Configuration Operands, so now
hit Insert twice. There should now be nine empty cells in the MCE. We’re going to make the
first Configuration represent the eye looking straight ahead through the lens, at an object
located far away. The second Configuration will represent the eye looking slightly down
through the lens, at a mid-range object. Finally, the third Configuration will represent the
eye looking far down, at a very near object. Changing the object distance is handled with a
THIC operand (changing the thickness of Surface 0) and changing the eye’s up-down angle
is handled by changing the Tilt About X (which is Parameter 3) of Surface 4 (the Coordinate
Break surface). Below is a table showing how the MCE should be filled in:
We’ve now got an eyeglass lens and an eyeball, and we’ve set the eyeball so that it rotates
in a realistic manner. There’s one more minor step that will help make our layout plots
easier to understand: we need to set the Global Coordinate Reference Surface to one that is
before the Coordinate Break in the Lens Data Editor (LDE). The idea here is that after our
Coordinate Break (surface 4) the rest of the surfaces in the LDE will be tilted some amount,
relative to the surfaces before the Coordinate Break.
When we make layout plots, we would like to have the plots showing the eyeglass lens
staying in place, while the eyeball rotates (instead of having the eyeball stay in place while
the eyeglass moves around the eye). To ensure that this happens, we go to System|General
and click on the Misc. tab. Then set the Global Coordinate Reference Surface to a value of 4
or lower (representing a surface before the Coordinate Break takes place in the LDE).
A quick check of the 3D Layout (with First Surface set to a value of 1; Rotation X, Rotation
Y, and Rotation Z values set to 0; Configuration set to All; and Offset Y set to -50) shows
that something is not quite right:
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
The problem is that as our eye model rotates down, it’s not really “looking” downward. This
is because the Field value is remaining the same as the eye rotates, and what we want is for
the Field to change so that the focused beam always hits the exact same part of the retina
(this focal point on the retina is called the fovea centralis). So what we really want to keep
constant is the image height, not the field angle. To do this, we’re going to change our Field
Type from “Angle(Deg)” to “Real Image Height.”
We want the position of our on-axis image to remain unchanged after we make this Field
Type switch, so the first thing we’ll do is check to see where the on-axis image is formed.
This information is calculated in the Spot Diagram:
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
You can see that just under the actual spot diagram plot, there is a measurement of the (X,
Y) location of the reference point (I’ve chosen a Chief Ray reference for my spot diagram)
on the image surface. We see here that the Chief Ray intercepts the image surface at an X
value of 1.462, therefore we will use a Real Image Height value of X = 1.462:
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
With our Field Data set up this way, we will be guaranteed that, irrespective of which
configuration we choose, the Chief Ray will intercept the image surface (that is, the retina)
at X = 1.462mm, Y = 0.0. This is a good simulation of the fact that no matter where the
human eye rotates, the center of vision is always in the same exact spot on the retina (the
fovea centralis).
Here is a 3D Layout plot showing the system from a side view for the 3 configurations (Far,
Mid, and Near object distances):
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
The MTF curves and Diffraction Images for our system’s three configurations are shown
below in order from Far to Near:
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
Note that because our model does not include accommodation by the crystalline lens (to
adapt to the change from far to near object distances) the system shows very poor
performance for mid-range and near objects, as we would expect in a presbyopic patient,
for example.
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
Prepare to Optimize
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:
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.
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
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
Optimizing The PAL
At this point, all the hard work of the design is complete. The attached file,
“Human_Eye_Model.ZMX,” represents all the above work to this point.
The one thing left to do is to optimize the design by going to
Tools|Optimization|Optimization and then clicking the Automatic button.
After some time, ZEMAX will finish optimizing and you’ll be left with an interesting, freeform, Progressive Addition Lens (PAL):
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
The MTF curves and Diffraction Images for our newly-optimized system’s three
configurations are shown below in order from Far to Near:
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com
Summary and Attachments
We used ZEMAX to model a human eye using realistic parameters, including a gradient
refractive-index crystalline lens, offset pupil, curved retina, and off-axis field angle. We then
provided for a realistic rotation of this model and used this rotating eye model to design a
progressive addition lens (PAL).
Human_Eye_Model.ZMX
Human_Eye_Model.SES
Note: Attachments are available from the ZEMAX Knowledge Base online:
http://www.zemax.com/kb/articles/186/7/How-to-Model-the-Human-Eye-inZEMAX/Page7.html
Copyright © 2007 Michael D. Tocci, Contrast Optical Design & Engineering, Inc. All Rights Reserved.
www.contrastoptical.com