Light · free game
Laser Maze
Aim one beam. Snell’s law does the rest — four tanks, no way to lose.
Drag the beam — fire when the detector glows.
How the physics works
Every boundary here is horizontal, so the normal is vertical and every angle is measured from it. Snell’s law n₁ sin θ₁ = n₂ sin θ₂ then says the product N = n sin θ is the same in every layer: set the launch angle and you have set the ray angle everywhere at once. Inside a layer of thickness t the ray drifts sideways by t tan θ, so the landing point is just the sum Σ tᵢ tan θᵢ.
A ray can only cross into the next layer while N < n₂. When N ≥ n₂ Snell’s law has no solution and every photon reflects — total internal reflection, with the critical angle given by sin c = n₂ / n₁. That is the mirror wall of level 3. Because n depends on wavelength, each colour meets the same boundary with its own critical angle, which is how level 4 splits red from blue with a single launch angle. Light travels at v = c / n inside the medium, with c = 2.998 × 10⁸ m/s.
| Medium | n | v = c/n · 10⁸ m s⁻¹ | c into air |
|---|---|---|---|
| Water | 1.333 | 2.249 | 48.6° |
| Crown glass | 1.520 | 1.972 | 41.1° |
| Dense flint | 1.896–1.940 | 1.563 | 31.4° |
Ray model in two dimensions: partial (Fresnel) reflection is ignored, so a ray either refracts or totally reflects, and absorption is modelled only where a layer is explicitly opaque.