🌗Diffraction & Interference Simulator - Single/Double Slit, Grating, Airy Disk, Thin Film Colors, Malus's Law
A wave-optics bench that runs in your browser, in four parts. Slits and gratings: set the wavelength, slit width a, separation d, number of slits N and screen distance L to see the exact intensity I(θ) = I₀[sinβ/β]²[sinNγ/(N sinγ)]² and the pattern on the screen, with minima, bright orders and missing orders marked; white-light mode sums every wavelength through the D65 spectrum and CIE colour-matching functions to show the real coloured fringes. Circular apertures: two point sources imaged as Airy disks [2J₁(x)/x]², with a slider to watch them become just resolved, and Rayleigh limits for the eye, a phone camera, binoculars or the Hubble telescope. Thin films use the exact multiple-reflection formula to give reflectance spectra and colours for soap bubbles, oil slicks, MgF₂ coatings, wedges and Newton's rings. The polarizer bench lets you drag up to four polarizers to check Malus's law and the three-polarizer paradox.
Free · No sign-up · Runs in your browserLast updated:
How to use Diffraction, Interference & Polarization
- 1Pick a module: slits and gratings, circular aperture, thin films or polarizers
- 2Choose a preset or move the sliders for wavelength, slit width, separation, aperture, film thickness, refractive index or polarizer angle
- 3Read the screen pattern, intensity curve, Airy image, reflected colour or transmitted intensity, along with minima positions, resolution limits, reflectance and the formulas used
FAQ
- How do I calculate double-slit fringe spacing, and why do some bright fringes disappear?
- For small angles the spacing between bright fringes is Δy ≈ λL/d, so a 632.8 nm laser with d = 0.25 mm and L = 1 m gives about 2.53 mm. The real pattern is the two-slit term multiplied by the single-slit envelope [sinβ/β]². When a bright order d sinθ = mλ lands exactly on an envelope minimum a sinθ = kλ, i.e. when m·a/d is a whole number, that order is missing. With d = 5a the ±5th and ±10th orders vanish.
- What is the Rayleigh criterion, and how small an angle can the eye or a telescope resolve?
- A circular aperture images a point as an Airy disk whose central spot has angular radius θ = 1.22λ/D. Two points are just resolved when the centre of one disk falls on the first dark ring of the other; the intensity between them then dips to about 73.5% of the peak. At 550 nm a 3 mm pupil gives about 46″ (the retina limits the eye to roughly 1′ in practice), and Hubble's 2.4 m mirror about 0.058″, enough to separate features about 100 m apart on the Moon.
- Why are soap bubbles colourful, and why do they turn black just before popping?
- Light reflected from the front and back of the film interferes. The path difference is 2nd cosθ, plus a half-wave phase shift at the front surface, so some wavelengths reinforce and others cancel, and the reflected light is coloured; the colours cycle as the thickness changes. When the film becomes much thinner than the wavelength (below about 30 nm) the two reflections differ by almost exactly half a wave and cancel, so the top of a draining bubble looks black. Very thick films overlap many orders and look white again.
- Why is an anti-reflection coating a quarter wavelength thick?
- On glass with n = 1.52, a MgF₂ layer with n ≈ 1.38 gives a half-wave shift at both surfaces, which cancel. The two reflections then interfere destructively when the round trip 2nd equals λ/2, i.e. nd = λ/4. Designed for 550 nm this means d ≈ 99.6 nm, and the reflectance falls from 4.3% for bare glass to about 1.3%; an ideal coating with n = √1.52 ≈ 1.23 would reach zero. Because the cancellation is complete only at the design wavelength, coated lenses often look faintly purple.
- How can adding a third polarizer between two crossed ones let light through?
- Malus's law says polarized light passing a polarizer at angle θ keeps I cos²θ. Unpolarized light leaves the first polarizer (0°) with I₀/2; meeting a 90° polarizer next gives cos²90° = 0, total darkness. A 45° polarizer in between first projects the light onto 45° (I₀/4) and the last one projects it onto 90° (I₀/8). The middle polarizer changes the polarization direction, so polarizers project rather than filter; with more polarizers in smaller steps the output approaches I₀/2.