Snell's law describes how light bends when it crosses between two media: n1·sinθ1 = n2·sinθ2. Drag the sliders below to change the angle of incidence and the two refractive indices, and watch the ray refract, reveal a critical angle and trigger total internal reflection.

Why a straw looks snapped clean off at the waterline

A pencil standing in a glass of water appears bent, almost broken, right where it meets the surface, even though the wood is perfectly straight. That kink is refraction: light changes direction as it crosses between materials, and this simulator lets you dial that bend up and down. Drag the Angle of incidence slider — measured from the normal, the line perpendicular to the surface, never from the surface itself — and the Angle of refraction readout responds through Snell's law, n1 · sin(θ1) = n2 · sin(θ2).

The two index sliders set what the ray travels between. Raise the lower medium index above the upper one and the ray bends toward the normal, since a higher refractive index means slower light (n = c/v, always at least 1); drop it below and the ray swings away instead. Sending light from a denser into a rarer medium exposes a critical angle, and pushing the incidence past that value flips the total internal reflection indicator — the refracted ray vanishes entirely and all the light bounces back inside, the trick behind optical fibres and a diamond's sparkle.

One thing never budges: the colour. Frequency is fixed as the ray crosses the boundary, so only the speed and wavelength shift — a detail worth watching while you sweep the sliders and the readouts update in step. Put exact numbers to any configuration with the Snell's law calculator, then wander into more optics and motion demos over at our interactive physics lab shelf.

Frequently asked questions

What is Snell's law?

Snell's law relates the angles a light ray makes as it crosses between two media: n1·sin(θ1) = n2·sin(θ2), where n1 and n2 are the refractive indices and the angles are measured from the normal (the line perpendicular to the surface).

Why does light bend when it enters water or glass?

Light travels more slowly in a denser (higher-index) medium. Crossing into it, the ray bends toward the normal; crossing into a rarer medium it bends away. The change in speed, not the light's brightness, sets the bend — the frequency, and so the colour, stays the same.

What is total internal reflection?

When light travels from a denser medium to a rarer one and the angle of incidence passes the critical angle, no light refracts out — it all reflects back inside. This is what guides light along optical fibres and makes a diamond sparkle.

What is the critical angle?

The critical angle is the angle of incidence at which refraction just gives way to total internal reflection: θc = arcsin(n2/n1). It exists only when going from a higher-index medium to a lower one (n1 > n2).

References & formula source

  • Halliday, Resnick & Walker — Fundamentals of Physics, Chapter 33 (Electromagnetic Waves), refraction.
  • Young & Freedman — University Physics with Modern Physics, §33.2 (Reflection and Refraction) and §33.3 (Total Internal Reflection).
  • R. Nave — HyperPhysics, Georgia State University, "Refraction" / Snell's law section.