Zernike Polynomials, Explained Interactively: What Each Term Does to Your Optics

A perfect lens turns a flat wavefront into a perfect sphere that collapses to a sharp point. Real optics fall short, and the difference between the real wavefront and the perfect one is called the wavefront error. It is a bumpy surface over the lens, measured in fractions of a wavelength.

Zernike polynomials are the standard way to describe that surface. They are a set of basic shapes, such as a tilt, a bowl, a saddle or a three-leaf clover, defined over a circle. Any wavefront over a round lens can be built by adding them up, and the coefficient of each term says how much of that shape is there. Interferometer reports, lens design software, telescope alignment, adaptive optics and even eye exams all describe errors this way.

How to use the simulator

  • Pick a term from the pyramid and move its slider. The amount is the term’s RMS value in waves (λ). Terms you have turned on show their value on the tile, and you can mix as many as you like.
  • Wavefront. The shape itself, seen looking into the lens. Red parts of the wavefront are ahead of a perfect one and blue parts lag behind.
  • Interferogram. What an interferometer would show when it compares this wavefront to a perfect one. Each light-dark cycle is one wave of difference. Turn on Tilt the interferometer reference to see the straight fringes that optical shops use: a perfect wavefront gives straight, evenly spaced lines, and any error bends them.
  • Focal spot. The image of a single point of light, calculated from the wavefront by diffraction. The dashed circle marks the central disc a perfect lens would give (the Airy disc). Distances are in units of λ/D, the wavelength divided by the lens diameter, so the picture is the same for any lens.
  • Presets. Start from real situations such as a misaligned mirror, an off-center lens or an optic squeezed by its mount.

Reading the pyramid

Each Zernike term has two numbers. The radial order n says how quickly the shape changes from the center to the edge, and it sets the row. The azimuthal frequency m says how many times the shape repeats as you go around the circle: m = 0 terms are round, m = 1 terms have one high side and one low side, m = 2 terms have two of each, and so on. Pairs with the same n and opposite m are the same shape, turned by 90°/m.

Term (Noll)n, mFormulaWhat it doesTypical cause
Z1 Piston0, 01Shifts the whole wavefront. No visible effect.Path length changes
Z2, Z3 Tilt1, ±12ρ cos θ, 2ρ sin θMoves the spot sideways without blurring itMirror pointing, beam steering
Z4 Defocus2, 0√3 (2ρ² − 1)Blurs the spot evenly into a discFocus position, beam not collimated, heating
Z5, Z6 Astigmatism2, ±2√6 ρ² sin 2θ, √6 ρ² cos 2θTwo line foci at different distancesTilted lens, cylinder, bent optic, off-axis mirror
Z7, Z8 Coma3, ±1√8 (3ρ³ − 2ρ) sin θ, cos θComet-shaped flare to one sideDecentered or tilted elements, off-axis light
Z9, Z10 Trefoil3, ±3√8 ρ³ sin 3θ, cos 3θThree-pointed spotThree-point mounting stress
Z11 Spherical4, 0√5 (6ρ⁴ − 6ρ² + 1)Sharp core inside a haloSpherical surfaces, thick windows, wrong cover glass
Z12, Z13 Secondary astigmatism4, ±2√10 (4ρ⁴ − 3ρ²) cos 2θ, sin 2θCross- or X-shaped spreadPolishing and mounting errors
Z14, Z15 Quadrafoil4, ±4√10 ρ⁴ cos 4θ, sin 4θFour-pointed spotFour-point supports, polishing

ρ is the distance from the center as a fraction of the lens radius (0 to 1) and θ is the angle around it. The numbers in front, such as √3 and √8, make each term’s RMS value over the circle equal to 1, so a coefficient of 0.1 always means 0.1 λ RMS of that shape.

Why Zernikes, and not just any shapes?

