Prism simulation: dispersion and refraction of light
Send white light through a glass prism and watch it leave as a fan of colours, because glass bends each wavelength by a slightly different amount.
n(λ) = A + B/λ² (blue bends more than red)
- n
- refractive index of the glass (no units)
- λ
- wavelength of the light (nm)
- A
- Cauchy constant, the index approached at long wavelengths (about 1.583 here)
- B
- Cauchy dispersion constant, how fast the index rises at short wavelengths (13 000 nm² here)
What you are watching
This is a ray-tracing scene. A beam of white light, traced as six wavelengths from 660 nm (red) to 450 nm (blue) running along one line, rises toward the left face of an equilateral glass prism (all three angles 60°, apex up). Where the six still share one path the beam is drawn white. At the first face each colour bends by its own refractive index, from about 1.612 for red to 1.647 for blue, so they part very slightly inside the glass.
The beam is set at the angle of minimum deviation for yellow light: inside the glass it runs parallel to the base and it leaves the right face as symmetrically as it entered. The second face bends every colour again, in the same direction, so the small difference grows: red leaves turned about 47.5° from its original direction, blue about 50.9°, a fan about 3.4° wide that keeps widening as it travels (about a quarter of a metre between red and blue 4 m beyond the glass).
Why it happens
At each surface light bends by Snell's law, n₁ sin θ₁ = n₂ sin θ₂. If the index n were the same for every colour, all six rays would share one path. In glass it rises at shorter wavelengths, roughly as Cauchy's formula n(λ) = A + B/λ², so blue bends more than red: this is dispersion. The scene uses A ≈ 1.583 and B = 13 000 nm², a strongly dispersive, dense-flint-like glass, and still red and blue differ by only about 2% in index, which is why the fan is a few degrees, not tens.
A prism bends light twice, both times away from the apex and toward the base, so the colour separation from the two faces adds. For a prism of apex angle A, light passing symmetrically is turned through the least possible angle, the minimum deviation δ, where n = sin((A + δ)/2) / sin(A/2). With A = 60° and n = 1.62 that gives δ ≈ 48°, which is what the yellow ray shows. This is Newton's experiment: white light is a mixture, and the prism sorts it.
Light inside glass meeting a surface beyond the critical angle, where sin θc = 1/n (about 38° here), cannot get out and is totally reflected. At minimum deviation the light meets the second face at 30° inside the glass, safely below that, so it refracts out.
Try this
- Drag the light source up or down: the beam enters at a different point but keeps its direction, so every angle, and the 3.4° fan, stays the same. The faces are flat, so where the light hits does not matter, only the angle.
- Drag the prism (grab the middle of one of its faces) and the whole apparatus moves as one: the colours still leave at the same angles, because only the beam's angle to the faces sets them.
- Drag the source above the apex or below the base: the beam misses the glass entirely, stays one white line, and never splits. Without the glass there is no dispersion.
- Follow the fan as far as the board lets you: the colours are only a few centimetres apart where they leave the glass and drift farther apart with every metre, which is why a spectrum is cast on a far wall rather than seen at the prism.
Questions
Why does a prism split white light into colours?
Glass has a slightly higher refractive index for shorter wavelengths, so blue is bent more than red at each face. The colours leave at slightly different angles and spread into a spectrum.