Underwater Caustics
Sunlight refracted by a wavy water surface gathers into moving bright lines: the patterns on the floor of a swimming pool.
On a sunny day the floor of a swimming pool is covered with a moving net of bright lines. Each wave on the surface acts as a weak lens: light that enters on the side of a crest bends toward the light that enters on the other side, and below the crest the rays cross. Where many rays pass close together the light is concentrated, and these bright curves are called caustics.
This document follows 400 vertical sunrays. Ray j meets the surface y = \eta(x) at x = s(j) , where the slope is d(s(j)) , and refracts by Snell's law: the index ratio from air to water is m = 0.75 , c(j) is the cosine of the angle of incidence, and r(j) is the horizontal drift of the refracted ray per unit of depth. Under the water, ray j is the line x = s(j) + (y - \eta(s(j)))\,r(j) . L(x, y) puts a narrow Gaussian around every ray and adds them up, so it counts the rays near each point: that is the brightness.
The caustics start as cusps a short distance below the crests, where the rays first cross, and then split into two bright lines that go down and cross the lines from the neighbouring crests. The surface is two waves that move in opposite directions at different speeds, so the pattern changes all the time; T animates over one full period of both. Edit the amplitudes in \eta (and the matching coefficients in its slope d ) to see how steeper waves bring the cusps closer to the surface.
After a Desmos graph by Fabrice Neyret.
JavaScript is required to view the interactive plot.