Skip to content
Simulation · Light

Snell's law and refraction

Send a ray of light across a boundary between air, water, glass or diamond. See the exact angles, how much reflects, and when light cannot escape.

Refraction
Angle of incidence40.0°
From
Into
Bends toward the normal

Refracted28.0°
Reflected3%
Transmitted97%
Critical anglenone
Brewster53°
Speed0.75 c

Snell's law

Light slows down in a denser material, so a ray crossing the boundary changes direction. The product of the index and the sine of the angle from the normal stays the same on both sides.

n₁ sin θ₁ = n₂ sin θ₂

Total internal reflection

Going from a denser to a thinner material, the refracted ray bends away from the normal. Past the critical angle it would have to leave at 90 degrees or more, so all of the light reflects instead.

θc = arcsin(n₂ / n₁)

How much reflects

Even a clear surface reflects a little. The Fresnel equations give the share for light polarised across and along the surface; for ordinary unpolarised light the two are averaged.

R = (Rs + Rp) / 2

What is Snell's law, and why does light bend?

Snell's law says that when light crosses from one transparent material into another, the angles it makes with the normal (the line at right angles to the surface) obey n₁ sin θ₁ = n₂ sin θ₂, where n is the refractive index of each material. Light bends toward the normal when it enters a material with a higher index, such as air into water, and away from it when it enters a lower one. Beyond the critical angle, light inside the denser material cannot get out at all and is totally reflected. The simulation above applies the law, the Fresnel reflection equations and a dispersion model exactly.

For example, a ray in air hitting water at 45° continues at 32.0° in the water, and 2.79% of its light is reflected. Light bending at surfaces is how lenses work, including the special lenses of infrared cameras, covered in the physics of thermal imaging. Colour comes from wavelength, which also decides the spacing of fringes in the double slit experiment simulator.

Key results from the simulation

  • Snell's law: air to water at 45° bends to 32.0°. Air to glass at 30° bends to 19.2°. The higher the index, the stronger the bend.
  • Critical angles into air: water 48.6°, glass 41.1°, diamond 24.4°. Diamond's small critical angle is why it sparkles.
  • Every surface reflects: at normal incidence a glass surface reflects 4.26% of the light, and at 80° it reflects 39.1%. The ray's brightness on screen follows the Fresnel value.
  • Colours bend differently: in crown glass with n = 1.52 the index runs from 1.5165 for red (700 nm) to 1.5341 for violet (400 nm). A 60° prism fans the beam out by 1.61°.

Six ways light crosses a boundary

Each section gives the numbers the simulation shows for that set-up and a button that loads the media and the angle into the simulation above. The slider is the angle of incidence, measured from the normal.

From air into water at 45°

Bending toward the normal

Light travels about 1.333 times slower in water than in vacuum, which is what n = 1.333 means. A ray at 45° in air continues at 32.0° in the water: sin θ₂ = sin 45° ÷ 1.333.

The reflected ray is faint. Only 2.79% of the light is reflected here, and 97.2% goes on into the water. That faint glare off a pond is the reflection you see, and its share rises quickly as the angle gets close to 90°.

Refracted angle 32.0° Reflected 2.79% Transmitted 97.2% Speed in water 0.750 c

From air into glass at 30°

A stronger bend

Glass has n = 1.52, so a 30° ray in air bends to 19.2° inside it. Compared with water at the same angle the bend is bigger, because the index is higher.

4.41% of the light is reflected at this angle, a little more than for water at 45°. At normal incidence a glass surface reflects 4.26%, which is why a window shows a faint reflection of the room at night. The Brewster angle for air to glass is 56.7°, where light polarised in the plane of incidence is not reflected at all.

Refracted angle 19.2° Reflected 4.41% Brewster angle 56.7° Speed in glass 0.658 c

From water into air: total internal reflection

Critical angle 48.6°

Going the other way, from water into air, the ray bends away from the normal. The critical angle is arcsin(1 ÷ 1.333) = 48.6°. At 60° the law would need sin θ₂ = 1.15, which is more than 1, so there is no refracted ray.

All the light is reflected, so the water surface acts like a perfect mirror when you look up at it from underneath at a shallow angle. Drag the slider back from 60° to find the moment the refracted ray reappears at 48.6°, marked on the slider.

Critical angle 48.6° Reflected at 60° 100.0% Refracted none Speed in air ≈ 1 c

Why a diamond sparkles

Critical angle 24.4°

Diamond has n = 2.417, the highest of the four materials here. Its critical angle into air is only 24.4°. A ray hitting a facet from inside at 40.0° is totally reflected, and the cutter's job is to shape the facets so that light is turned around inside the stone and comes out through the top.

High index also means a big spread of colours. Diamond's dispersion (the colour spread) is about three times that of crown glass, which gives the flashes of colour called fire. Its high index also makes light bend strongly at the surface, so the stone looks brighter than glass cut the same way.

Critical angle 24.4° Glass for comparison 41.1° Reflected at 40° 100.0% Speed in diamond 0.414 c

An optical fibre: total internal reflection at work

Core 1.52, cladding 1.5

An optical fibre is a thin glass core inside a cladding of slightly lower index, here 1.52 and 1.5. The critical angle at the wall is 80.7°, so a ray that meets the wall at 85° is totally reflected at every bounce. 100.0% of the light stays in the core, however many bounces it makes.

Try lowering the angle to 70°, below the critical angle. Now each bounce loses 99.7% to the cladding, and after 20 bounces almost nothing is left. The numerical aperture, √(n₁² − n₂²) = 0.246, gives the widest cone of light that can enter the fibre from air and still be guided: 14.2°. Real fibres are about as thin as a hair and carry data as pulses of light.

Critical angle 80.7° Numerical aperture 0.246 Acceptance angle 14.2° Light kept at 85° 100.0%

