Snell's Law Refraction Simulator

Drag the angle slider to see how light bends when crossing a boundary between two media.

Loading interactive simulation...

Phase velocity mismatch and refractive boundaries 🖖

Snell's law, n₁ sin(θ₁) = n₂ sin(θ₂), describes the change in direction of a wave crossing a boundary between media with different refractive indices. This bending is caused by the difference in phase velocity of light in the media: v = c/n. When light moves from a denser medium to a less dense one, it bends away from the normal, leading to total internal reflection when the critical angle is exceeded.

Why a straw looks bent in water 🖖

When light passes from one material into another — say from water into air — it changes speed, and that speed change makes it bend at the surface. Snell's law, n₁ sin(θ₁) = n₂ sin(θ₂), turns this into an exact prediction of the new angle. The bigger the difference between the two refractive indices, the sharper the bend. That is why a straw in a glass of water looks broken at the waterline: light from its lower half reaches your eye along a bent path.

Light takes the fastest route, not the shortest 🖖

Fermat's principle says light travels between two points along the path that takes the least time — and Snell's law drops straight out of that rule. Because light is slower in the denser medium, bending at the boundary lets it cover less distance in the slow material, just as a lifeguard runs farther on sand to swim less in the water. Setting the total travel time to a minimum reproduces n₁ sin(θ₁) = n₂ sin(θ₂) exactly.

REFRACTION — WHICH WAY IT BENDS, AND WHEN IT STOPS GETTING THROUGH

Which Refraction Case Are You In?

Snell's law is one equation, n₁sinθ₁ = n₂sinθ₂, and reading it is a matter of comparing the two indices. Going into the slower medium the ray bends toward the normal and always gets through. Coming out into the faster one it bends away — and past a critical angle it cannot get out at all. That last case is not a formula failing; it is the physics changing.

Into the slower medium — bends toward the normal n₁ < n₂ ⇒ θ₂ < θ₁
A large index jump — the ratio does the work sinθ₂ = (n₁/n₂) sinθ₁
At the critical angle — the boundary that traps light sinθc = n₂/n₁
Past the critical angle — total internal reflection θ₁ > θc ⇒ ∄θ₂

01

Into the slower medium — bends toward the normal

What you know: n₁ < n₂. Light slows down as it crosses, so the refracted angle is smaller than the incident one. There is always a transmitted ray.

Snell: n₁ < n₂ ⇒ θ₂ < θ₁

Worked example: Air into water, n₁ = 1 and n₂ = 1.33 at 30° → sinθ₂ = 0.5/1.33 → θ₂ = 22.1°

Open this case: Air → Water
Into the slower medium — bends toward the normal. Entering a denser medium, the ray tilts toward the normal and keeps going. n₁ < n₂. Light slows down as it crosses, so the refracted angle is smaller than the incident one. There is always a transmitted ray.
Entering a denser medium, the ray tilts toward the normal and keeps going.

02

A large index jump — the ratio does the work

What you know: n₂ is much larger than n₁. Only the ratio matters, so a big contrast bends the ray hard even at a shallow incidence.

Snell: sinθ₂ = (n₁/n₂) sinθ₁

Worked example: Air into diamond, n₂ = 2.42 at 15° → θ₂ = 6.1°; the critical angle for diamond back to air is only 24.4°

Open this case: Air → Diamond
A large index jump — the ratio does the work. A high index bends the ray sharply and shrinks the critical angle for getting back out. n₂ is much larger than n₁. Only the ratio matters, so a big contrast bends the ray hard even at a shallow incidence.
A high index bends the ray sharply and shrinks the critical angle for getting back out.

03

At the critical angle — the boundary that traps light

What you know: n₁ > n₂, and the incidence sits right at sinθc = n₂/n₁. The refracted ray grazes along the surface at 90°; one step further and it is gone.

Snell: sinθc = n₂/n₁

Worked example: Glass to air, n₁ = 1.5 → θc = 41.8°. The preset sits at 42°, a fraction past it, so the ray is already fully reflected

