Chris Collins

Tools · physics

Wave optics lab

An interactive wave-optics lab: Young's slits and gratings, thin-film colours of soap bubbles and coatings computed spectrally (transfer-matrix method, CIE 1931 colour), Michelson and Fabry–Pérot interferometers, Newton's rings, the slit and Airy patterns with the Rayleigh criterion, any aperture's diffraction pattern by 2-D FFT (draw your own), Fresnel diffraction with the Cornu spiral, a grating spectrometer, and a ripple tank simulation.

Added

How to use it

Light is a wave, and nearly everything in this lab follows from one rule: add the waves, then square to get the brightness. Each tab is one classic experiment, computed from the physics rather than drawn, with the colours worked out from the spectrum the way your eye would see them.

How to use it

Every tab has a picture (what you would see), a graph, a column of controls and a row of results with the formulas. ⛶ Full screen (or F; Esc to leave) gives the current experiment the whole screen; ◫ Panels hides the controls there. Tabs can be linked to with #slits, #film, #michelson, #fabry-perot, #newton, #aperture, #fft, #fresnel, #spectrometer and #ripple.

Slits & gratings. N slits of width a spaced d apart, lit by wavelength λ, on a screen at L. The pattern is the single-slit envelope sinc²(πa sin θ/λ) times the interference term [sin(Nα)/(N sin α)]², α = πd sin θ/λ (Hecht, Optics, §10.2). Two slits give fringes Δy = λL/d apart; when d/a is a whole number some orders fall on envelope zeros and go missing; more slits make the principal maxima sharper with N − 2 faint maxima between, and a resolving power mN. Tick White light to sum every wavelength: a white central fringe edged in colour, and gratings spreading each order into a spectrum.

Thin films. Light reflected from the two surfaces of a thin layer interferes. Pick a soap film or an oil slick and drag the thickness (or tap the colour strip — it runs from 0 to 1,500 nm, the sequence you see down a draining soap film: black, white, yellow, magenta, blue, green…). Or pick a coating: bare glass, a quarter-wave MgF2 anti-reflection layer, a two-layer V-coat, a three-layer broadband coating, a dielectric mirror (HL)8H, a hot mirror; or Edit these layers to build your own stack. Reflectance is computed exactly by the characteristic (transfer) matrix method (Born & Wolf §1.6; Macleod, Thin-Film Optical Filters) for any angle and s, p or unpolarised light. For stacks the strip shows the colour against the angle of view.

Michelson. Move one mirror by z and the path difference changes by 2z; every λ/2 of travel a fringe passes the centre (▶ Move the mirror counts them). The view through the eyepiece shows circular fringes; tilt a mirror for straight ones. The graph is the brightness at the centre against the mirror position: a laser’s fringes go on and on, the sodium doublet’s fade and return every 0.29 mm, an LED’s last tens of micrometres, and white light gives only a couple of coloured fringes around zero path difference — the coherence length λ²/Δλ.

Fabry–Pérot. Two parallel mirrors of reflectance R, d apart. Transmission is the Airy function 1/(1 + F sin²(δ/2)) with F = 4R/(1 − R)² and δ = 4πnd cos θ/λ; the finesse π√R/(1 − R) is how many peak widths fit in one free spectral range c/2nd. The rings are what you see through a lens; with sodium light the doublet makes two interleaved ring sets.

Newton’s rings. A lens of radius R on a flat plate leaves an air gap t = r²/2R. In reflection the centre is dark (one reflection has a half-wave flip) and the dark rings sit at r = √(mλR). Lift the lens and the rings shrink into the centre, one for each λ/2. Try white light.

Slit & Airy. Far-field diffraction in the focal plane of a lens: a slit’s sinc² (zeros at sin θ = mλ/a, side lobes 4.72%, 1.65%…) and a round hole’s Airy pattern [2J1(x)/x]², x = πD sin θ/λ, with its first dark ring at 1.22 λ/D holding 83.8% of the light. Add a second point to see the Rayleigh criterion (a 73.5% dip between them) and the Sparrow limit (0.947 λ/D). Log brightness shows the faint rings.

Any aperture (FFT). The Fraunhofer pattern of any aperture is the squared magnitude of its 2-D Fourier transform. Choose a shape — square, slits, a grating, a circle, an annulus, a reflector with a spider, a hexagon — or draw on the aperture (white lets light through; Block paints it opaque), and a 512 × 512 FFT recomputes the pattern. The width of the drawing area and λ set the angular scale (λ/width per pixel).

