30

Diffraction and Diffraction Gratings: The CD Rainbow

Tilt an old CD under a lamp and a rainbow sweeps across it - no prism, no oil film, just a spiral of microscopic pits. That rainbow is diffraction: light waves bending around a fine periodic structure and interfering so that each color emerges at its own angle. The same effect runs the spectrometers that read the chemistry of distant stars. This is the interactive guide to splitting light with structure.

Physics · 62 4 Live Demos ~31 min read Wave optics
d·sinθ
= m·λ, the grating law
~625/mm
A CD is a grating
orders
Multiple spectra
≠ prism
Opposite dispersion
01

Light bending around structure

Light is a wave, and waves diffract - they bend and spread when they pass an edge or a gap comparable to their wavelength. Send light through (or off) a structure with many regularly spaced slits or grooves and something remarkable happens: the wavelets from each opening overlap and interfere. They cancel almost everywhere, and add up only in a few sharp directions.

Crucially, those reinforcing directions depend on wavelength. Red waves, being longer, reinforce at a bigger angle than blue. So white light fans out into a spectrum, sorted by color - without any prism. That is the principle of the diffraction grating, and it is a different mechanism from the refraction of a prism and from the thin-film interference of a soap bubble.

Three ways to make a spectrum, three physics: refraction (a prism bends each wavelength by a different amount), thin-film interference (two surfaces reinforce certain wavelengths by thickness), and diffraction (a periodic structure reinforces each wavelength at its own angle). This article is the third.
02

The grating, color by angle

The whole behaviour is captured by the grating equation: d sin θ = m λ, where d is the spacing between lines, θ is the angle of the diffracted beam, λ is the wavelength, and m is the order (1, 2, ...). Closer lines (smaller d) throw each color out to a wider angle. Change the line density and watch the spectrum fan open or close.

Interactive 01 · The grating equation

Finer lines spread the colors wider

A white beam strikes a grating; the first-order spectrum fans out to either side, each wavelength at the angle the grating equation demands. Increase the line density (lines per millimetre) and the spectrum spreads wider - the basis of how a spectrometer separates colors. The readout gives the angle of red and violet.

03

Why a CD makes a rainbow

A CD is an accidental, excellent reflection grating. Its data spiral is a track of pits spaced about 1.6 µm apart - roughly 625 lines per millimetre. White light bouncing off it diffracts into a spectrum, which is why a CD flashes rainbow colors that slide as you tilt it. A DVD packs its tracks tighter (about 0.74 µm, ~1350 lines/mm), so it spreads the colors even more. Compare them.

Interactive 02 · The disc as a grating

CD, DVD, and the tilt

A reflective disc lit from one side. Choose CD (wider track, narrower rainbow) or DVD (tighter track, wider rainbow), and tilt it: the angle at which each color reinforces moves, so the rainbow sweeps across the surface. The finer DVD grating throws a noticeably broader band of color.

04

Diffraction orders

The m in the grating equation is the order. At m = 0 all wavelengths pass straight through undeviated - a white central beam. At m = ±1 you get the first spectrum either side; at m = ±2 a second, wider spectrum; and so on. Higher orders are dimmer and spread more, and at some point they begin to overlap - a real headache for spectrometer designers. Step through the orders.

Interactive 03 · Orders

One grating, many spectra

The same grating, showing orders up to the number you choose. Order 0 is the undeviated white spot; each successive order is a spectrum spread wider than the last. Push it far enough and the high orders begin to overlap, where red of one order meets violet of the next.

05

Grating versus prism

Both a prism and a grating turn white light into a spectrum, but they are opposites. A prism refracts, bending shorter wavelengths (violet) the most, with a squeezed, nonlinear spread. A grating diffracts, deflecting longer wavelengths (red) the most, with a spread nearly linear in wavelength - and it makes several orders. See the two spectra reversed against each other.

Interactive 04 · Prism vs grating

The spectrum, reversed

White light into each device, the spectrum it produces below. Notice the order flips: the prism bends violet furthest (violet at the wide end), the grating bends red furthest (red at the wide end). The grating's spectrum is also more evenly spaced - more linear in wavelength.

PRISM · refraction (violet bends most)
GRATING · diffraction (red bends most)
06

Where diffraction shows up

Spectrometers
Gratings split light into a spectrum to measure it - the core of instruments that read color, chemistry, and starlight.
CDs, DVDs, Blu-rays
Their tracks act as reflection gratings, throwing the familiar tilt-and-shift rainbow.
Holographic foils
Security holograms and iridescent gift wrap are microscopic gratings stamped into film.
Some animal color
Certain beetles, feathers, and snake scales use grating-like nanostructures for angle-shifting color.
Diffraction sunglasses & effects
Novelty glasses with fine gratings turn every light into a spray of spectra.
Telescopes & cameras
Diffraction also limits sharpness - the smallest detail an aperture can resolve is set by it.
"A prism is a single clever wedge; a grating is ten thousand tiny ones working in chorus. Both unweave the rainbow - but only the grating does it by making light interfere with itself." Editorial summary · structure as spectroscope
07

Pitfalls and gotchas

Diffraction ≠ refraction
A grating rainbow is interference, not bending through glass. The color order is even reversed from a prism.
Diffraction ≠ thin film
A CD's rainbow is diffraction off grooves; a soap bubble's is thin-film interference. Different structures, different physics.
Forgetting the orders
A grating makes several spectra at once; high orders can overlap and contaminate a measurement.
Finer is not always better
Closer lines spread color more but send less light into each order and can run out of angles for red.
Screens can only fake the sweep
A flat display has no real grating, so it can mimic the look but not the true angle-dependent shift.
It limits resolution too
Diffraction is not only useful - it sets the hard limit on how sharp any lens or telescope can ever be.
08

Test your understanding

Six questions on diffraction, the grating equation, the CD rainbow, orders, and grating vs prism. Instant feedback, no scores recorded - a wrong answer comes with a short explanation.

Quick check

Loading…
 
Question 1 of 6
09

Continue your journey

Diffraction is one of three ways structure and waves make color. Follow the others.