This simulator sends a light ray across a boundary between two transparent media and lets you adjust the incidence angle and each medium's refractive index. Snell's law, n₁ sin θ₁ = n₂ sin θ₂, is verified live on both sides of the boundary as you change any parameter.
• A two-medium ray diagram with the incident ray, a weak partial-reflection ray, and the refracted transmitted ray, plus the surface normal. • Three live controls: incidence angle (0°-89°), n₁ for the upper medium and n₂ for the lower medium (1.00-2.50 each). • Live readouts for θ₁, θ₂, and both sides of Snell's law (n₁sinθ₁ and n₂sinθ₂), which always match. • Four preset material pairs: air-to-water, air-to-glass, water-to-air, and air-to-diamond. • Automatic detection and explanation when the angle and index combination produces total internal reflection instead of transmission.
Light travels at different speeds in different media — slower in materials with higher refractive index. Refraction is the geometric consequence of that speed change: Huygens' principle shows that a wavefront crossing the boundary at an angle must bend, because the part of the wavefront still in the faster medium keeps moving ahead of the part now in the slower medium. Snell's law, n₁sinθ₁ = n₂sinθ₂, is the precise mathematical statement of that bending.
Going from a less-dense (lower n) medium into a more-dense (higher n) medium always bends the ray toward the normal — light slows down and compresses its wavefronts. Going the other way, from denser to less dense, bends the ray away from the normal, and if the incidence angle is steep enough, no real solution for θ₂ exists at all — that is total internal reflection, covered in its own dedicated lab.
Snell's law states n₁ sin θ₁ = n₂ sin θ₂, where n₁ and n₂ are the refractive indices of the two media and θ₁, θ₂ are the angles from the normal on each side of the boundary. It predicts exactly how much a light ray bends when crossing between media.
Because the wave slows down as it enters the higher-index medium, its wavefronts compress, which geometrically forces the ray direction to swing closer to the perpendicular (normal) at the boundary — confirmed directly by Snell's law since sinθ₂ = (n₁/n₂)sinθ₁ is smaller when n₂ > n₁.
There is no real angle θ₂ that satisfies Snell's law, so no light can refract through — instead all of it reflects back into the first medium. This is total internal reflection, and it can only happen going from a higher-index medium to a lower-index one.
Yes — a faint partial-reflection ray is always shown alongside the refracted ray, since every real boundary reflects some light even when most of it transmits; the simulator focuses its calculations on the refraction angle rather than the exact reflected/transmitted energy split.