A prism splits white light

Dispersion

The refractive index depends on wavelength. The simulation uses the Cauchy model with n(λ) = n + B × (1 ÷ λ² − 1 ÷ 0.589²), λ in micrometres, where n is the value at the yellow sodium line and B = 0.0042 µm² for glass. That gives n = 1.5165 for red at 700 nm and 1.5341 for violet at 400 nm, close to the figures for common crown glass.

With a 60° prism and an incident angle of 48° (close to the angle of least bend) red turns by 38.6° and violet by 40.3°, so the beam fans out by 1.61°. Put diamond into the prism and the spread is bigger, but at many angles the light is trapped inside. A rainbow in the sky is the same dispersion in raindrops.

Red bends 38.6° Violet bends 40.3° Spread 1.61° n red / violet 1.516 / 1.534

The four materials side by side

MaterialIndex nLight speedCritical angle into airBrewster angle from airReflected at 0° from air
Air1.0001.000 cnonen/a0%
Water1.3330.750 c48.6°53.1°2.04%
Glass1.520.658 c41.1°56.7°4.26%
Diamond2.4170.414 c24.4°67.5°17.2%

Values come from the formulas the simulation uses, for light of 589 nm in a vacuum-like air with n = 1. Real air is about 1.0003. The glass is a crown glass with n = 1.52 (common BK7 is 1.517). The Brewster angle is the angle at which light polarised in the plane of incidence is not reflected.

How the simulation works

For a ray at angle θ₁ in a material of index n₁ meeting a material of index n₂, Snell's law gives sin θ₂ = (n₁ ÷ n₂) sin θ₁. If the right side is 1 or more, there is no refracted ray and the reflection is total, and the critical angle is arcsin(n₂ ÷ n₁), which exists only when n₁ > n₂. The reflected ray leaves at the same angle θ₁ on the other side of the normal.

The share of light that is reflected comes from the Fresnel equations. For light polarised perpendicular to the plane of incidence, Rs = ((n₁ cos θ₁ − n₂ cos θ₂) ÷ (n₁ cos θ₁ + n₂ cos θ₂))². For the parallel polarisation, Rp = ((n₁ cos θ₂ − n₂ cos θ₁) ÷ (n₁ cos θ₂ + n₂ cos θ₁))². Ordinary light is a mix, so the simulation uses R = (Rs + Rp) ÷ 2 and transmission is 1 − R. The brightness of the drawn rays follows R on a perceptual scale (a 3% ray would be almost invisible on a linear scale); the percentages beside the rays and in the panel are exact.

In prism mode, the simulation traces 25 wavelengths from 400 to 700 nm through a 60° prism. At each face it applies Snell's law with the Cauchy index for that colour, and a colour that hits the second face beyond its critical angle is drawn reflecting inside instead of leaving. In fibre mode the ray zigzags along the core, and at each bounce it keeps a fraction R of its power and leaks the rest into the cladding.

What the model leaves out

  • Polarisation is averaged: the model treats light as unpolarised and averages the s and p reflectance. Polarised light, such as glare from a lake through polarising sunglasses, behaves differently.
  • No absorption or scattering: the materials are perfectly clear. Real glass, water and fibre absorb a little, and real fibre also loses light to bends and impurities.
  • Sharp, flat boundaries: real surfaces are rough or curved, and curved surfaces (lenses, raindrops) bend rays by an amount that depends on where they hit.
  • Simple dispersion: the Cauchy formula is a good fit across the visible range for glass but is an approximation. Diamond and water are fitted to published values near 589 nm, so the colour spread is about right but not exact. The custom material has no dispersion.
  • Fibre geometry is simplified: a real fibre is circular, the light travels in modes, and the ray picture is only a good approximation when the core is much wider than the wavelength.

Common misconceptions

“Slowing down alone cannot make light turn.” It can. A wavefront that meets the surface at an angle has one edge slow down before the other, so the whole wavefront swings round, in the same way a car turns when one wheel hits sand.

“Total internal reflection needs a mirror coating.” None is needed. The reflection is perfect (R = 1) beyond the critical angle, which is better than most metal mirrors, and it is why fibres and prisms in binoculars work.

“Rainbows need lots of colours to be added.” White light already contains every colour. A prism or raindrop only separates them by bending each wavelength by a different amount.

Frequently asked questions

What is Snell's law?

n₁ sin θ₁ = n₂ sin θ₂. It relates the angle of a ray to the normal on each side of a boundary, using the refractive index n of each material. A ray entering a higher index bends toward the normal. A short guide to related light physics is in the physics of thermal imaging.

What is the refraction of light?

Refraction is the change of direction of light as it passes from one transparent material into another, caused by the change in the speed of light. It makes a straw look bent in a glass of water and lets lenses focus light.

What is total internal reflection?

When light travels from a higher index to a lower one at more than the critical angle, it cannot refract and is reflected completely. For water to air the critical angle is 48.6°, for glass 41.1° and for diamond 24.4°.

What is the critical angle formula?

θc = arcsin(n₂ ÷ n₁), where n₁ is the higher index and n₂ the lower. For glass (1.52) to air (1.000) that is arcsin(0.658) = 41.1°. It does not exist when light goes into a higher index.

Why does a prism split white light into colours?

Because the refractive index is slightly higher for violet than for red, so violet bends more at each face. In crown glass n is about 1.516 for red and 1.534 for violet. Raindrops do the same to make a rainbow.

How do optical fibres use total internal reflection?

A fibre has a core of higher index inside a cladding of lower index. Light that meets the wall at more than the critical angle is totally reflected, and zigzags down the core with almost no loss at the wall. The simulation's fibre view shows the guided case and the leaking case.

Keep learning

More simulations