Snell's Law · SimulatorRefraction and Total Internal Reflection
A ray crossing between two media with adjustable indices; bend angle follows n₁sinθ₁ = n₂sinθ₂
Published: June 25, 2026
Objective
Verify that the refracted angle obeys n₁ sin θ₁ = n₂ sin θ₂ by reading the θ₂ readout at different index combinations, and identify the critical-angle threshold at which total internal reflection replaces transmission. The model assumes a planar interface, monochromatic light, and a single ray (geometric-optics limit, no diffraction or dispersion).
Setup
- Leave sliders at their defaults: n₁ = 1.00 (air), n₂ = 1.50 (glass), θ₁ = 40°. Press Start and observe the refracted ray bend toward the normal. The readout θ₂ should read approximately 25.4°.
- After the run completes, press Reset. Change n₁ to 1.50 and n₂ to 1.00 (glass into air). Keep θ₁ = 40°. Press Start: the refracted ray now bends away from the normal.
- Without resetting, drag θ₁ upward from 40° toward 85° in Fresh state. Watch θ₂ displayed in the readout grow; note that TIR reads 'No' throughout because 40° is still below the critical angle for n₁ = 1.50, n₂ = 1.00.
- Set θ₁ to 50° (above the critical angle 41.8°). Press Start: TIR flips to 'Yes', θ₂ shows 'TIR', and the refracted ray disappears while the reflected ray becomes bold.
- Reset and set n₁ = 1.33 (water), n₂ = 1.00 (air), θ₁ = 50°. Check whether TIR occurs (critical angle ≈ 48.8°, so 50° is just past it). Confirm TIR = 'Yes'.
Analytical Prediction
With n₁ = 1.00, n₂ = 1.50, and θ₁ = 40°, Snell's Law gives:
The Snell product n₁ · sin θ₁ = 1.00 · sin 40° ≈ 0.6428 is displayed in the `n₁ · sin θ₁` readout. For the TIR case with n₁ = 1.50, n₂ = 1.00, the critical angle is:
Any θ₁ > 41.8° produces TIR. At θ₁ = 50°, sin θ₁ = 0.766 and (n₁/n₂) · sin θ₁ = 1.149 > 1, confirming no real refracted angle exists.
Results Analysis
After pressing Start with the default settings (n₁ = 1.00, n₂ = 1.50, θ₁ = 40°), the `θ₂ (°)` readout shows approximately 25.4 and the `TIR` readout shows 'No'. The `n₁ · sin θ₁` readout stays at approximately 0.6428 regardless of θ₁, confirming the conserved Snell product. When TIR activates (n₁ = 1.50, n₂ = 1.00, θ₁ = 50°), `θ₂ (°)` switches to 'TIR', `TIR` switches to 'Yes', and `Reflectance` jumps to 1.000. The secondary panel (right) shows the θ₂(θ₁) curve: concave-up for air-to-glass (n₁ < n₂), with the live dot tracking the current angle; when n₁ > n₂ a red dashed vertical line marks θ_c and the curve terminates there.
Source of Error
The simulation models a single plane wave at a flat interface with no dispersion, so the refracted angle is exact by construction (closed-form arcsin). Physical idealizations omitted include: chromatic dispersion (real glass splits white light into a spectrum), surface roughness (scattering at a real interface), polarization-averaged reflectance (the sim uses s-polarization only), finite beam width and diffraction, and curved interfaces. Because the sim computes angles directly from the Snell formula rather than integrating a wave equation, there is no numerical drift: the residual between the predicted θ₂ and the readout is purely rounding at one decimal place display precision.
Further Exploration
- Set n₁ = 1.00 and n₂ = 1.00 so both media are identical. What angle does the ray take, and what does the Reflectance readout show? Does light reflect at an interface between equal media?
- Slowly increase n₁ from 1.00 to 2.50 while keeping n₂ = 1.00 and θ₁ = 30°. At what value of n₁ does TIR first appear? Compare that to the theoretical critical angle arcsin(n₂/n₁).
- Set n₁ = 1.33 (water) and n₂ = 1.00 (air). What is the critical angle? Fish living underwater see the entire above-water world compressed into a cone of half-angle equal to this critical angle (Snell's window). Calculate the cone's half-angle from your sim.
- Drag θ₁ from 5° to 85° at fixed n₁ = 1.00, n₂ = 1.50. Does θ₂ change linearly with θ₁? Why does the curve on the right panel bend upward rather than staying straight?
- Compare two complementary configurations: (a) n₁ = 1.0, n₂ = 1.5, θ₁ = 30° and (b) n₁ = 1.5, n₂ = 1.0, θ₁ = θ₂ from case (a). Do you recover the original incident angle? This is the principle of reversibility of light.