Light

Lasers, mirrors and pieces of glass, and light traced through them by the rules it actually follows: it leaves a mirror at the angle it arrived; it bends crossing into glass, by Snell's law; a little of it reflects off glass anyway, by Fresnel's equations; past the critical angle, none of it gets out; and glass bends violet more than red, so white light comes apart into a spectrum.

Add as many lasers as you like, white or any colour, as a single ray or a wide beam. Drag things to move them; drag the ring on the one you've selected to turn it, or scroll over it. With angles on, every main ray shows its normal and the angles either side. Point at any place light meets a surface to read what happened there, Snell's law worked out. Colours add, the way light does. [ ] turn 1° · { } turn 15° · delete remove · esc deselect

All games · Home

Written in Dart, compiled to JavaScript, baked into this page. Rays only, no waves, except that the grating uses its equation to send each colour its own way. White light is 24 wavelengths from 400 to 700 nm. Indices follow Cauchy's formula.