Rainbow Formation in Mist: Ray Optics & Dispersion (2D)
2D rainbow-optics lab: real Snell's-law refraction, internal reflection and dispersion traced through a water droplet, deriving the ~42° primary-bow angle per colour from a genuine minimum-deviation scan — not a decorative gradient.
This 2D companion to the 3D waterfall scene replaces the decorative rainbow arc with the actual geometric optics that produce one: every colour's bow angle is computed live by tracing Snell's-law refraction into a spherical droplet, one internal reflection, and refraction back out, then scanning the incidence angle to find the true minimum-deviation extremum — the same calculation that gives the textbook ~42° primary bow and its ~50–51° secondary. Sun elevation, droplet size and observer position all feed back into that same math, so the mist field's colour bands, the fogbow transition at small droplet sizes, and the bow sinking below the horizon at high sun are all consequences of the underlying ray trace, not scripted effects.
2D rainbow-optics lab with real Snell's-law refraction, internal reflection and per-wavelength dispersion, deriving the primary and secondary bow angles from a numerical minimum-deviation scan rather than a hardcoded value.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install