🌈Snell's Law Simulator - Refraction, TIR, Brewster Angle & Prism
Drag the incident ray between air, water, glass, diamond or any custom index: the refracted and reflected beams share the power according to the Fresnel equations, and the wave crests bunch up and slow down in the denser medium. Past the critical angle the refracted ray vanishes into total internal reflection, and at Brewster’s angle p-polarised light isn’t reflected at all. Prism mode traces every wavelength from 400 to 700 nm through BK7, fused silica, SF11 flint or diamond using their Sellmeier equations, splitting white light into a spectrum with deviation angles, minimum deviation and Abbe number. The apparent-depth tab shows how deep a pool really looks, including the shallower view at an angle.
Free · No sign-up · Runs in your browserLast updated:
How to use Refraction & Total Internal Reflection Simulator
- 1Choose the two media (or type a custom index) and drag the incident ray on the canvas, or use the slider
- 2Pick unpolarised, s or p light and read the refraction angle, reflectance and transmittance; jump to the critical or Brewster angle
- 3In prism mode, choose a glass and apex angle and drag the white beam to watch the spectrum and deviation
- 4In apparent depth, enter the real depth and viewing angle
FAQ
- When does total internal reflection happen, and how is the critical angle found?
- Light has to travel from a denser to a less dense medium (n₁ > n₂) and hit the boundary beyond the critical angle θc = arcsin(n₂/n₁). Snell’s law would then need sin θ₂ > 1, which has no solution, so there is no refracted ray and 100% of the power is reflected. The critical angle is about 48.6° for water to air, 41.8° for ordinary glass and only 24.4° for diamond, which is why light bounces around inside a cut diamond and makes it sparkle. Optical fibres trap light the same way, by TIR at the core–cladding boundary.
- What is Brewster’s angle and why do polarised sunglasses cut glare?
- At tan θB = n₂/n₁ the reflected and refracted rays are exactly perpendicular, and the reflection coefficient for p-polarised light (electric field in the plane of incidence) drops to zero, leaving only s-polarised reflected light. It’s about 53° for air to water and 56° for glass. Glare off water or a wet road near that angle is therefore strongly horizontally polarised, and polarised sunglasses that pass only vertical polarisation block it. Select p polarisation and press “Go to Brewster angle” to see the reflected ray disappear.
- How much light does a glass surface reflect at normal incidence?
- At normal incidence R = ((n₁ − n₂)/(n₁ + n₂))², about 4% for air to glass with n = 1.5, or roughly 8% for both faces of a pane. That’s why camera lenses get anti-reflection coatings: with many uncoated elements a lot of light would be lost and bounce around as flare. Reflectance rises with angle and approaches 100% at grazing incidence, which is why a lake seen from far away looks like a mirror.
- Why does a prism split white light into colours?
- Glass has a slightly different refractive index for each wavelength — dispersion. Shorter wavelengths see a higher index and bend more, so violet is deviated more than red. The tool computes n(λ) from the Sellmeier equation n² − 1 = Σ Bᵢλ²/(λ² − Cᵢ) and traces each wavelength separately, so the spread matches real glass. BK7 crown glass has an Abbe number near 64 and spreads light modestly; SF11 dense flint, near 26, fans the spectrum out more than twice as wide. Newton used exactly this to show that white light is a mixture of colours.
- Why does a swimming pool look shallower than it is?
- Light from the bottom bends away from the normal as it leaves the water, and your eye traces the ray straight back, placing the bottom higher than it really is. Looking straight down, the apparent depth is d′ = d·n_air/n_water ≈ 0.75d, so a 2 m pool looks 1.5 m deep. At an angle the bending is stronger and rays from different directions no longer meet at one point (astigmatism); the tangential image at d·(n_view/n_obj)·cos³θ_view/cos³θ_obj is shallower still, which is why the far end of a pool seems raised.