Underwater Caustics Simulator (2D)
Interactive 2D underwater-caustics simulator: a wavy water surface built from several sine waves refracts overhead sunlight (Snell's law, n=1.333) into a shimmering, moving network of bright and dark caustic lines on the pool floor.
This 2D top-down simulator ray-traces overhead sunlight through a physically modeled, ever-changing water surface — five superposed sine waves of different wavelength, direction and speed — refracting each ray at the air-water interface via Snell's law and following it down to a pool floor, where the accumulated density of ray landings paints the bright, shifting caustic network you'd see at the bottom of a real sunlit pool. Drag the amplitude slider to sharpen or soften the focusing, the speed slider to slow the pattern down to a near-still frame or set it rippling, and the depth slider to watch the same surface slopes paint a tight or a diffuse caustic net depending on how far the rays travel before they land.
A 2D top-down companion to the 3D underwater-caustics scene: thousands of parallel light rays are refracted through a five-wave water surface via Snell's law each frame and accumulated onto a floor grid, so the bright caustic network is a real ray-density map that sharpens, blurs and drifts as the amplitude, speed and depth sliders change.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install