Fresnel & Cornu. Near an edge or slit, before the far field: the intensity is ½[(C(w) + ½)² + (S(w) + ½)²] for a straight edge, with w = y√(2/λz) and C, S the Fresnel integrals. The Cornu spiral plots (C, S); the brightness at a point on the screen is the squared length of the chord between the two ends of the open part, drawn for the point you pick (tap the graph). At the edge of the geometric shadow it is exactly 25%; the brightest fringe is 1.37× at w = 1.22. For a slit the Fresnel number (a/2)²/λz tells near field (> 1, a sharp-edged shadow) from far field (≪ 1, the sinc² pattern); the map below shows the change with distance.

Spectrometer. A grating of so many lines per mm, a lamp (hydrogen, sodium, mercury, helium, neon; NIST line wavelengths), an order m and the width of grating lit. The top strip is every order on a screen; the graph is the chosen order blurred by the resolving power R = mN. Zoom to the sodium D lines (0.597 nm apart) and see that they split only once R exceeds about 990. Sunlight shows the Fraunhofer absorption lines.

Ripple tank. The 2-D wave equation solved by finite differences on a grid in a background thread (Web Worker), with absorbing edges. Pick an experiment — a point source, two sources, single and double slits, a grating, reflection, refraction into a slower medium, a lens, a prism, total internal reflection, Huygens' row of pinholes — or tap to add sources and drag to draw walls and glass (n = 1.5). Time-averaged intensity shows the interference pattern; Huygens wavelets overlays the crests spreading from each source and opening.

Colour

Colours are computed, not picked: a spectrum (a reflectance, an interference pattern at each wavelength) is multiplied by the light source and the CIE 1931 2° colour-matching functions, giving XYZ, which is converted to sRGB (IEC 61966-2-1). The matching functions use the analytic fit of Wyman, Sloan and Shirley (JCGT, 2013), corrected below 420 nm and above 650 nm to the tabulated chromaticities. A monochromatic line lies outside the sRGB gamut; its colour is shown with the negative primaries clipped. Daylight is a 6,504 K black body standing in for D65.

Tested against

Fringe spacing λL/d; the first zero of the Airy pattern at 3.8317 (1.2197 λ/D) and 83.8% encircled energy; grating maxima d sin θ = mλ; the MgF2 quarter-wave coating on n = 1.52 glass at 550 nm (1.26%) and bare glass (4.26%, 4.00% at n = 1.5); a Bragg mirror’s peak reflectance; the Fabry–Pérot finesse for R = 0.9 (29.8); the Fresnel integrals at tabulated points (Abramowitz & Stegun table 7.7, e.g. C(1) = 0.77989, S(1) = 0.43826); the straight-edge 25% and 1.37 maximum; Newton’s tenth ring under a 1 m lens in sodium light (2.43 mm); the chromaticities of spectral colours (CIE 1931); the 2-D FFT of a square against sinc²; and the ripple tank’s wavelength.

Limits

  • Scalar waves: no polarisation in the slit, aperture and Fresnel tabs (see polarization for that); the paraxial and far-field approximations are stated where used.

  • Thin films: non-absorbing layers with indices that don’t change with wavelength; coherent layers (a thick glass slide would show no colours in real life — the coherence of daylight is about a micrometre).

  • The Michelson picture mixes ring fringes (seen at infinity) and tilt fringes (localised at the mirror) in one view for intuition; a real instrument shows one or the other most clearly.

  • The spectrometer treats every order as equally bright (no blaze) and lines as Gaussian.

  • The ripple tank is a scalar wave on a coarse grid: waves shorter than about 8 cells disperse a little, and edges absorb most but not all of the wave.

  • Screen colours are approximate: monitors differ, and spectral colours are outside sRGB.

Linking to an example

Share link copies a link with all the tabs' settings; links can be written by hand. Add the tab after #.

Parameter Meaning Example

lam, N, a, d, L, white

Slits: λ (nm), number, width and spacing (µm), screen distance (m), white light

lam=633&N=2&a=50&d=250

film, fn, ft, n0, ns, aoi, pol, illum, exp, lam0, stack

Thin films: preset (soap, oil, bare, mgf2, vcoat, broadband, mirror, dichroic, custom), film index and thickness (nm), media, angle (°), s/p/avg, light (daylight, A, E), brightness, design λ, a custom stack n:d,n:d

film=custom&stack=1.38:99.6,2.05:134.1

msrc, mz, mtilt, mwin

Michelson: source (hene, green, violet, sodium, mercury, led, white), mirror offset (µm), tilt (arcmin), graph window (µm)

