WAVEFRONT OPTICS

Zernike Polynomials

The orthonormal basis for optical wavefront aberrations over a circular pupil. Visualise Zernike modes, build arbitrary wavefronts, and explore SLM phase-to-far-field Fourier optics — LG beams, OAM, PSF.

Z_n^mOSA/ANSI basis
PSFFFT computed
SLMphase patterns
LG modesOAM beams

Zernike Polynomial Definition (OSA/ANSI)

Orthonormal over the unit disk ρ ≤ 1 in polar coordinates (ρ, θ):

$$Z_n^m(\rho,\theta) = \begin{cases} \sqrt{2(n+1)}\,R_n^{|m|}(\rho)\cos(m\theta) & m > 0 \\ \sqrt{2(n+1)}\,R_n^{|m|}(\rho)\sin(|m|\theta) & m < 0 \\ \sqrt{n+1}\,R_n^0(\rho) & m = 0 \end{cases}$$ $$R_n^{|m|}(\rho) = \sum_{s=0}^{(n-|m|)/2} \frac{(-1)^s\,(n-s)!\;\rho^{n-2s}}{s!\;\left(\frac{n+|m|}{2}-s\right)!\;\left(\frac{n-|m|}{2}-s\right)!}$$

Orthonormality: ∫|Z_n^m|² ρ dρ dθ / π = 1. Any wavefront W(ρ,θ) = Σ c_n^m Z_n^m; RMS WFE = √(Σ c²).

Standard mode names
Mode selector
Defocus
RMS (unit disk)
Peak-to-valley
Z_n^m (OSA, units λ)
RdBu: blue=min, white=0, red=max
Radial cross-section at θ=0

Wavefront from Zernike Expansion

Any wavefront over a circular aperture: W(ρ,θ) = Σ c_n^m · Z_n^m(ρ,θ), coefficients in waves (λ). RMS WFE = √(Σ c²). Strehl ratio (Maréchal approximation):

S ≈ exp[−(2π · σ_W)²]

Strehl > 0.8 → diffraction-limited (Rayleigh criterion). The PSF is computed via 2D FFT of the pupil function: P(ρ,θ) = A(ρ) · exp[i·2π·W(ρ,θ)].

Zernike expansion coefficients
Wavefront W(ρ,θ) (λ)
RdBu colormap
PSF = |FT{P}|²
Inferno colormap

SLM Phase → Far-Field Intensity

A spatial light modulator (SLM) imprints a programmable phase φ(x,y) on an input Gaussian beam. In the focal plane of a lens, the field is the Fourier transform of the modulated input:

E_ff(u,v) = FT{ E_in(x,y) · exp[iφ(x,y)] } → I_ff = |E_ff|²

Helical phase φ = l·θ converts a Gaussian to a Laguerre–Gaussian LG₀ˡ donut (for l ≠ 0), carrying orbital angular momentum l·ℏ per photon.

SLM Parameters
Configure and press Compute.
Input intensity |E_in|²
Inferno colormap
SLM phase φ (mod 2π)
HSV cyclic: 0→2π = red→red
Far-field intensity |FT{E}|²
Inferno colormap

Laguerre–Gaussian LG₀ˡ beams

Carry OAM l·ℏ per photon. At the beam waist (p=0): |LG₀ˡ| ∝ (r√2/w)^|l| · exp(−r²/w²) Intensity ring at r = w√(|l|/2). Larger ring for larger |l|.

SLM recipe for LG$_0^l$:
1. Input: Gaussian beam
2. Phase: $\varphi = l\cdot\theta$ (helical/vortex phase)
3. Far field $\approx$ LG$_0^l$ (donut for $l\neq0$)

Blazed grating $l\cdot\theta + k\cdot x$: shifts donut off-axis — separates OAM orders spatially
lNameFar-field shape
0Gaussian (LG₀⁰)Central Airy peak
±1First-order vortexSingle donut ring
±2Second-order vortexLarger donut ring
±3Third-order vortexEven larger ring
0 + defocusDefocused GaussianBroadened central peak
0 + astigmatismAstigmatic GaussianElongated / elliptical
0 + gratingBlazed diffractionOff-axis Gaussian spot

Zernike Pyramid — all modes at a glance

Every Zernike polynomial Z_n^m arranged in the standard pyramid (OSA/ANSI order). Columns index the azimuthal frequency m, rows the radial order n. Cosine modes (m > 0) on the right, sine modes (m < 0) on the left. Blue = negative wavefront, white = zero, red = positive (RdBu colormap).