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.
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).
- 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.
- 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.
- 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.
- 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′.
- 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.