The terms are orthogonal over the circle: none of them contains any of the others. That has three useful consequences.

  • The errors add up simply. The total RMS error is the square root of the sum of the squared coefficients. Two terms of 0.03 λ and 0.04 λ give 0.05 λ in total, whatever their shapes.
  • Removing a term never changes the others. Taking out tilt or defocus from a measurement leaves every other coefficient exactly as it was. That is how alignment errors are separated from errors in the glass itself.
  • Each term is already balanced. Higher terms include just enough of the lower ones to keep their own RMS as small as possible. Spherical aberration, for example, contains the defocus that puts you at the best focus. Try the preset Spherical aberration at the paraxial focus, which is what you see if you focus for rays near the center, then press Best focus. Removing the defocus term brings the spot to its sharpest, and what is left is pure Zernike spherical aberration: the smallest error this lens can have at any focus position.

One more trick to try: pick astigmatism and add defocus. At one amount of defocus the spot becomes a horizontal line, at the opposite amount a vertical line, and in between a round blur that looks like a plus sign. Those are the two line foci and the circle of least confusion of an astigmatic lens.

How good is good enough?

The simulator reports the Strehl ratio: the peak brightness of the spot compared with a perfect lens. Tilt is left out, because it only moves the spot. For small errors, the Maréchal formula connects Strehl to the RMS wavefront error σ in waves: S ≈ exp(−(2πσ)²).

RMS wavefront errorStrehl (Maréchal)What it means
λ/30 (0.033 λ)0.96Excellent. High-end interferometer references and laser optics.
λ/20 (0.05 λ)0.91Very good imaging and laser optics
λ/14 (0.071 λ)0.82The usual threshold for “diffraction-limited” (Strehl 0.8)
λ/10 (0.1 λ)0.67Visibly softer spot
λ/4 (0.25 λ)under 0.1Badly blurred. The formula stops being accurate here; the simulator calculates the real value.

You will often see specifications like “λ/4 peak to valley” or “λ/10 peak to valley” for surfaces. Peak to valley (PV) is the height difference between the highest and lowest points, which is easy to read off an interferogram but depends on single points. RMS describes the whole surface and predicts image quality much better. For smooth, low-order errors PV is typically 3 to 5 times the RMS value; Rayleigh’s classic λ/4 PV limit for defocus corresponds to about λ/14 RMS, the same threshold as in the table. Also keep in mind that a surface error of h becomes a wavefront error of 2h when light reflects off it.

Watch out for numbering

There is more than one way to number Zernike terms, and the same label can mean different things. Always check which convention a report or program uses before comparing numbers.

ConventionWhere you meet itDefocusPrimary sphericalCoefficient means
Noll (used here)Optical design programs (“Zernike Standard”), astronomy, adaptive opticsZ4Z11RMS
OSA/ANSIOphthalmology, eye aberrometers; numbering starts at 0j = 4j = 12RMS
Fringe (University of Arizona)Many interferometers and their softwareZ4Z9Value at the edge, not RMS

The simulator shows both the Noll and the OSA/ANSI index of every term. Fringe coefficients use the same shapes but without the normalizing factors in front, so a Fringe defocus coefficient of 1 λ equals 1/√3 ≈ 0.58 λ RMS. Convert before comparing or adding them.

Tilt, and why mounts matter

Tilt is the one term that does not blur anything, which is why it is usually subtracted from measurements. But in a real system it is the one that changes most from minute to minute. A mirror that tilts by an angle δ tilts the reflected wavefront by 2δ. Across a beam of diameter D at wavelength λ, that adds 2δD/λ waves of tilt from edge to edge. For a 25 mm beam at 633 nm, a drift of just 1 µrad adds about 0.08 waves, a visible change in an interferometer’s fringes. After 10 m of beam path the same drift moves the beam by 20 µm, and when coupling into a single-mode fiber it is lost signal.

How an optic is held matters too. A mirror clamped too tightly at three points takes on trefoil, and stress from a mount can add astigmatism. That is the problem Physiverse mounts are built for: monolithic flexure mounts that hold their angle through temperature changes and long experiments. See the product line.

About the model: the focal spot is the far-field diffraction pattern of a uniformly lit circular pupil at a single wavelength, calculated from the wavefront on a 128 × 128 grid. The simulator covers the first 15 Noll terms, up to radial order 4.