🇺🇦 Українська

🌅 Water Caustics — Light Refraction on a Pool Floor

Sunlight refracts as it enters water (Snell's law: n₁·sin θ₁ = n₂·sin θ₂, nwater=1.333). The undulating surface focuses and defocuses rays, creating the familiar shimmering caustic patterns on the floor of a swimming pool or sunlit sea-bed.

Scene

Parameters

Info

Refr. index n1.333
Critical angle48.6°
Wave sources3
Depth1.5 m
Amplitude0.012

Physics

The water surface is modelled as a superposition of N sinusoidal waves: h(x,y,t) = Σ A·sin(kx·x + ky·y − ωt + φ). At each grid point, the surface normal is computed by finite differences, and Snell's law n₁·sin θ₁ = n₂·sin θ₂ (n₁=1.0, n₂=1.333) gives the refracted ray direction. Each refracted ray is traced to the pool floor, accumulating photon density to form the caustic intensity map.

Where surface curvature focuses many rays onto a small floor area, the intensity spikes — producing the bright caustic lines. Deeper water spreads the pattern; shallower water makes it sharper and more chaotic.

Did you know?

"Caustic" comes from the Greek καυστική meaning "burning" — a focusing mirror or lens can create a caustic hot enough to ignite fire. The shimmering network you see on pool floors, the bright ring inside a coffee cup, and the light patch at the bottom of a glass of water are all everyday caustics.

About Water Caustics

This simulation traces sunlight as it refracts through a wavy water surface and lands on a pool floor, forming the shimmering bright lines known as caustics. The surface is modelled as a sum of N sinusoidal waves, h(x,y,t) = Σ A·sin(k·x − ωt + φ). At every grid point a surface normal is found by finite differences, and Snell's law, n₁·sinθ₁ = n₂·sinθ₂ with n₂ = 1.333, bends each downward ray.

Each refracted ray is traced to the floor at the chosen depth, and many rays converging on a small area pile up to create bright caustic lines. The controls set wave amplitude, spatial frequency, water depth, the number of wave sources and the playback speed, while the Calm, Pool and Ocean presets jump between gentle and choppy conditions. The same optics explain the dancing light at the bottom of any sunlit pool or sea-bed.

Frequently Asked Questions

What are water caustics?

Water caustics are the bright, shifting networks of light you see on the floor of a swimming pool or shallow sea-bed. They form because an uneven water surface acts like a field of tiny lenses, focusing refracted sunlight into concentrated lines and patches separated by darker regions.

How does the simulation create the pattern?

It builds a height field for the water surface from several sine waves, computes the surface normal at each point using finite differences, then refracts a vertical ray of sunlight through that point with Snell's law. Each ray is traced to the floor and its arrival is splatted into an intensity buffer, so areas where rays converge glow brightly.

What is Snell's law and which value of n is used?

Snell's law states n₁·sinθ₁ = n₂·sinθ₂, relating the angles of incidence and refraction at a boundary. Here light passes from air (n₁ = 1.0) into water (n₂ = 1.333), so rays bend towards the surface normal as they enter the denser medium.

What do the amplitude and frequency controls do?

Wave amplitude (0.003 to 0.035 in world units) sets how steep the ripples are, which controls how strongly the surface focuses light. Spatial frequency (0.5 to 6.0) sets how many ripples fit across the surface; higher values produce a finer, busier caustic mesh.

How does water depth change the caustics?

Depth (0.3 to 4.0 m) is the distance each refracted ray travels before hitting the floor. Deeper water lets rays spread further apart, smearing the pattern into broad, soft bands, while shallower water keeps rays tight, giving sharper, more chaotic caustic lines.

What are the wave sources and presets?

The simulation holds six fixed wave descriptors with different directions, speeds and phases; the "wave sources" slider (1 to 6) chooses how many are added together. The Calm, Pool and Ocean buttons set amplitude, frequency, depth, source count and speed to model still water, a typical pool and a choppy ocean surface respectively.

Why do bright caustic lines appear where they do?

Where the surface curves like a converging lens, neighbouring rays are bent towards the same spot on the floor, so photon density spikes and a bright line forms. Where the surface curves the other way, rays diverge and the floor stays dark, producing the characteristic web of light and shadow.

Is this physically accurate?

It captures the correct physics of refraction and ray convergence using the real refractive index of water and the vector form of Snell's law. It is a simplification, though: it ignores wavelength-dependent dispersion, reflection losses at the surface, absorption in the water and full wave diffraction, so it is a strong qualitative rather than exact model.

What is the critical angle shown as 48.6°?

The critical angle is the angle of incidence inside water at which light can no longer escape into air and is totally internally reflected, given by sinθℂ = 1/1.333, about 48.6°. It is displayed for reference; the downward sunlight in this scene strikes the surface near vertical, so it always refracts through rather than reflecting.

Where do caustics matter in the real world?

Beyond pool floors, caustics appear as the bright cusp inside a coffee cup, the focus of a magnifying lens and ripple patterns on the sea-bed. The word comes from the Greek for "burning" because a focusing surface can concentrate enough light to start a fire, and game and film artists render caustics to make water look convincing.