Presets
Playback
Lens form
Glass
Light
Lens geometry
Object
Layers
Model checks
The science
Refraction at two spheres
Each ray is traced exactly: it is intersected with the first sphere, bent by Snell's law n1 sinθ1 = n2 sinθ2 in vector form, intersected with the second sphere and bent again. No small-angle approximation is used for the drawn rays, so you can see spherical aberration: rays near the edge focus closer to the lens than rays near the axis.
Thick-lens power
P = (n − 1) [ 1/R1 − 1/R2 + (n − 1) t / (n R1 R2) ], f = 1/PThe back focal distance measured from the rear vertex is f (1 − (n − 1) t / (n R1)). The image position is also found independently with a paraxial ray-transfer (ABCD) matrix; the page checks that the traced image and the matrix image agree.
Dispersion
The refractive index follows n(λ) = nd + k (1/λ2 − 1/λd2), with k fixed by the Abbe number V = (nd − 1)/(nF − nC). Blue light bends more, so fF is shorter than fC by about f/V.
Honest simplifications
- Meridional (2D) rays only: skew rays and coma/astigmatism of off-axis points are not shown, and the object tip is traced exactly while the image arrow uses the paraxial chief ray.
- Surfaces are perfect spheres without coatings; reflection losses and total internal reflection beyond the aperture are ignored (blocked rays are simply not drawn).
- The 3D page uses a thin-lens image formula measured from the lens centre; this page uses the exact thick-lens image, so values differ by a few millimetres.
- The vertical axis is stretched so thin lenses stay readable; the stretch factor is printed on the canvas.
What to try
- Load Magnifier: with the object inside the focal length the rays diverge and a virtual, upright image appears (dashed lines).
- Reduce the radius to 60 mm and watch the edge rays cross much nearer than the central ones in the aberration graph.
- Load Flint lens, strong colour and compare the blue and red focal points with the crown glass.
- Move the object past the focal length: the image jumps from virtual to real.