Refraction

Interactive simulation — adjust parameters and watch the visualization update in real time.

How it works

Snell’s law n₁ sin θᵢ = n₂ sin θₜ relates angles measured from the surface normal. When sin θₜ would exceed 1 (light going from the optically denser medium toward a rarer one at a large angle), all energy is reflected—total internal reflection.

Key equations

n₁ sin θᵢ = n₂ sin θₜ
θ_crit = arcsin(n₂/n₁)   (n₁ > n₂)