Light & Refraction
Explore the law of reflection, Snell's law and total internal reflection interactively — adjust refractive indices and incidence angle and see the real reflected and refracted ray angles recompute live.
This simulation applies the law of reflection (the angle of reflection always equals the angle of incidence) and Snell’s law of refraction (n₁sinθ₁ = n₂sinθ₂) to light crossing a flat boundary between two transparent media, including total internal reflection past the critical angle (θc = asin(n₂/n₁), when travelling from a denser medium into a less dense one) — the standard equations found in any introductory optics text, using real reference refractive indices (air, water, crown glass, diamond — CRC Handbook of Chemistry and Physics), computed by `@scienceverse/simulations-core`’s real, tested `optics` model, not an approximation invented for this page.
Both media’s refractive indices and the incidence angle are each adjustable within a scientifically valid range (n = 1–3, 0–90°). Every recomputation runs in a dedicated Web Worker, off the page’s main thread. A shareable link captures the exact current parameters. Readers whose browser cannot run canvas rendering, who prefer reduced motion, or who have JavaScript disabled see the real computed reflection and refraction angles below instead, in an accessible ray diagram and data table.
Loading the Light & Refraction explorer…