This example demonstrates how to model the human eye, design a multifocal contact lens for presbyopia correction, and how to analyze and visualize its performance in a realistic scene using the eye model. The contact lens is optimized with Ansys Zemax OpticStudio to balance vision quality between near, intermediate, and far object distances, then the model is exported to Ansys Speos for a full system-level analysis, including intraocular scattering.
[[NOTES:]] Software Prerequisites
To be able to use this example, the following tools and assets need to be installed on your computer:
- Ansys Zemax OpticStudio 2023 R2 or later
- Ansys Speos 2023 R2 or later
Understand the simulation workflow and key results
Optical models of the human eye have been widely used in vision science as computational tools. Applications include retinal image formation analysis under different conditions, ophthalmic instrument design to examine the eye, as well as visual aid design for patients with vision loss. Since presbyopia, the gradual loss of the ageing eye’s ability to accommodate to near object distances, affects a substantial part of the population, correction design has gained increasing interest in recent years. Multifocal simultaneous vision contact lenses are now the preferred method of correction due to the demanding lifestyle of the digital era, their cosmetic advantages over spectacles, and the increased practitioner confidence to fit them.
Step 1: Modelling the human eye in Ansys Zemax OpticStudio
The first step is to implement a schematic model that simulates the average human eye for distance foveal imaging. For this purpose, we use the Chromatic Aspherical Gullstrand Exact (CAGE) model, that relies on the paraxial gold standard Gullstrand Exact No I scheme, but also includes aspherical surfaces and a chromatic dispersion model to accurately describe both the monochromatic and chromatic aberrations, as well as diffraction effects in the human eye.
Step 2: Designing multifocal contact lens for presbyopia correction
Since the CAGE model describes the unaccommodated eye, it can also be used as a representation of a presbyopic eye, which has lost its ability to focus on near object distances due to aging. In order to restore vision quality at a wide distance range, we design, in this step, a multifocal simultaneous imaging contact lens addition for presbyopia correction.
Step 3: Analyzing and visualizing system performance in Ansys Speos
Next we demonstrate the import of the created eye model, with multifocal contact lens, into Speos. We investigate system performance by: using Interactive simulation; simulating true color results of an eye chart for different distances directly on the curved retina; visualizing the actual ray propagation with Light Expert and by checking the energy density distribution in the whole model.
Step 4: Intraocular scattering model
Light will undergo some scattering as it propagates through the human eye, with scattering contributions from several sources, including the cornea, lens and retina. In this step we add intraocular scattering to the lens and check the influence it has on the vision in the eye model system.
Run and Results
Instructions for running the model and discussion of key results
Step 1: Modelling the human eye in Ansys Zemax OpticStudio
Presbyopia, also known as age-related farsightedness, is the physiological insufficiency of the aging eye to accommodate and focus on close objects. Therefore, as a first step, we must implement an eye model that accurately represents the average unaccommodated human eye for distance foveal imaging. Due to the complex structure of the eye, dozens of eye models have been published in the literature, which largely vary in complexity, from simplified reduced models to complex wide-angle schemes with aspherical surfaces or gradient index materials. However, none of these models fit every purpose, rather the model selection has to be based on the simulation task.
In this example, we base our model on the gold standard paraxial scheme, the Gullstrand Exact Number I model. This is an exact eye model, consisting of 6 spherical surfaces, 2 for the cornea and 4 for the lens to mimic the index gradient of the natural crystalline lens using double-shell geometry with homogeneous media. This model can be used to evaluate paraxial properties and study refractive errors; however, based on the Spot Diagram and Siedel diagram analyses we can see that it overestimates the monochromatic aberrations of the eye.
To create a more accurate monochromatic model, we define aspherical surfaces by using the Conic coefficient of the Standard surface type in OpticStudio. The Conic coefficients are selected to best fit to real measurement data published in the literature. With this modification, the model can now be used to study the retinal illumination as well as the image size on the retina, even in case of large pupil size and off-axis apertures. Based on the Spot Diagram and Siedel diagram analyses, this model reproduces the known low-order monochromatic aberrations; however, it still does not include chromatic aberrations, despite the severe longitudinal chromatic aberrations of the human eye.
To include chromatic dispersion in the model too, we add a new Material Catalog for the eye, where we use the Herzberger formula and fit its coefficients to experimental data based on the literature. With this the paraxial properties of the Chromatic Aspherical Gullstrand Exact (CAGE) model at the central wavelength are the same as in the initial Gullstrand Exact No I model, but the added asphericity and chromatic dispersion allows us to accurately describe monochromatic and chromatic aberrations, as well as diffraction effects in the eye. Besides, the CAGE model predictions are in good agreement with independent in-vivo measurements of spherical aberration and psychophysical modulation transfer function measurements.
Finally, in order to simulate the subject’s vision, we use the Extended Diffraction Image Analysis tool and customize the settings to mimic standard letter-recognition based vision tests. We use the LETTERF.IMA file and set the File Size in image space to 25 um, which, based on the effective focal length of the human eye, corresponds to 5 arcmin visual angle, and, therefore, the standard visual acuity value of 1.
- Open the human eye model in OpticStudio ( ChromaticAsphericalGullstrandExact.zprj ).
- Observe how the model is set up and analyze its performance on the Spot and Siedel Diagrams.
- Simulate vision quality using the Extended Diffraction Image Analysis tool.
Step 2 : Designing multifocal contact lens
Now that we have implemented an accurate model of the unaccommodated human eye, we can use this model as a representation of the presbyopic eye and design a multifocal contact lens for presbyopia correction based on it. First, to analyze the patient’s vision quality at different viewing distances, we set up a multi-configuration system in OpticStudio, where we vary the Thickness of the Object surface from Infinity, representing far vision, to 1 m corresponding to intermediate vision at monitor viewing distance, and to 35 cm representing near vision at reading distance. Using the Extended Diffraction Image Analysis tool with the same settings, corresponding to the standard visual acuity value of 1, we can see how the vision quality degrades with the decreasing viewing distance.
To correct this and restore vision quality at a wide range of object distances, we design a multifocal simultaneous vision contact lens. In this example, we use a concentric design consisting of 3 zones: a spherical center near zone, an aspheric intermediate zone to provide smooth transition, and a spherical peripheral distance zone. To create such a lens, we model the front multifocal surface of the contact lens by a User Defined Surface type with the us_multi_zone_asphere.dll , which describes the sag profile by a series of annular aspheric zones, which are shifted to ensure a continuous sag at all zone boundaries. In this model the back of the contact lens is perfectly fitted to the front of the cornea, without any air gaps.
Even though these contact lenses are simultaneous vision contact lenses, which means that the zones are used and create images on the retina at the same time; the different zones enable focusing to different viewing distances, thus they must be optimized accordingly. To do so, we set up Surface Apertures on the front of the contact lens in the Multi-Configuration Editor to restrict each configuration to 1 specific zone and the corresponding object distance.
According to the design shape we set the Radius of all zones and the Conic coefficient of the intermediate aspheric zone to be variables. With the Merit Function we target the smallest RMS Spot Size as the Image Quality metric, and we apply Rectangular Array Pupil Integration with the Delete Vignetted option checked to force the separate optimization of the zones. The optimization results in a setup, where the Radius of curvature increases from the center near zone towards the peripheral distance zone, which means decreasing power from near to far object distances as expected.
|Radius [mm]||Conic [-]|
Once the design is optimized, we delete the previously set surface apertures, as in real use cases the contact lens is used as a simultaneous vision contact lens, so all the zones create images on the retina at the same time. To analyze how the contact lens changes the patient’s vision quality, we use the Extended Diffraction Image Analysis tool. Based on the results, we can see that this multifocal contact lens compromises far vision to achieve a much better quality at near object distances, and restore and balance the visual experience across a wide range of distances.
Finally, we export the eye and contact lens models to a CAD file and pass it to Speos for further performance analysis under broadband illumination in a more realistic scene. As in Speos a complex eyeball model is created, which describes the accurate shape of the vitreous body and the ciliary muscles holding the crystalline lens, we only hand over data for the contact lens, cornea, and crystalline lens. Accordingly, we use the Export CAD File tool and save the model from the contact lens up until to the vitreous body to a STEP file with the following settings. To ensure a flawless CAD file exchange, untick the Use Parasolid Libraries option under the General tab of the OpticStudio Preferences, which will revert back to the SMS CAD libraries (see Important Model Settings ).
- Open the contact lens design in OpticStudio ( CAGE_contactLens_multizoneAsphere.zprj ).
- Observe how the multi-configuration is setup to analyze different viewing distances.
- Check how the Merit function is set up for the optimization.
- Simulate vision quality using the Extended Diffraction Image Analysis tool.
- Use the Export CAD File tool to save the model from Surface 2 us_multi_zone_asphere to Surface 9 vitreous to a STEP file ( CAGE_contactLens_withoutVitreous.stp ) for further analysis in Speos.
Step 3: Analyzing and Visualizing System Performance in Ansys Speos
Once we have created the human eye model and multifocal contact lens in OpticStudio, we will import the model to Ansys Speos. In Ansys Speos it is important to have the several bodys fitted well into each other to avoid meshing problems. Two scripts are available in the project data to set up the model easily. The first script Renaming is used to change the naming of the imported bodies automatically. With the second script Model setup the pupil diameter can be adjusted and the imported bodies are combined with the "Vitreous humor" and "Iris". Also the materials are applied to the appropriate bodies.
- Open ChromaticAsphericalGullstrandExact_contactLens.SMS.scdocx in Ansys Speos.
- Untick the Lightweight Import in the Speos Options (see Important Model Settings ).
- In the structure tree click on Origin_ZOS import axis system.
- Under the Assembly tab click on “File” and import the CAGE_contactLens_withoutVitreous.stp file from OpticStudio. Imported data appears in the 3D view and each part is listed as a body in the structure panel.
- Select "CAGE_contactLens_withoutVitreous" in the structure tree and click on Move.
- Click on the blue arrow of the handle and select Up to from the small dropdown menu.
- Then select the X axis of the “Origin_ZOS import” coordinate system. The imported parts are positioned correctly.
- In the groups panel run the script Renaming . The imported parts are automatically renamed.
Change pupil diameter ("iris Radius") and remove potential overlapping regions between bodies.
In Groups panel the Script Parameter "IrisRadius" (in mm) can be adjusted. Click on the Value and type in 2 to get a 4 mm pupil diameter as used before in Ansys Zemax OpticStudio. The script Model setup starts automatically and also applies the materials to the respective eye m odel parts.
Now we use
to check the focus of the light rays. In this example an Interactive Source with 615 nm is used, starting from a point at different distances from the eye model. The wavelength of the Interactive Source can be adjusted.
In the Simulation Panel there is an Interactive simulation defined with all geometries of the “Human Eye CAGE ZOS” inside and Interactive.1 as source.
- Double click on the source Interactive.1. In the Definition window wavelength and sampling of the source can be adjusted.
Select objects for Start – Geometries
and change to another distance by selecting “Origin_test image_1m” or “Origin_test image_0.35m” from the structure tree. The interactive simulation automatically changes accordingly.
- Unhide the Source Interactive.1
The test image for Direct Simulation is defined as Display source for 0.35 m, 1 m and 5 m (to represent infinity).
To measure the irradiance on the curved retina a 3D irradiance sensor is used. This sensor allows you to analyze the light contributions for each face of a geometry. The sensor is set directly on the vitreous humor in the region of the fovea (point of sharpest vision). The resolution is defined by the model meshing.
For the meshing of the sensor surface we use local meshing. The maximum resolution of the eye is 0.004 mm and results from the distance of the cones in the fovea. The meshing is defined by triangles, so we set as step value 0.005 mm to get the 0.004 mm resolution.
- Copy paste “Direct.Eye chart” three times and rename them to “Direct.Eye chart.with contact lens_0.35m”, “Direct.Eye chart.with contact lens_1m” and “Direct.Eye chart.with contact lens_5m”.
- Double click on the created Direct simulations and change the Display source accordingly.
- The simulations can be run with CPU or with GPU Compute to shorten simulation time. The results are available under Speos Results: Direct.Eye chart_Xm.3D Irradiance.1.xm3 and Direct.Eye chart.with contact lens_Xm.3D Irradiance.1.xm3
- Compare simulation results for different distances.
Use Light Expert tool to visualize the actual ray path from the simulation. Therefore set light expert to True during Direct simulation and run it with Compute .
After running the simulation, open the result and set a specific area under Measures to visualize where the rays come from.
With the 3D Energy Density Sensor we analyze the energy distribution of the eye model. You can c heck volumetric light propagation, light density and hot s pots . The blue box around the eye model shows the dimensions of the sensor.
- Copy paste “Direct.Eye chart” Simulation and name it “Direct.Eye chart.3D Energy Density”.
- Select “3D Energy Density.1” as Sensor for the simulation.
- Select under Sources the Display source test image you want to simulate.
- Adjust the simulation Duration to 2h.
- Run the simulation with Compute . The results are available under Speos Results: Direct.Eye chart.with contact lens_Xm.1.3D Energy Density.1.vmp
Step 4: Intraocular scattering model
For now, we didn´t take the scattering into account, but there are several sources of scatter contributions in the human eye such as cornea with 30%, lens 40% and retina about 20%. In the following we will concentrate on the scattering of the lens. The scattering properties are essential for simulating glare effects on visual contrast sensitivity.
The lens bends (refracts) light rays that come into the eye to help us see, and is normally clear. If you have a cataract, your lens has become cloudy. It is like looking through a foggy or dusty car windshield. Things look blurry, hazy or less colorful with a cataract.
A normal aging crystalline lens has protein molecules of about 1-4 microns in diameter. The dominating light scattering process for particles of this size is Mie scattering. So, we will create two materials: one for scattering in a normal aging healthy lens and another for a cataractous lens.
The definitions will be based on the given values in the following table. Nuclear sclerosis cataract grade from 1-3 without diabetes .
|Scattering for||Particle radius [μm]||Particles / mm^3||Refractive Index of Particles|
|Normal aging lens||1.3||556||1.49|
To add scattering to the eye lens we, first need to define a material for the lens particles. This material is already available in the Speos input files. The refractive index for the lens particles is set to 1.49 following the publication . Then we add the lens particles to the lens inner and outer material by adding scattering properties in the User material editor .
- Open Speos input files and search for outer lens_with dispersion_abs ZOS.material
- Copy paste this file and rename it to outer lens_with dispersion_abs ZOS_particles.material
- Open the file, then add scattering properties by selecting Give particle specifications: Optical properties of the medium will be evaluated using MIE theory
- Click on + to add particle material and choose lens particles.material
- For particle distribution select Log normal distribution . Add Mean radius of 4.1 μm and 4071 as value for Total concentration (particles/mm3).
- In the simulation panel copy paste the material "outer lens"
Rename the material to
by right clicking on it. The others are already prepared.
- Double click on outer_lens.particles . In the definition panel for Volume properties File browse for outer lens_with dispersion_abs ZOS_particles.material file.
- Apply the material outer_lens.particles to the bodys “Lens Outer Cortex_copy” and “Lens Inner Cortex_copy”
- Apply the material inner_lens.particles to the body “Lens Nucleus_copy”
At first we compare a normal aging lens with scattering to one without scattering to see what difference it makes to the initial model.
- Copy paste “Direct.Eye chart” and rename it to “Direct.Eye chart_particles”. Double click on the created Direct simulation and delete the multifocal contact lens from the Geometries list.
- Check Interactive Simulation and then run “Direct.Eye chart_particles” Simulation with GPU compute to compare with the results without scattering in the lens. The results for the three distances can be found under Speos Results: Direct.Eye chart_Xm.particles.3D Irradiance.1.xm3
As we see for a normal aging lens the results without scattering are similar to these with scattering, therefore the initial eye model is a good approximation also without scattering. Next we will compare a healthy lens with scattering to a cataractous lens with scattering to analyse the impact.
- Apply the material outer_lens.particles cataract to the bodies “Lens Outer Cortex_copy” and “Lens Inner Cortex_copy”
- Apply the material inner_lens.particles cataract to the body “Lens Nucleus_copy”
- Copy paste “Direct.Eye chart” and rename it to “Direct.Eye chart_particles cataract”. Double click on the created Direct simulation and delete the multifocal contact lens from the Geometries list.
- Check Interactive Simulation and then run “Direct.Eye chart_particles” Simulation.
Comparison normal eye scattering and cataract scattering (Interactive Simulation)
- Copy paste the “Direct.Eye chart” Simulation twice, rename and exchange the Display Source to run results for the three distances 0.35 m, 1 m and 5 m. Use Compute or GPU Compute to shorten simulation time . The results are available under Speos Results: Direct.Eye chart_Xm.particles.3D Irradiance.1.xm3 and Direct.Eye chart_Xm.cataract.3D Irradiance.1.xm3
The results show, with cataract scattering the results are more blurry and there is also a color change.
- Check the 3D Energy Density results for cataract vision.
- Copy paste “Direct.Eye chart.3D Energy Density” and rename it.
- Select under Sources the Display source test image with the distance you want to simulate.
- Run the simulation with Compute . The result for 1m distance can be found in Speos Results folder: Direct.Eye chart_1m.cataract.Density.3D Energy Density.1.vmp
Compared to the previous results without scatter we can see that the light is more scattered and not so well focused on the retina.
In this article, we presented an efficient workflow for modelling the human eye, designing presbyopia correction, and analyzing the full system performance. In order to represent the presbyopic eye, an accurate model of the unaccommodated human eye was implemented in OpticStudio; and a multifocal simultaneous vision contact lens was designed based on this model to restore vision quality at a wide range of object distances. To analyze and visualize the imaging performance in a realistic scene with broadband illumination, the design was passed to Speos, and a system-level analysis was performed to evaluate vision quality. For the sake of completeness, the impact of intraocular scattering was also evaluated in both normal aging and diseased eyes.
Important Model Settings
Description of important objects and settings used in this model
Aperture definition and pupil size in OpticStudio
Since the pupil serves as the real aperture stop of the human eye, in OpticStudio, we model the pupil by a separate surface which is set to be the STOP surface, and we set the Aperture Type to Float By Stop Size so that we can define the aperture by the real pupil size. In this model, according to the average human eye, the Clear Semi-Diameter of the pupil is set to 2 mm.
To ensure a flawless CAD file exchange between OpticStudio and Speos, untick the Use Parasolid Libraries option under the General tab of the OpticStudio Preferences. This selection will revert back to the SMS CAD libraries.
To ensure a flawless running of the Speos scripts it is important to untick the Lightweight import in the Speos Options before importing the step file from OpticStudio.
Updating the Model With Your Parameters
Instructions for updating the model based on your device parameters
Custom eye model
In this example, we use the Chromatic Aspherical Gullstrand Exact model to accurately represent the average human eye for distance foveal imaging. For custom applications, different customized or even personalized eye models can be implemented if needed. For example, we can replace the front of the cornea with a Grid Sag surface to import corneal topography measurement data; or switch the front of the lens to a Zernike surface to match the monochromatic OPD to measured wavefront aberrations.
Contact Lens Design
This example demonstrates how to design a concentric multifocal contact lens using the User Defined Surface type with the us_multi_zone_asphere.dll in Ansys Zemax OpticStudio. To model other design shapes, one can take advantage of the various built-in Freeform surface types in Ansys Zemax OpticStudio, or define custom structures by new DLLs.
Illumination / Variation of light power
- The material files of the Human eye Model can be changed and adjusted, for example index and absorption variation.
- Cataractous material
- Changing scattering properties as mean radius of the particles, the standard deviation or total particle concentration.
Apply materials from library
There is also the possibility to apply materials by hand from the given Human Eye material library .
Select a body from the structure tree or 3D view, then right click on the respective material and select
Apply material to geometry
. Repeat this for each body under "CAGE_contactLens_withoutVitreous".
The materials in the library are defined as described in the following table.
Taking the Model Further
Information and tips for users that want to further customize the model
IntraOcular Lens Design
Similarly to this contact lens design application for presbyopia correction, IntraOcular Lenses (IOLs) can be designed in Ansys Zemax OpticStudio for curing cataract patients. The designed IOLs can be imported and analyzed in realistic scenes using the Ansys Speos human eye model.
Add scattering for other parts of the human eye model.
Additional documentation, examples, and training material
- P. G. Gobbi, Modeling the Optical and Visual Performance of the Human Eye, SPIE Press (2013).
- D. A. Atchison, L. N. Thibos, Optical models of the human eye, Clinical and Experimental Optometry, 99: 99–106 (2016).
- Y. C. Chen et al, Development of a human eye model incorporated with intraocular scattering for visual performance assessment, Journal of Biomedical Optics, 17(7):075009 (2012).
- M. Kaschke, K. H. Donnerhacke, M. S. Rill, Optical Devices in Ophthalmology and Optometry: Technology, Design Principles, and Clinical Applications, Wiley-VCH (2014).
- OpticStudio models of the human eye – Knowledgebase (zemax.com)
- How to model the human eye in OpticStudio – Knowledgebase (zemax.com)
Relevant Speos Ansys Learning Hub courses
- Ansys Speos Getting Started
- Ansys Speos Workflow and Geometry Management
- Ansys Speos Light Path Finder
- Toward Lightspeed Simulation Thanks to Multi-GPU Computing