New Simulations
Total Internal Reflection
Tune cladding refractive index and watch the critical angle move. Full optical fibre cross-section with numerical aperture, evanescent field, and multi-mode propagation.
NewWater Caustics
GPU-computed caustic patterns on a height-mapped water surface. Real-time ripples perturb the wavefront; intensity focusing explains bright lines at the bottom of a swimming pool.
Expanded Simulations
Snell's Law
Drag the incident ray across up to four stacked media. Now includes Fresnel reflection coefficients (r_s, r_p), polarisation states and Brewster's angle demo.
Rainbow Formation
Dispersion through spherical rain droplets — primary (42°) and secondary (51°) bows, Alexander's dark band, wavelength-to-colour mapping via CIE 1931 XYZ.
Single-Slit Diffraction
Variable slit width, wavelength and screen distance. Fraunhofer regime intensity I(θ) = I₀ sinc²(πa sinθ/λ) — now also shows the near-field (Fresnel) diffraction transition.
Young's Double Slit
Interference + diffraction envelope. Add up to 12 slits (diffraction grating mode) and observe order collapse at the diffraction minimum — now with coherence length control.
Why water caustics? Caustics are one of the most mathematically rich optical phenomena — they arise from the focusing of light by a curved refractive surface and are described by catastrophe theory (fold and cusp catastrophes). The GPU implementation uses a photon-mapping approach: 256 k virtual photons are traced through the height-mapped surface per frame, accumulated in a floating-point texture, and tone-mapped to screen.