Lens design bench
A sequential lens design bench: build a prescription of spherical and conic surfaces in N-BK7, N-SF11, F2, N-SK16, fused silica, CaF₂ and plastics (Sellmeier data), trace paraxial and real rays, get the cardinal points, Seidel aberrations and longitudinal colour, spot diagrams, ray fans and an MTF estimate, bend a singlet, design an achromatic doublet, and export the prescription as CSV or JSON — with a full-screen layout.
Added
How to use it
Build a lens out of surfaces and see what it does to light: where it focuses, how sharp it is, and why.
How to use it
Design. Start from a preset — an equiconvex singlet, a plano-convex lens both ways round, the Cooke triplet, a cemented achromat, a Newtonian’s paraboloidal mirror (and the same mirror as a sphere), a magnifier and a Ramsden eyepiece — or edit the surfaces. Each row is one surface:
-
Radius in mm, positive when its centre of curvature is to the right (light travels left to right);
inffor flat. -
Thickness to the next surface; on the last row, the distance to the image plane. ⌖ Focus puts the image plane at the paraxial focus.
-
Material after the surface:
air, a glass, ormirror(the light turns back, so the thicknesses after it are negative, as in Zemax and OSLO). -
Conic constant k: 0 for a sphere, −1 for a paraboloid, < −1 a hyperboloid, between −1 and 0 a prolate ellipsoid.
-
◎ makes the surface the aperture stop; + inserts a surface after it, ✕ deletes it.
Set the entrance pupil diameter and the largest field angle (the object is at infinity). The layout is drawn to scale with real rays at 0, 0.7 and 1 of the field. Below it: the effective, back and front focal lengths, the principal planes, the f-number and NA, the paraxial image height, the longitudinal colour and the on-axis RMS spot against the Airy disc, and the reduced ABCD system matrix. ⇄ Reverse turns the lens round. Export the prescription as CSV or JSON, copy it as a table, or import a JSON prescription. ⛶ Full screen (or F) gives the layout — or, on the Spots tab, the spot diagrams — the whole screen; ◫ Panels hides the prescription.
Aberrations. The five Seidel sums SI–SV and the two chromatic sums, surface by surface and in total (as a table and a bar chart), the wavefront coefficients W040, W131, W222 and W220 in waves, distortion in per cent, longitudinal spherical aberration, longitudinal colour (F − C), the secondary spectrum and the Petzval radius, and a plot of the paraxial focus against wavelength.
Spots & MTF. Spot diagrams at three fields in the F, d and C lines with the Airy disc and RMS radius; tangential and sagittal ray fans; and a geometric MTF estimate against the diffraction limit.
Bending. Spherical aberration and coma of a thin singlet against its shape factor B = (c1 + c2)/(c1 − c2), with the shapes for least spherical aberration and zero coma, a picture of the lens and the thick lens’s real-ray spherical aberration. Drag the slider.
Achromat. Pick a crown and a flint, the focal length and aperture: the designer splits the power for zero primary colour, corrects the thick cemented doublet exactly (F and C foci coincide), bends it for zero spherical aberration and shows the residual secondary spectrum against a singlet’s colour. Open in the design tab to study it further.
Glasses. The catalogue on a glass map (nd against Vd) with nd, Vd, partial dispersion and the source of each Sellmeier formula.
Conventions and sources
Sequential, rotationally symmetric, object at infinity. Paraxial rays use the y–nu method (n′u′ = nu − yφ, φ = (n′ − n)c) and the reduced ABCD matrix; a mirror is a surface with n′ = −n. Real rays are traced in 3-D through conic surfaces c(x² + y² + (1 + k)z²) = 2z with the vector form of Snell’s law, aimed paraxially at the entrance pupil. The Seidel sums follow Welford (Aberrations of Optical Systems, 1986) in Hopkins' notation; the thin-lens bending formula is Welford’s, also in Smith (Modern Optical Engineering) and Kingslake (Lens Design Fundamentals). Wavelengths are the Fraunhofer F (486.13 nm), d (587.56 nm) and C (656.27 nm) lines.
Glass data: SCHOTT optical glass data sheets (N-BK7, N-SK16, F2, N-SF11); I. H. Malitson, JOSA 55, 1205 (1965) for fused silica and Appl. Opt. 2, 1103 (1963) for CaF₂; PMMA (Szczurowski 2013) and polycarbonate (Sultanova et al., Acta Phys. Pol. A 116, 585, 2009) as tabulated at refractiveindex.info. The one-term polycarbonate fit gives Vd ≈ 28, a little below the ≈ 30 often quoted; plastics vary by grade.
The Cooke triplet is the classic f = 50 mm f/5 ±20° design in N-SK16 and F2 distributed as the Zemax sample "Cooke 40 degree field". The plano-convex lens is like Thorlabs LA1509 (R = 51.5 mm, 3.6 mm thick, f = 100 mm).
The tests check: Sellmeier indices against the catalogues (N-BK7 nd = 1.5168, Vd = 64.17, and every glass’s nd); the thick-lens EFL, BFL and FFL against the lensmaker’s equation; the triplet’s 50 mm f/5; real rays against paraxial rays in the paraxial limit, on and off axis; a paraboloid’s perfect axial focus; a spherical mirror’s SI = 2y⁴/R³ (zero for a paraboloid) and zero coma and astigmatism with the stop at its centre of curvature (the Schmidt principle); the thin-lens Petzval radius −nf; third-order LSA, longitudinal colour and distortion against real and paraxial traces; Welford’s thin-lens SI and SII against surface-by-surface sums; least spherical aberration at B = 2(n² − 1)/(n + 2) ≈ 0.74; a plano-convex lens with its flat side first having about four times the spherical aberration; and the achromat’s zero F − C colour, exact focal length, zero spherical aberration and a secondary spectrum close to −f(P1 − P2)/(V1 − V2).
Limits
-
Object at infinity only; rotationally symmetric, centred systems — no tilts or decentres, so a Newtonian’s flat diagonal and folded systems are not modelled (the primary alone is).
-
Rays are aimed paraxially at the entrance pupil (no real-ray aiming), so wide-angle systems with strong pupil aberration are approximate. Semi-diameters are drawn from the rays; there is no vignetting and no clear-aperture check.
-
The Seidel sums are third order only; trust the spot diagrams and fans (real rays) for large apertures and fields. The MTF is a geometric estimate times the diffraction limit, not a wavefront (diffraction) MTF; there is no optimiser, tolerancing, coatings or transmission.
-
Air is taken as index 1; glass indices are at 20 °C.
Linking to an example
Share link copies a link with the prescription and the other tabs' settings (the prescription is
packed into ?s=). Links can be written by hand; add the tab after #: design, aberrations,
spots, bending, achromat or glasses.
| Parameter | Meaning | Example |
|---|---|---|
|
Entrance pupil diameter (mm) and maximum field angle (°), applied to the example’s prescription |
|
|
Bending: glass, focal length (mm), shape factor, aperture (mm) |
|
|
Achromat: crown and flint glasses, focal length and aperture (mm) |
|
|
A preset below |
|
example= |
Opens |
|---|---|
|
An equiconvex N-BK7 singlet, f ≈ 100 mm f/5 (open) |
|
Plano-convex, curved side first: the right way round (open) |
|
The same lens flat side first: about four times the spherical aberration (open) |
|
The Cooke triplet, 50 mm f/5, ±20° (open) |
|
A cemented N-BK7 + F2 achromat, 100 mm f/5 (open) |
|
A 200 mm f/6 paraboloidal mirror: perfect on axis, coma off axis (open) |
|
The same mirror as a sphere (open) |
|
A 10× magnifier traced from the eye (open) |
|
A Ramsden eyepiece traced from the eye (open) |
|
Bending an f = 100 mm N-BK7 singlet (open) |
|
An N-BK7 + N-SF11 achromat, f = 150 mm (open) |
|
A CaF₂ + F2 achromat with less secondary spectrum (open) |
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser; nothing you type leaves this page.