Physics Simulation

Refraction & Diffraction

Where light bends, and where it spreads
Snell · Fresnel · Fraunhofer

Media

Results

Refracted angle
from the normal
Critical angle
total internal reflection beyond
Reflected
unpolarised
Brewster angle
reflection fully polarised
s-polarised
p-polarised
Transmitted
Reference

Refractive index of common materials

MaterialIndex nCritical angle to airLight slows to
Values are at the sodium D line (589 nm) and are conventional textbook figures, not a measurement of any particular sample — real glass varies by formulation, and every material's index changes with wavelength. That variation is dispersion, and it is the reason a prism makes a spectrum rather than a bright stripe.
Field notes

Things worth carrying around

Slit width and slit spacing do opposite things

Same equation, opposite meaning. For a single slit, a sin θ = mλ gives the minima — the dark bands. For a double slit, d sin θ = mλ gives the maxima. Mixing them up is the single most common error in this topic.

Narrower means wider

Squeeze a beam through a smaller gap and it spreads more, not less. That is why a pinhole camera cannot be sharpened indefinitely by shrinking the pinhole, and why a telescope needs a big mirror to see fine detail rather than a good one.

Small-angle approximations expire

Replacing sin θ with θ is fine for a double slit at a couple of degrees. On a 600 lines/mm grating the first order sits near 19°, where that shortcut is already 1.9% wrong — small enough to look plausible and big enough to matter.

4% per surface, and it adds up

An air-to-glass surface reflects about 4% at normal incidence. A lens with six uncoated elements has twelve such surfaces and loses roughly 40% of the light — which is why anti-reflection coatings were worth inventing.

How it works

Bending and spreading are different things

Refraction is what happens at a boundary: light changes speed, so it changes direction, and Snell's law — n₁ sin θ₁ = n₂ sin θ₂ — is the bookkeeping. Going into a denser medium it bends toward the normal; coming out it bends away, and past a certain angle it cannot get out at all. Diffraction is what happens at an edge: light spreads because it is a wave, and the narrower the gap the more it spreads. One is about the interface, the other about the aperture, and they are often taught together only because both involve light not going straight.

Worked example

Look into a pool 2 m deep and the bottom appears about 1.50 m down — the ratio of the two indices. Now look up from underwater: beyond 48.6° from vertical the surface turns into a mirror, and the entire sky is squeezed into a bright circle overhead. Same law, read in the other direction.

Why does light bend at all?

It travels more slowly in a denser medium, and a wavefront arriving at an angle enters the new medium at one edge before the other. That edge slows first, so the wavefront pivots — exactly like a trolley whose left wheel hits gravel before the right one.

What is total internal reflection actually for?

Optical fibre, mostly. Light entering the core at a shallow enough angle can never escape through the wall, so it bounces along the fibre for kilometres. It is also why a diamond sparkles: a critical angle of 24° means light rattles around inside before finding a facet it can leave through.

Why does the reflection off a road or a lake go away with polarised glasses?

Near Brewster's angle — about 53° for water — the reflected light is almost entirely polarised in one direction, so a filter turned the other way removes nearly all of it. The calculator shows the s and p components separately; at Brewster's angle the p component is exactly zero.

Does this handle absorbing or metallic surfaces?

No. The Fresnel equations here are the real-valued ones for transparent dielectrics. Metals have a complex refractive index and a different reflectance curve, so do not use these numbers for mirrors or for anything coloured by absorption.

What this page assumes

Monochromatic light, flat boundaries, and non-absorbing non-magnetic materials. The Fresnel equations used are the real-valued dielectric forms, so they do not apply to metals, absorbing media or thin-film coatings, where interference between surfaces dominates. Diffraction results use the Fraunhofer (far-field) condition, which assumes the screen is far enough away that the wavefronts arriving at it are effectively flat — close to the aperture the Fresnel regime applies instead and the pattern differs. Refractive indices are quoted at 589 nm and treated as constant with wavelength within a calculation, so dispersion is described but not modelled. Intensity envelopes are drawn to show shape and position, not absolute brightness.

Far-field, transparent materials. Fraunhofer diffraction and dielectric Fresnel equations — not valid for metals, coatings, or a screen close to the aperture.
Version history · unchanged

No changes to this tool’s own behaviour since the earliest archived release (v2.7). The full history for the site is in the changelog.