Open this case: Fiber optic
At the critical angle — the boundary that traps light. Right at the critical angle the refracted ray lies flat along the surface. n₁ > n₂, and the incidence sits right at sinθc = n₂/n₁. The refracted ray grazes along the surface at 90°; one step further and it is gone.
Right at the critical angle the refracted ray lies flat along the surface.

04

Past the critical angle — total internal reflection

What you know: n₁ > n₂ and θ₁ > θc. Snell's law would need sinθ₂ > 1, which no angle satisfies: there is no transmitted ray at all.

Snell: θ₁ > θc ⇒ ∄θ₂

Worked example: Glass to air at 50°, well past the 41.8° critical angle → 100% of the light is reflected back into the glass

Open this case: TIR (glass→air)
Past the critical angle — total internal reflection. Beyond the critical angle nothing is transmitted: the surface becomes a perfect mirror. n₁ > n₂ and θ₁ > θc. Snell's law would need sinθ₂ > 1, which no angle satisfies: there is no transmitted ray at all.
Beyond the critical angle nothing is transmitted: the surface becomes a perfect mirror.
References (2)

Problems solved in full

  1. Light hitting water at 30° from air 5 steps

    Light hits water at 30°. Find where it goes and how much bounces back — then find the angle at which a fish cannot see out at all. n₁ = 1.00 (air), n₂ = 1.33 (water).

    1. Refraction is a statement about the component of the wave along the surface: it must match on both sides, or the wavefronts would tear. That matching condition is Snell’s law, and it follows from Fermat’s principle just as well.

    2. Solve for the transmitted angle. The simulator above prints this, and the ray bends toward the normal because it is entering the slower medium.

    3. How much reflects is a separate question that Snell’s law cannot answer — it needs the Fresnel equations, which treat the two polarisations differently.

    4. Unpolarised light is an equal mix, so average them. The tool prints this figure, and at 2% it is why a window is a window rather than a mirror.

    5. Now reverse the journey. Going the other way — water to air — there is an angle beyond which the equation demands sin θ₂ > 1, which has no solution.

    Answer

    22.08°, with 2.11% reflected. The critical angle of 48.75° is the interesting one: a fish looking up sees the entire sky compressed into a cone of about 98° directly overhead — “Snell’s window” — and outside that cone the surface is a perfect mirror showing it the riverbed. The same failure of the equation to have a solution is what traps light inside an optical fibre, so the world’s data travels on an arcsine that ran out of range.

  2. A ray bent to 22.08° with a reflectance of 2.11% 6 steps

    The panel bends the ray to 22.08° and reports a reflectance of 2.11%. That figure is an average of two numbers it does not show separately — and at one particular angle, one of them is exactly zero. Find it.

    1. Start with the refraction the panel prints, straight from Snell's law at 30° into water.

    2. Now look at what the reflectance actually is. Light has two polarisations relative to the surface, they reflect by different amounts, and 2.11% is their mean. An average is only worth taking when the two are comparable.

    3. Write the parallel polarisation's Fresnel coefficient and ask when its numerator vanishes. That is an honest algebraic question with an exact answer.

    4. That condition rearranges into something remarkable: it holds exactly when the reflected and refracted rays leave at right angles to each other. Substituting turns the whole thing into a single tangent.

    5. Put the water in. At 53.06° the parallel component reflects nothing whatsoever, and everything that bounces off the surface is polarised the other way.

    6. Note where that sits relative to the other special angle the tool knows about — total internal reflection, which lives on the far side of the boundary and at a smaller angle.

    Answer

    At Brewster's angle, 53.06° for air into water, the reflected light is completely polarised, because one of the two components reflects zero. This is not a curiosity — it is why a polarising filter kills the glare off a lake or a windscreen while leaving the scene behind it untouched, and why the filter has to be rotated to work. The averaged 2.11% on the panel is a true number that conceals the useful one: the interesting physics is in the difference between the two polarisations, not their mean.

Learning path

Bending light

Leads to Ray-tracing a lens the single boundary and the rule that governs it, together with the reason behind the rule.

Example problems