🔭

Geometrical Optics Bench

Build a meridional optical system from lenses, refracting surfaces, mirrors and stops, then compare exact ray tracing (vector Snell's law) with paraxial ABCD matrices. Read off cardinal points, pupils, numerical aperture and the aberrations that the paraxial model leaves out.

Drag the object, elements or detector on the bench • Focus the bench and use ←/→ (Shift = 10 mm) to move the selected item
f′ Effective focal length
sᵢ Image distance
m Magnification
NA′ Image-space NA
σ RMS spot (exact)

Optical bench (meridional section) exact + paraxial

Light travels left → right. Vertical scale is stretched relative to z when the system is long: angles are not drawn true. Solid coloured: exact rays at each wavelength (they stop where they are vignetted, and turn orange at total internal reflection). Dashed white: paraxial rays. Gold: construction rays drawn with the principal planes. Dashed arrows: virtual images.

Spot diagram skew rays

Hexapolar pupil grid traced in 3D through the rotationally symmetric system. Coordinates are relative to the chief ray. The dashed circle is the Airy first dark ring (0.61 λ/NA′).

Longitudinal aberration on axis

Where a meridional ray at normalised pupil height ρ crosses the axis, relative to the paraxial image at the reference wavelength (the d line when F, d, C are traced). Curvature shows spherical aberration. A sideways offset between colours shows longitudinal chromatic aberration.

Field curvature & astigmatism near-chief rays

Tangential (T, solid) and sagittal (S, dashed) focus vs field, from ray pairs infinitesimally displaced from the exact chief ray. T ≠ S is astigmatism. A common bend is field curvature.

Distortion exact chief ray

(yreal − yparaxial)/yparaxial of the chief ray on the paraxial image plane (tangent of the output angle for images at infinity). Negative = barrel, positive = pincushion.

Image
Magnification
EFL 1/P (f, f′)
BFD / FFD
F, F′ (z)
H, H′ (z)
N, N′ (z)
Aperture stop / field stop
Entrance pupil
Exit pupil
NA (object) / NA′ (image)
Working F/# = 1/(2NA′)
Airy diameter 1.22 λ/NA′
RMS spot vs Airy radius
System ABCD [y, θ] (mm)
Field limit (50 % vignetting)

Exact vs paraxial near the axis

Meridional rays from the axial object point at pupil fraction ρ. The exact error shrinks as ρ² (third-order spherical aberration) and vanishes as ρ → 0.
ρ Ray height at first surface Exact − paraxial Error / ρ²

Surfaces at λ

# Kind z (mm) R (mm) n before → after Semi-aperture (mm) Paraxial marginal y (mm)
💡 How to Use

Learn with this tool

Learning objectives

  • Predict image position, size and orientation with ABCD matrices under one sign convention, including virtual images and images at infinity.
  • Locate cardinal points, the aperture and field stops and the pupils, and use them to explain magnifiers, telescopes and microscopes.
  • Tell paraxial predictions from exact ray behaviour. Measure spherical and chromatic aberration and judge when diffraction, not geometry, limits resolution.

Prerequisites

  • Snell's law and total internal reflection (Fresnel equations)
  • 2×2 matrix multiplication
  • Small-angle approximations sin u ≈ tan u ≈ u

Model

Exact model. Rays are straight lines between surfaces. At a refracting surface with unit normal N̂ (pointing against the ray), the new direction is d′ = η d + (η cos i − √(1 − η²(1 − cos²i))) N̂, with η = n/n′ and cos i = −N̂·d. When the root is imaginary the ray is totally internally reflected. Mirrors use d′ = d + 2 cos i N̂. Surfaces are spheres (or planes) intersected with a numerically stable quadratic, and rays are clipped at each semi-aperture. The ideal thin lens is a perfect "paraxial lens" (tan u′ = tan u − y/f in each plane). It has no aberrations, which makes it a useful reference.

Paraxial model. A ray is the column [y, θ], where θ is the slope along the direction of travel. This is the convention the Gaussian-beam tool also uses. Propagation over t is [[1, t], [0, 1]]. Refraction at radius R from n to n′ is [[1, 0], [(n − n′)/(n′R), n/n′]]. A mirror is [[1, 0], [2/R, 1]] and a thin lens is [[1, 0], [−1/f, 1]]. After a mirror the ray travels towards −z. The tool then "unfolds" the system: it multiplies R by the travel direction and measures later distances along the new direction. The system matrix M = MN…M1 has det M = n/n′. The image lies where the B element of T(si)·M·T(so) vanishes, and the magnification is m = det/D. Both expressions stay finite when the image goes to infinity.

z, y
axial and meridional coordinates (mm on screen, m internally); light enters travelling +z
R
radius of curvature, > 0 when the centre is to the right of the vertex (Cartesian convention)
so, si
object distance before the first element (> 0 real); image distance after the last powered surface along the outgoing direction (> 0 real, < 0 virtual)
P, f, f′
power P = −Cr of the reduced matrix [y, nθ]; front and rear focal lengths f = n/P, f′ = n′/P; EFL = 1/P
F, H, N
focal, principal (unit magnification) and nodal (unit angular magnification) points; N − H = (n′ − n)/P
EP, XP
entrance / exit pupil: images of the aperture stop in object / image space
NA′
n′ sin u′ of the marginal ray that just fills the aperture stop (paraxial marginal ray)
λ
vacuum wavelength; N-BK7 and F2 indices from Sellmeier n² = 1 + Σ Biλ²/(λ² − Ci)

Assumptions. The system is rotationally symmetric and sequential (each ray meets the surfaces in list order), and surfaces are spherical. Rays are geometric: no diffraction, no polarisation and no Fresnel reflection losses. Materials are lossless. The bench shows the meridional plane only. The spot diagram, field curves and distortion come from 3D skew-ray tracing of the same symmetric system.

Derivation: image condition and principal planes from the ABCD matrix

Let M = [[A, B], [C, D]] map [y, θ] from just before the first surface to just after the last one. For an object at distance so, the matrix from the object to a plane si after the system is T(si)·M·T(so). Call it Mo = M·T(so) = [[a, b], [c, d]]. Then its top-right element is b + sid.

All rays from one object point reach the same image height only if that element is zero, so si = −b/d. The magnification is then the top-left element, a + sic = (ad − bc)/d = det M/d. For the thin lens, b = so and d = 1 − so/f, which gives 1/so + 1/si = 1/f. When d → 0 the image is at infinity. Every ray from the object top then leaves with the same slope c·h, which is what the tool reports.

With the reduced matrix [y, nθ] (det = 1) and P = −Cr, a ray entering parallel at height 1 leaves at height A with reduced slope −P. It crosses the axis n′A/P after the last vertex; that point is F′. Extended back, it reaches height 1 a distance n′/P before F′; that plane is H′. The same argument run backwards gives F and H. Rays aimed at N leave N′ at the same angle, so N − H = (n′ − n)/P. N coincides with H when both media are the same.

Exercise 1: imaging with a thin lens

  1. Load Single lens. With f = 100 mm and so = 300 mm, predict si and m from 1/so + 1/si = 1/f.
  2. Check that the construction rays and the exact fan meet at the detector. Then drag the object to 150 mm and to 100 mm.
  3. Record si and m for so = 300, 150, 100 and 50 mm.
  4. Explain why si changes sign as the object crosses F, and why the tool reports an angular size at so = f instead of a huge number.
Show answer

si = 150 mm, m = −0.5 (real, inverted). At 150 mm: si = 300 mm, m = −2. At 100 mm the matrix element d = 0, so the image is at infinity and each object point leaves as a parallel bundle with slope −h/f (−0.1 rad for h = 10 mm). At 50 mm: si = −100 mm, m = +2, a virtual upright image 100 mm in front of the lens. The rays diverge after the lens, and their dashed backward extensions meet at the virtual image.

Exercise 2: paraxial limit (limiting case)

  1. Load Thick BK7 lens. Predict how the exact axial crossing of a ray at height y differs from the paraxial focus as y → 0.
  2. Read the "Exact vs paraxial" table and the longitudinal-aberration plot.
  3. Compute error/ρ² for ρ = 0.1, 0.05 and 0.01.
  4. Explain the limit in terms of sin u = u − u³/6 + …
Show answer

The error goes to zero, and error/ρ² tends to a constant, about −9.7 mm. At full aperture the error is −11.6 mm, larger in magnitude than the ρ² extrapolation, because fifth- and higher-order terms add to it. The paraxial model keeps only the first-order terms of Snell's law, so the leading correction to the focus is third order in angle. That appears as a ρ² shift of the axial crossing, which is primary (Seidel) spherical aberration. Marginal rays focus short of the paraxial focus, so a positive singlet is undercorrected.

Exercise 3: chromatic aberration and the achromat

  1. For a thin singlet, δf/f ≈ −δn/(n − 1) = 1/V. Predict the F–C focal spread of a 60 mm N-BK7 lens (V ≈ 64).
  2. Turn on the F, d, C lines for Thick BK7 lens, then load BK7/F2 achromat.
  3. Read the horizontal gap between the blue and red curves at ρ → 0 in the longitudinal plot for both systems.
  4. Why does a flint element of the opposite power sign fix the colour error, and what is left over?
Show answer

60/64 ≈ 0.9 mm; the tool gives ≈ 0.89 mm (F focuses closer). In the doublet the gap drops to ≈ 0.15 mm, and the F and C curves cross in the aperture. The two elements satisfy φ1/V1 + φ2/V2 ≈ 0, so their colour errors cancel while their powers do not. What remains is secondary spectrum (the d line focuses at a different place from F and C), zonal spherical aberration and spherochromatism.

Exercise 4: stops, pupils and the telescope eye relief

  1. In the Keplerian telescope (f1 = 200 mm, f2 = 50 mm) the objective is the aperture stop. Predict the exit-pupil position and diameter.
  2. Turn on stops and pupils and read the XP marker and readout.
  3. Record the angular magnification and the exit-pupil radius.
  4. Explain why the eye should be placed at XP, and why the Galilean telescope has no real exit pupil you can reach.
Show answer

The eyepiece images the objective from 250 mm in front of it, so the XP lies 1/(1/50 − 1/250) = 62.5 mm behind the eyepiece. Its radius is 25 × 62.5/250 = 6.25 mm (the beam is compressed by M = 4), and the angular magnification is −f1/f2 = −4. Every field angle's bundle passes through the XP, so a pupil placed there sees the whole field. In the Galilean design the objective's image through the negative eyepiece is virtual and lies inside the tube. The eye pupil therefore becomes the aperture stop, and the objective limits the field (vignetting).

Worked example: a thick lens with the matrix method

Take an equiconvex N-BK7 lens with R1 = +60 mm, R2 = −60 mm, t = 12 mm and nd = 1.5168 in air (preset Thick BK7 lens).

  1. Refraction at surface 1 gives C1 = (1 − n)/(nR1) = −0.005679 mm⁻¹ with D1 = 1/n. Propagation is T(12). Surface 2 gives C2 = (n − 1)/R2 = −0.008613 mm⁻¹ with D2 = n.
  2. Multiplying gives M = [[0.9319, 7.911], [−0.01664, 0.9319]] (B in mm, C in mm⁻¹). The determinant is 1 because both media are air.
  3. P = −C = 0.01664 mm⁻¹, so f = f′ = 60.10 mm. BFD = A/P = 56.00 mm, so F′ is 68.00 mm from the front vertex.
  4. H′ = BFD − f′ = −4.10 mm from the back vertex, and by symmetry H is 4.10 mm inside the front vertex. The principal planes sit inside the glass, and N = H, N′ = H′.
  5. For an object 300 mm in front of H, the Gaussian formula measured from the principal planes gives 1/300 + 1/s′ = 1/60.10, so s′ = 75.1 mm from H′ (about 71 mm after the back vertex). Load the preset, untick "object at infinity" and set so = 295.9 mm to check it.

At full aperture (semi-diameter 20 mm) the exact marginal ray crosses the axis ≈ 11.6 mm before F′. That is far more than the depth of focus λ/NA′² ≈ 6 µm, so this lens is strongly aberration-limited at f/1.5. Stopping down to 5 mm cuts the spherical aberration by (20/5)² = 16.

When the model fails

  • Diffraction. Near focus, rays predict a point. The real spot is at least the Airy pattern 1.22 λ/NA′, and ray optics ignores interference entirely (see Fourier optics and aperture propagation).
  • Paraxial matrices hold only while angles and heights are small. Their error grows as u² (spherical aberration, coma, astigmatism and field curvature are all third-order effects).
  • Meridional drawing. Coma, astigmatism and field curvature involve skew rays. The bench shows only rays in the y–z plane, so the spot diagram and field curves run a separate 3D trace. The tool does not compute the full Seidel/wavefront decomposition, off-axis vignetting of skew rays at the pupil edge or tilted and decentred elements.
  • Sequential tracing ignores ghost reflections, stray light and rays that miss a surface and hit a later one. It also ignores Fresnel losses at each surface (≈ 4 % per air–glass surface, see thin films).
  • Ideal thin lens is a mathematical perfect imager and does not exist. Real lenses have thickness, curvature and dispersion.
  • Gaussian laser beams focus to a waist w₀, not to the ray-optics point, and the waist is not at the geometrical focus in general (see Gaussian beams).

References

  • E. Hecht, Optics, 5th ed., Pearson (2017), ch. 5–6.
  • W. J. Smith, Modern Optical Engineering, 4th ed., McGraw-Hill (2008): stops, pupils, aberrations.
  • W. T. Welford, Aberrations of Optical Systems, Adam Hilger (1986): exact ray tracing, Coddington equations.
  • A. Gerrard and J. M. Burch, Introduction to Matrix Methods in Optics, Dover (1994).
  • SCHOTT optical glass data sheets, N-BK7 and F2 Sellmeier coefficients.
  • MIT OCW 2.71 Optics, lectures on geometrical optics and imaging.