The human eye is often introduced as a focusing system that forms a sharp image on the retina, but real eyes are not perfect optical instruments.
Even when the average focal power is correct, different parts of the pupil and different wavelengths of light can focus at slightly different places.
These departures from ideal imaging are called aberrations. This calculator gives a simplified educational preview of two especially important ones:
spherical aberration and chromatic aberration.
In the simplest thin-lens approximation, optical power \(P\) in diopters is related to focal length \(f\) by
\[
P=\frac{1}{f(\text{m})}.
\]
If the focal length is measured in millimeters, then
\[
f=\frac{1000}{P}.
\]
So an eye with total power \(P=60\ \text{D}\) has an effective focal length of about
\[
f=\frac{1000}{60}\approx 16.7\ \text{mm}.
\]
That value is close to the distance from the eye’s effective optical power to the retina in a relaxed emmetropic eye. In reality the eye is not a single thin lens, because both the cornea and the crystalline lens contribute to refraction.
Still, an equivalent focal length is a very useful first model.
Spherical aberration appears because rays that pass through the outer part of a curved optical system do not focus at exactly the same axial point as rays near the axis.
In a simple positive spherical-aberration picture, marginal rays focus closer to the lens than paraxial rays. When the retina is positioned at the paraxial focus, the marginal rays have already crossed and spread again, producing a blur spot instead of a perfect point.
In this preview, the spherical focus shift is modeled with a simple built-in approximation
\[
\Delta f_s \propto D_p^2,
\]
where \(D_p\) is the pupil diameter. This captures an important qualitative truth: a larger pupil generally increases spherical aberration.
The retinal blur estimate is then taken to scale like
\[
c_s \approx \frac{D_p\,\Delta f_s}{f}.
\]
This relation comes from similar-triangle geometry. If the focus shifts by \(\Delta f_s\), then at the retinal plane the ray bundle has not yet collapsed to a point, so it forms a blur disk with diameter proportional to both the pupil size and the defocus amount.
Chromatic aberration comes from dispersion: the refractive power of the eye is slightly wavelength-dependent.
Blue light is refracted a bit more strongly than red light, so blue tends to focus slightly closer to the lens.
Red focuses slightly farther back.
In the preview, this is represented by a small fractional power spread:
\[
P_b=P(1+\chi), \qquad P_r=P(1-\chi),
\]
which gives two focal lengths
\[
f_b=\frac{1000}{P_b}, \qquad f_r=\frac{1000}{P_r}.
\]
The resulting chromatic blur estimate is then modeled as
\[
c_c \approx \frac{D_p\,|f_r-f_b|}{f}.
\]
For the sample input \(P=60\ \text{D}\) and \(D_p=4\ \text{mm}\), the equivalent focal length is about \(16.7\ \text{mm}\).
With the preview’s built-in spherical-aberration coefficient, the spherical contribution comes out to roughly
\[
c_s \approx 0.10\ \text{mm},
\]
which matches the example target well. That blur size is not meant to be interpreted as a precise clinical retinal measurement. It is a schematic estimate that helps visualize how paraxial and marginal focus positions can differ.
The animation is drawn as a compound-eye style schematic: the cornea and crystalline lens are shown explicitly, the pupil opening controls the ray heights, and the retina is drawn as a curved receiving surface. The actual calculations are still based on an effective focal length model, which keeps the math simple and readable while preserving the main optical ideas.
At a more advanced university level, these topics connect to Seidel aberrations, wavefront error, higher-order aberrations, retinal image quality metrics, and clinical aberrometry.
Real eyes are also affected by accommodation, aspheric corneal shape, lens gradient index, diffraction, scattering, and pupil-dependent wavefront structure.
But even with a simple model, two central lessons already become clear:
\[
\text{wider pupils usually increase aberration blur,}
\]
\[
\text{and different colors can focus at slightly different depths.}
\]
So this calculator is best viewed as a bridge between school-level geometric optics and more advanced visual optics:
it shows how an eye can be roughly in focus overall while still producing blur from non-ideal ray behavior.