3D Underwater Caustics: Sunlight Focused by Pool Waves

A Blender-built pool: sunlight is refracted ray by ray through moving waves and focused into the bright network on the floor.

Switch to 2D

Presets

Playback

Parameters

Camera

Layers

Quality

Model check

The science

What is modelled

Sunlight enters a swimming pool through a moving water surface. Wherever the surface is curved it acts like a small lens: it bends the rays (refraction) and neighbouring rays converge or spread. The bright, shimmering network on the pool floor is the caustic. The page traces about 65 000 rays per frame from the surface to the floor with the exact vector form of Snell's law and counts how much light lands in every patch of the floor, so cusps and folds appear exactly where rays cross.

Equations

  • Surface: η(x,z,t) = Σ ai cos(ki·x − ωit + φi), periodic over a 4 m tile. Gravity-capillary waves obey ω² = (g k + (σ/ρ) k³) tanh(k D).
  • Refraction (vector Snell): d′ = η d + (η cos i − √(1 − η²(1 − cos² i))) N with ratio η = 1/n; the sun ray is bent toward the normal in water.
  • The ray lands on the floor at X = x + d′x (D + η)/(−d′y). Intensity is the density of landing rays; a ray patch carries power E0 cos i / ny · T, where T is the unpolarised Fresnel transmission.
  • Focus of a single small wave at normal incidence: the Jacobian dX/dx = 1 + D ((n − 1)/n) η″ vanishes at Df = n/((n − 1) a k²) (the focal length of one refracting surface of curvature radius 1/(a k²)) and the caustic is sharpest there.
  • Seen from below, all light from the sky is squeezed inside the Snell window of half-angle asin(1/n) = 48.6°.

Checks run in the page

  • A single wave is traced with the full Snell tracer and the depth at which the ray map folds is compared with the focal-depth formula.
  • Energy conservation: the mean of cos(i)/ny over thousands of rays equals the flat-water value.
  • A grazing ray is refracted to the critical angle, and the dispersion relation reproduces its deep- and shallow-water limits.

Honest simplifications

Sunlight is a perfectly parallel beam; there is no scattering, absorption or dispersion of colours in the water (the real water has about 0.5 percent dispersion, which colours the caustic edges slightly). Light is treated geometrically, so very thin caustic lines are slightly blurred by the 128 by 128 floor grid and a small smoothing step. The waves are eight fixed, linear components, not a full ocean spectrum, and the floor texture repeats every 4 m. The ball only follows the local surface height and tilt, and it does not cast a refracted shadow on the floor.

What to try

  • Raise the wave amplitude, then change the depth until the red focus line in the second graph lines up with the yellow line for the sharpest caustic.
  • Lower the sun: the rays arrive obliquely and the pattern stretches and shifts across the floor.
  • Switch the liquid to glycerine: a larger refractive index bends rays more, so the focus moves much closer to the surface.
  • Choose the underwater camera to see the Snell window.
Loading model...
Loading Blender model...
Floor intensity distribution
Caustic contrast against water depth
Wave dispersion relation
Made with 🟠 Blender · Three.js