Modelling the eye III: The lens
From two simple domes to a gradient-index lens: ciliary muscle, zonules, OCT, cataracts and presbyopia in interactive 3D.
Published
In Part 1 we shaped the cornea, and in Part 2 we added a living aperture. Light can now enter our model, but there is still a problem: focusing on a mountain requires a different adjustment from reading the words on your phone.
A camera often solves this by moving its lenses, whereas the eye mainly changes the shape of the crystalline lens, which sits behind the iris. This mechanism, called accommodation, relies on a ring of muscle around the lens and has a surprising feature: focusing up close involves releasing some of the pull that keeps the lens flattened.
We’ll build it from a simple shape, add an optical interior and then the machinery that moves it, before exploring how a real lens is measured and what happens when it loses transparency or flexibility.
First approximation: Two opposing domes
The dome we built in Part 1 gives us a starting point. There we used to change its asphericity; here we can make a second dome, turn it around and bring the rims together to form our first biconvex lens.
Because the front of a relaxed lens is flatter than the back, we give the two domes different central radii: 10.2 mm anterior and 6 mm posterior, borrowed from the unaccommodated Navarro schematic eye (1985). These reference values set the proportions rather than describing universal anatomy. We keep and a 9 mm rim diameter for now, so we are using Navarro’s radii without reproducing its aspheric prescription.
const front = new THREE.Mesh(createTeachingCap(10.2), frontMaterial);
const back = new THREE.Mesh(createTeachingCap(6), backMaterial);
back.rotation.y = Math.PI;
// Both rims lie at z = 0: the two domes meet here.
As the domes slowly separate and rejoin, rotate the view and follow the grid around their edges. The rims meet, but their slopes do not, leaving a sharp ridge between two separate meshes.
Round the equator and add a material
A real lens has a rounded equator where its front and back meet, so that ridge is our next problem. Smoothing the normals would soften its appearance without changing the silhouette, so we need to reshape the profile itself.
We keep the central spherical patches and join each to the equator with a short cubic Bézier curve, using Three.js’s CubicBezierCurve. One control handle follows the dome’s tangent while the other follows the optical axis, bringing both halves to a common tangent at the equator. We can then revolve the combined profile to make one closed surface.
const blend = new THREE.CubicBezierCurve(
domeEdge,
domeEdge.clone().add(new THREE.Vector2(dr, dr * slope)),
new THREE.Vector2(equatorRadius, handleHeight),
new THREE.Vector2(equatorRadius, 0),
);
// Sample both halves into one profile, then revolve it.
const normalizedProfile = profile.map(
p => new THREE.Vector2(p.x / 4.5, p.y / 2),
);
const geometry = new THREE.LatheGeometry(normalizedProfile, 96);
geometry.rotateX(Math.PI / 2); // align the optical axis with z
We give the joined lens a 4 mm central thickness, another relaxed Navarro value, and retain the illustrative 9 mm diameter. The blend handles and thickness split remain drawing choices, so this gives us a smooth approximation rather than a fit to a measured peripheral lens.
Dividing the profile’s radial and axial coordinates in millimetres by 4.5 and 2 prepares it for the scale below. We can then reveal a transmitting material over the unfilled grid, keeping the shape fixed while adding low roughness, a faint warm tint and procedural reflections.
const lens = new THREE.Mesh(geometry, clearLensMaterial());
lens.scale.set(4.5, 4.5, 2); // unit mesh → 9 mm wide, 4 mm thick
Inside clearLensMaterial(), Three.js’s physical-material shader uses an approximate relative index of to suggest lens tissue immersed in ocular fluid. We also shorten the transmission path toward the equator with an elliptical chord estimate. Together with tint and roughness, these choices give the lens its appearance, but they do not calculate its internal optical gradient.
Drag the divider to compare the grid on the left with the transparent surface on the right. Understanding what light does inside this shape requires another model.
Give the lens an interior: GRIN
Inside its elastic capsule, the lens contains elongated fibre cells arranged into an outer cortex and an older central nucleus. Here, nucleus means a region of the lens rather than a cell nucleus. New fibres are added throughout life, while mature fibres lose their nuclei and other organelles. In this tissue, which has no blood vessels, that organisation and the arrangement of densely packed crystallin proteins reduce microscopic index variations that would scatter light (Bassnett et al., 2011).
Transparency does not mean the index is uniform: it generally rises from cortex to centre, where light travels more slowly. This gradient refractive index, or GRIN, contributes to optical power and aberrations alongside surface curvature, and MRI measurements and MRI-derived index estimates indicate that both shape and index distribution change with accommodation (Khan et al., 2018).
This connects back to Part 1, where internal ocular optics could partially compensate corneal aberrations in young eyes (Artal et al., 2001). Because that balance involves the whole eye, strengthening the gradient of an isolated lens does not automatically improve the retinal image.
Following a ray shows how the gradient contributes: it changes direction according to Snell’s law at a surface, then bends continuously inside. This smooth steering differs from scattering by irregular microscopic variations, and the next demo isolates it with a quadratic index profile:
Optional: The index profile and its parameters
Here follows the optical axis, is the height above it, and and are the axial and equatorial semiaxes of the elliptical section where the formula applies. We choose , and , giving a central index of when . For the surrounding medium we use , approximating the aqueous and vitreous in this single-wavelength example. These parameters define a teaching profile rather than a fit to an individual’s GRIN.
Follow the highlighted upper ray as you switch between Uniform and GRIN. The dashed rays provide a reference through the same surfaces at a uniform index of , while the golden rays follow the selected gradient. The coloured contours join points of equal index rather than marking tissue boundaries.
Follow the highlighted upper ray and compare its golden tip with the dashed path on the right. The gradient adds bending inside the lens.
Quadratic profile and indices chosen for the model, not individual measurements. Colours encode index; contours are not anatomical layers.
To calculate these paths, we apply Snell refraction at both surfaces and integrate numerically through the interior. Tests check the uniform case against exact intersections and paraxial thick-lens optics, then compare the GRIN rays with an independent integration method as the step size decreases. These checks validate the teaching calculation, while real lenses have more complex profiles that change with age.
Optional: Where the published models go further
The literature follows a similar progression, but each model answers a particular question:
| Model | What it adds |
|---|---|
| Navarro, Santamaría & Bescós (1985) | An aspheric schematic eye with accommodation-dependent surface geometry and a spatially uniform equivalent lens index. |
| Liou & Brennan (1997) | A finite schematic eye with an asymmetric GRIN lens and biometric geometry; a reference optical design, not an accommodation controller. |
| Navarro, Palos & González (2007) | A customisable GRIN formulation fitted to measured isolated lenses, including age-related index profiles. |
| Sheil, Bahrami & Goncharov (2014) | Couples equal-index contours to the outer lens shape when modelling accommodation. |
| Jaimes-Nájera et al. (2020) | A single-function model linking a smooth GRIN distribution and outer lens shape across model accommodation states. |
Our demos separate mesh construction, ray bending and accommodation. Reproducing a published eye would require its surfaces, indices, distances and accommodation rules to be validated together. An optical prescription still would not supply muscle forces or cataract scattering, so we now turn to the structures that move the lens.
The ciliary muscle: Pull less to focus closer
The ciliary body surrounds the lens and contains the smooth ciliary muscle that drives accommodation. In cross-section, this muscle forms a rough wedge with outer longitudinal, intermediate radial or reticular, and inner circular regions whose fibres interweave as parts of one muscle.
Along the body’s inner surface, the ciliary processes form vascular, epithelial folds involved in aqueous humour production. These are distinct from the muscle fibres. The fine zonules connect the ciliary apparatus to the capsule, attaching across anterior, equatorial and posterior lens regions (Bassnett, 2021).
In the classical Helmholtz account of accommodation:
- For distance, the ciliary muscle relaxes while zonular tension holds the lens in a relatively flatter configuration.
- For near, the muscle contracts and the ciliary ring narrows, reducing the main lens-flattening zonular load so the lens and capsule can adopt a rounder configuration.
- As the lens becomes thicker centrally and its equatorial diameter decreases, its optical power increases.
The lens thus changes shape without a focusing muscle of its own, while the zonules remain attached. Their real force distribution is more complex than our radial spokes, but the model preserves the essential relationship: the ring contracts while the lens rounds up. Imaging studies measure both changes during accommodation (Richdale et al., 2013).
To show that movement, we reuse our rounded 9 mm × 4 mm lens and narrow it as it thickens, preserving the mesh volume. The zonules attach to this surface while the iris follows its anterior contour. The cataract comparison and final assembly also use this profile, while the separate GRIN diagram retains its simpler ellipse.
Removing the iris and outer wall exposes the ciliary body, its inward-facing brown processes and the yellow zonules passing between them. The zonules fan onto the capsule, represented here by the lens surface, while the divider reveals a colour map of the interwoven muscle regions within the anterior wedge.
As the view alternates between a distant landscape and a nearby book, watch the inner ciliary tissue move inward and slightly forward as the lens rounds up. The bottom-right readout gives the modelled response driving this deformation, rather than measuring the mesh’s optical power. Rotate or pause to inspect the connections, and drag the divider to reveal the muscle regions.
Drag the divider: muscle map on the left, tissue on the right. Illustrative focus and motion, not a measurement of force or optical power.
This sequence maps – onto illustrative changes in shape, with simplified muscle boundaries, folds and fibre paths. It illustrates movement without solving optical power or tissue mechanics, so fibre length does not measure zonular force.
In code, we allocate the geometry once and animate it by deforming the muscle and updating the existing fibre buffers. A first-order easing step keeps the transition smooth:
const tau = 0.25; // seconds: an animation parameter
shownAccommodation += (targetAccommodation - shownAccommodation)
* (1 - Math.exp(-dt / tau));
The quarter-second value sets the pace of this animation rather than a universal physiological response time, and the demo respects the browser’s reduced-motion preference.
How OCT measures lens shape
So far, we have chosen a plausible shape. Optical coherence tomography (OCT) gives us a way to compare it with measurements, using interference between returning light and a reference beam to resolve depth. Scanning across the eye produces a cross-section, or B-scan, and anterior-segment systems can image the lens surfaces through the area of the pupil accessible to the instrument.
For example, Pérez-Merino et al. (2015) used OCT volumes to reconstruct both lens surfaces during accommodation. Figure 3(a) compares relaxed and accommodated scans, while Figure 3(b) shows departures from fitted spheres in the central of the relaxed eye. Those departures reveal asymmetries that our surface of revolution leaves out.
Recovering the physical shape takes more than reading distances from the scan, because OCT measures optical path length and the beam has already refracted through the structures in front. The reconstruction therefore needs refractive-index assumptions and distortion correction. Image brightness describes the returned signal rather than a direct GRIN or transparency map, with MRI providing complementary information about the lens and ciliary apparatus.
From distance to dioptres
These shape changes help focus the more divergent rays arriving from a closer object, which require more optical power to focus on the retina. Starting from an eye relaxed and focused at infinity, the additional demand is approximately the reciprocal of object distance in metres:
A target at therefore asks for about , rising to at and at . These distances describe the demand, or stimulus, while the response is what the eye actually supplies and may fall short depending on viewing conditions.
To follow the focus without tracing every surface, we represent the whole eye with one reduced-eye element. We use Emsley’s conventional distance power and image-space index (Harris, 2009). The equivalent element represents cornea and lens together, rather than assigning to the lens or simply adding the powers of two separated lenses.
In the paraxial approximation, the outgoing vergence is the incoming vergence plus the optical power. With a near demand and response , the image distance is:
We measure distances from the equivalent principal plane and fix the retina behind it. Although this reduced-eye distance is not anatomical axial length, it lets us see the relationship clearly: when response matches demand, the focus stays on the retina.
Try moving the target closer below: the central symbol changes shape to indicate increased whole-eye power, while the focus remains in place.
Optical schematic: the symbol represents the whole eye. It does not predict visual acuity or trace rays through the 3D lens.
Here, focus stays in place because the paraxial model assumes an ideal response with enough accommodative range. It locates focus without modelling aberrations, diffraction or GRIN, so it cannot predict image quality or visual acuity.
Who tells the muscle to move?
For the ciliary muscle to make this adjustment, it receives mainly parasympathetic input. Preganglionic fibres from the Edinger-Westphal complex travel with cranial nerve III to the ciliary ganglion, where the pathway continues through postganglionic fibres in the short ciliary nerves to the muscle (McDougal & Gamlin, 2015).
This route also serves the pupil circuit from Part 2, where the iris sphincter adjusts the aperture. Although the ciliary muscle instead changes the load on the lens, the two often act together when we look near.
Together with convergence, accommodation and pupil constriction form the near response. The smaller pupil can increase depth of focus, although it cannot restore lens flexibility. Our focus diagrams isolate accommodation to make its contribution clear, and the final assembly will add the accompanying pupil response.
Cataracts: Losing transparency
Focusing depends on transparency as well as shape. When lens proteins and fibre organisation change, they alter how light is scattered and absorbed, and a cataract, or lens opacity, can reduce contrast and sharpness, cause glare and make colours appear faded or yellowed.
The pattern depends on where the opacity develops. Nuclear cataracts affect the centre and may yellow or brown, whereas cortical opacities often form peripheral spokes. Posterior subcapsular opacities lie just in front of the posterior capsule, and all three patterns can coexist rather than following a fixed sequence (Aliancy & Mamalis, 2017).
The four lenses below share their geometry, lighting and viewing angle, so rotating them together lets you compare each opacity pattern with a clear lens.
Matching geometry and lighting. Illustrative patterns, not clinical grades or a simulation of vision. Several types can coexist in one eye.
What we see from outside is only part of the story: backscattered light reveals an opacity to an observer, while forward scatter affects the retinal image. These are not interchangeable measurements (Crnej et al., 2017), and the cloudiness shader here illustrates appearance without calculating multiple scattering, glare or a person’s view through the lens.
When cataract disrupts daily activities enough to warrant surgery, the cloudy lens is removed and usually replaced by an artificial intraocular lens (National Eye Institute).
NOTE
Before replacement lenses
Claims that cataract surgery began in pharaonic Egypt remain disputed (Blomstedt, 2014). Among historical treatments, couching displaced the cloudy lens from the visual axis, clearing the obstruction but removing its focusing contribution and carrying serious risks. Later extraction removed the lens itself, while modern surgery usually replaces its optical role with an implant. Harold Ridley’s first intraocular lens implantation in 1949 marked a key step toward that approach (Leffler et al., 2020).
Presbyopia: When the lens cannot keep up
A lens can also remain clear while losing the ability to change focus. As accommodation declines with age, sustained near work becomes difficult: this is presbyopia, a different change from cataract even though both can be present.
That loss of accommodation does not simply mean the muscle has stopped working, since ciliary contraction can persist in older eyes (Strenk et al., 1999). Changes in the lens’s mechanical properties play a major role, alongside its continued growth and the surrounding geometry. Donor-lens experiments show a marked age-related loss of the ability to change optical power (Glasser & Campbell, 1998).
We can explore what this means for focus by returning to our reduced eye and limiting its response to an available accommodation:
const response = Math.min(demand, availableAccommodation);
const unmetDemand = demand - response;
Start with a target at and only available. Because the target demands , the model falls short by and the focus lies behind the retina. As you move it out to , the demand falls back within the available range.
Optical schematic: the symbol represents the whole eye. It does not predict visual acuity or trace rays through the 3D lens.
This reserve is a model parameter rather than an age scale or clinical test, and the calculation assumes accurate distance focus. In a real eye, refractive correction, pupil size, depth of focus and the task also affect near vision.
Bring the three parts together
We can now bring the three parts into one scene: the cornea provides the front refracting surface, the iris sets the opening, and the lens changes shape behind it.
The aqueous-filled anterior chamber lies between the posterior cornea and iris, communicating through the pupil with the posterior chamber, while the lens sits behind the pupil. Around its edges, the cornea continues into the sclera at the limbus and the iris root joins the ciliary body near the chamber angle. We remove part of these boundaries to see inside, but the chamber is enclosed in the intact eye (AAO EyeWiki, Gonioscopy).
Watch the lens thicken and the pupil constrict as the target moves near, then relax again as it returns to distance. The sequence illustrates the near response at constant lighting, using illustrative pupil ranges and timing, though convergence would need a second eye and is omitted. Rotating or pausing the view lets you inspect how the structures meet.
This assembly brings the conic cornea, pigmented iris and deforming lens together with the ciliary apparatus. The ciliary body tapers behind the muscle and inward-facing processes, ending at the truncated edge of our anterior-segment model. While its dimensions and materials remain illustrative, the distinction between appearance and optics also remains: GRIN ray bending is calculated only in the separate demonstration above. The clear 3D lens uses an appearance shader, so joining these structures does not combine their optical calculations or predict a retinal image.
Our fixed front surface, adjustable aperture and changing lens each contribute to focus. In the real eye, they work together to form the retinal image.
References
-
Bassnett, S., Shi, Y., & Vrensen, G. F. J. M. (2011). Biological glass: structural determinants of eye lens transparency. Philosophical Transactions of the Royal Society B, 366, 1250–1264.
-
Khan et al. (2018). Change in human lens dimensions, lens refractive index distribution and ciliary body ring diameter with accommodation. Biomedical Optics Express, 9, 1272–1282.
-
Purves et al. (2001). The formation of images on the retina. Neuroscience, 2nd edition. The basic optics and classical mechanism of accommodation.
-
Richdale et al. (2013). Quantification of age-related and per diopter accommodative changes of the lens and ciliary muscle in the emmetropic human eye. Investigative Ophthalmology & Visual Science, 54, 1095–1105.
-
Harris, W. F. (2009). General approach to the sensitivity of the optics of an eye to change in elementary parameters with application to the Gaussian optics of a reduced eye. South African Optometrist, 68, 166–175. Includes the conventional Emsley reduced-eye parameters.
-
McDougal, D. H., & Gamlin, P. D. R. (2015). Autonomic control of the eye. Comprehensive Physiology, 5, 439–473.
-
Strenk et al. (1999). Age-related changes in human ciliary muscle and lens: a magnetic resonance imaging study. Investigative Ophthalmology & Visual Science, 40, 1162–1169.
-
Glasser, A., & Campbell, M. C. W. (1998). Presbyopia and the optical changes in the human crystalline lens with age. Vision Research, 38, 209–229.
-
Bassnett, S. (2021). Zinn’s zonule. Progress in Retinal and Eye Research. Zonular organisation and capsular attachments.
-
StatPearls. Anatomy, head and neck, eye ciliary muscles. Ciliary-body anatomy and muscle fibre orientations.
-
Pérez-Merino et al. (2015). OCT-based crystalline lens topography in accommodating eyes. Biomedical Optics Express, 6, 5039–5054.
-
Huang et al. (1991). Optical coherence tomography. Science, 254, 1178–1181.
-
Aliancy, J. F., & Mamalis, N. (2017). Crystalline lens and cataract. Webvision, University of Utah.
-
National Eye Institute. Cataracts; Cataract surgery.
-
Artal, P., Guirao, A., Berrio, E., & Williams, D. R. (2001). Compensation of corneal aberrations by the internal optics in the human eye. Journal of Vision, 1, 1–8.
-
Crnej et al. (2017). Methods for assessing forward and backward light scatter in patients with cataract. Journal of Cataract & Refractive Surgery.
-
Moorfields Eye Hospital. Cataract surgery; Cataract service: patient information, p. 4.
-
American Academy of Ophthalmology, EyeWiki. Gonioscopy. Anterior chamber angle, scleral spur and iris-root relationships.
-
Blomstedt, P. (2014). Cataract surgery in ancient Egypt. Journal of Cataract & Refractive Surgery, 40, 485–489.
-
Leffler, C. T., et al. (2020). The history of cataract surgery: from couching to phacoemulsification. Annals of Translational Medicine, 8, 1551.
