Interactive STEM simulation
Refraction Lab — Snell's Law & Total Internal Reflection
Explore Snell's law and total internal reflection with this free online refraction simulator. Choose optical media, set the incident angle, and observe refraction, reflection intensity, and TIR with white light.
Community Feedback0 Comments
Share Your Experience
Refraction Lab — Snell's Law & Total Internal Reflection
This refraction lab simulates light crossing the interface between two optical media chosen from a list of eight materials including air, water, crown glass, flint glass, acrylic, diamond, ice, and sapphire. An incident ray produces a refracted ray and reflected ray with labeled angle arcs θ₁ and θ₂. When n₁ > n₂, a critical angle dashed line appears, and exceeding it triggers total internal reflection with a TIR banner. White light mode shows six spectral colors refracting at slightly different angles to demonstrate dispersion. A bottom panel shows transmitted and reflected intensity percentages.
What you can do in this simulation
- Choose from 8 optical materials for each medium: air, water, glass, diamond, and more
- Set incident angle (0–89°) with a slider or number input
- Toggle white light to show spectral dispersion across 6 wavelengths
- Enable parallel rays for multi-ray visualization
- Toggle normal line, angle labels, and TIR detection
Concepts covered
Snell's law · refraction · total internal reflection · critical angle · refractive index · optical dispersion
Why light bends: Snell's law
When light crosses from one medium into another — air into glass or water — it changes speed, and that change of speed bends its path. Snell's law captures it exactly: n₁ sinθ₁ = n₂ sinθ₂, where each n is the medium's refractive index and each θ is measured from the normal. Drag the incident ray in the lab and watch the refracted ray swing to obey this relationship in real time.
Light entering a denser medium (higher n) bends toward the normal and slows down; leaving into a less dense medium it bends away and speeds up. The bigger the index difference, the sharper the bend.
Total internal reflection and the critical angle
Push the angle of incidence higher while going from a dense to a less dense medium and the refracted ray bends further and further toward the surface — until, at the critical angle, it grazes along the boundary. Beyond that angle no light escapes at all: it is entirely reflected back, a phenomenon called total internal reflection.
The lab lets you find the critical angle for any index pair by sweeping the angle until the refracted ray vanishes. This is exactly the physics that traps light inside optical fibres and makes diamonds sparkle.
Dispersion — why prisms make rainbows
A medium's refractive index depends slightly on the colour (wavelength) of light: violet bends a touch more than red. Send white light through the prism mode and the lab fans it out into a spectrum, because each colour refracts by a different angle.
This is the same dispersion that paints rainbows after rain and that astronomers exploit to split starlight into the spectra that reveal what stars are made of.
Where refraction shows up
Refraction explains why a straw looks bent in a glass of water, how lenses in glasses and cameras focus light, and how fibre-optic cables carry the internet as pulses of trapped light. It is a guaranteed ray-optics topic in CBSE, JEE, NEET, and AP Physics.
Being able to apply Snell's law and find a critical angle by reasoning from the geometry — rather than memorising — is exactly what those exams reward, and this lab builds that intuition by letting you drag the rays yourself.
Related simulations
- Optics Lab — Interactive Ray Tracing Sandbox
- Inclined Plane & Friction Simulator: Will the Block Slide?
- Acoustics & Sound Waves — Interactive Simulator
- Angular Momentum Simulator: The Spinning Skater Effect
- Black Hole Simulator — Gravity & Spacetime
- Brachistochrone Curve Simulator - Fastest Ramp
Browse all Physics simulations →
Related reading
Free to use in your browser — no signup required. Found a bug or have an idea to make it better? Tell us.
Finished experimenting?
Save one completion to this browser's signed guest ledger, or directly to your account when signed in.