msrc=sodium&mz=140

R, gap, fpn, fsrc

Fabry–Pérot: reflectance, spacing (mm), gap index, source

R=0.95&gap=10

nR, nsrc, nview, lift

Newton’s rings: lens radius (mm), source, reflect/transmit, lift (nm)

nR=500&nsrc=white

ap, alam, aw, D, f, sep, alog

Slit & Airy: slit/circle, λ, slit width (µm), diameter (mm), focal length (mm), second point (× Rayleigh), log

ap=circle&sep=1

fap, flam, fsize, zoom, flog, draw

FFT: starting shape, λ, drawing width (mm), zoom, log, drawn strokes

fap=hexagon

fk, fa, fz, frlam, fy

Fresnel: edge/slit, slit width (mm), distance (m), λ, point (mm)

fk=slit&fa=2&fz=0.5

lamp, lpmm, order, beam, fcam

Spectrometer: lamp (hydrogen, sodium, mercury, helium, neon, white, sun), lines/mm, order, lit width (mm), lens (mm)

lamp=neon&lpmm=1200

rp, rwl, rview, rspeed

Ripple tank: experiment, wavelength (fraction of the width), wave/intensity, speed

rp=lens&rview=intensity

example

A preset below

example=young

example= Opens

young

Young’s double slit: 550 nm, slits 0.05 mm wide and 0.25 mm apart, screen at 1 m — fringes 2.2 mm apart (open)

young-white

The double slit in white light: a white central fringe edged with colour (open)

missing-order

d = 3a: every third bright fringe falls on a zero of the slit envelope and goes missing (open)

five-slits

Five slits: sharper principal maxima with three faint ones between (open)

grating-white

A 20-slit grating in white light: each order spread into a spectrum (open)

soap-film

A soap film draining under gravity: black at the top where it is thinnest, then white, yellow, magenta, blue, green… (open)

oil-slick

An oil slick (n = 1.47) on water (open)

ar-coating

A quarter-wave MgF₂ anti-reflection coating on crown glass: 4.3% → 1.26% at 550 nm (open)

broadband-ar

A three-layer broadband anti-reflection coating (λ/4–λ/2–λ/4) (open)

dielectric-mirror

A 17-layer TiO₂/SiO₂ dielectric mirror: 99.9% over a 165 nm band (open)

michelson-laser

A Michelson interferometer with a He–Ne laser: circular fringes (open)

michelson-sodium

Sodium light: the fringes fade and return every 0.29 mm of mirror travel (the D-line doublet) (open)

michelson-white

White-light fringes: only a few coloured fringes near zero path difference (open)

fabry-perot

A Fabry–Pérot etalon, 5 mm gap, 90% mirrors: finesse 30 (open)

fp-sodium

A Fabry–Pérot etalon splitting the sodium doublet into two sets of rings (open)

newton-rings

Newton’s rings in sodium light under a 1 m lens: the 10th dark ring at 2.43 mm (open)

newton-white

Newton’s rings in white light: a dark centre and a few coloured rings (open)

single-slit

A 0.1 mm slit at 633 nm: zeros every 6.3 mrad (open)

airy

The Airy pattern of a 1 mm circular aperture: first zero at 1.22 λ/D (open)

rayleigh

Two stars at the Rayleigh limit: the dip between them is 73.5% of the peaks (open)

fft-square

A square aperture: a cross of sinc² lobes (open)

fft-hexagon

A hexagonal aperture: six-fold spikes like a JWST star image (open)

fft-spider

A reflector with a four-vane spider: the diffraction spikes on bright stars (open)

fresnel-edge

Fresnel diffraction at a straight edge: 25% at the geometric shadow, a 37% overshoot outside it (open)

fresnel-slit

A 2 mm slit seen 0.5 m away: Fresnel number 3.2, the near-field pattern (open)

spectrometer-mercury

A 600 lines/mm grating and a mercury lamp in the first order (open)

spectrometer-sodium

Can a 1 mm-wide beam on a 300 lines/mm grating split the sodium doublet? (it needs R ≈ 1000) (open)

spectrometer-sun

Sunlight with its Fraunhofer absorption lines (open)

ripple-double

Ripple tank: Young’s double slit (open)

ripple-lens

Ripple tank: a lens focusing a plane wave (open)

ripple-refraction

Ripple tank: refraction into a slower medium (open)

ripple-huygens

Ripple tank: Huygens’ principle — a row of pinholes rebuilds the plane wave (open)

Runs entirely in your browser; nothing you type leaves this page.