Refraction & Snell's Law

Light bends when it changes speed. Send a ray down onto the boundary between two materials and watch it split — part reflects, part crosses over and refracts, kinking toward or away from the dashed normal. The bend follows Snell's law, n₁·sinθ₁ = n₂·sinθ₂: into denser glass it swings toward the normal, back out into air it swings away. Push the angle far enough going from glass to air and the ray cannot escape at all — total internal reflection, the trick behind optical fibres. Drag the incoming ray or set the angle and the two media, and read every angle live. It all runs on your device.

You are in the Physics lab.

Drag the incoming ray, or use the angle slider below
Angle of incidence θ₁45°
Angle of refraction θ₂
n₁ → n₂1.521.33
Critical angle
Behaviour
Toward the normal into denser, away from it into rarer. The refractive index n says how much a material slows light. Crossing into a higher-index medium the ray bends toward the normal; crossing into a lower-index one it bends away — always keeping n₁·sinθ₁ = n₂·sinθ₂. Go from dense to rare and there is a limit: past the critical angle θc = arcsin(n₂/n₁) the refracted ray would have to lie flat along the surface, so instead all of the light reflects back inside. That is total internal reflection, and it is what pipes light down an optical fibre.

How It Works

A change of speed at the boundary, a bend set by Snell's law, and a limit where light can no longer escape.

1

A ray meets a boundary

An incoming ray strikes the flat interface between two media and splits in two: some light reflects back into the first medium at the same angle, and the rest crosses into the second medium. All angles are measured from the dashed normal — the line perpendicular to the surface.

2

Snell's law sets the bend

The transmitted ray changes direction because light travels at a different speed in each material. The refractive indices and the angles obey n₁·sinθ₁ = n₂·sinθ₂, so entering a denser medium (higher n) the ray bends toward the normal, and entering a rarer one it bends away. Change the media and the angle and the readout updates both angles at once.

3

The critical angle

Going from a denser to a rarer medium, the refracted ray leans further from the normal as you raise the incidence angle. At the critical angle θc = arcsin(n₂/n₁) it lies flat along the surface, and beyond it Snell's law has no solution — the light is completely reflected back inside. Set glass or diamond on top of air and sweep the angle to watch total internal reflection switch on.

What is refraction?
Refraction is the bending of a wave — light, sound or water waves — as it passes from one medium into another where it travels at a different speed. Light slows down in denser materials, and at a slanted boundary the change of speed makes the ray change direction. It is why a straw looks broken at the water's surface and why lenses can focus light. This simulator shows a ray bending as it crosses a boundary and lets you change the angle and the materials.
What is Snell's law?
Snell's law relates the angles a ray makes with the normal on each side of a boundary to the refractive indices of the two media: n₁·sinθ₁ = n₂·sinθ₂. Because the index measures how much a material slows light, a ray entering a denser medium (larger n) bends toward the normal, and a ray entering a rarer medium bends away from it. This tool applies Snell's law directly, so you can read the incidence and refraction angles as you change the indices.
What is total internal reflection?
When light travels from a denser medium toward a rarer one, the refracted ray bends away from the normal. Beyond a certain incidence angle — the critical angle, θc = arcsin(n₂/n₁) — Snell's law has no solution and none of the light gets out: it is all reflected back into the denser medium. This is total internal reflection, and it is how optical fibres trap light and why a diamond sparkles. Set the top medium to glass or diamond here and raise the angle to see it happen.
Why does a straw look bent in a glass of water?
The light from the underwater part of the straw refracts as it leaves the water and enters the air, bending away from the normal because air is the rarer medium. Your eye traces that bent ray back in a straight line, so the submerged part appears shifted from where it really is, and the straw looks broken at the surface. It is the same Snell's-law bending this simulator shows — the size of the shift depends on the angle and on how different the two indices are.

Teaching or blogging about optics? You can embed this simulator on your own site free — one line of code, no sign-up.