From Rayleigh scattering and rainbow arcs to ray-traced reflections and GLSL shader tricks — explore how light bends, scatters and glows in real time.
Click any card to open the simulation live in your browser
Physics behind the simulations
Articles and tutorials about the algorithms in this category
Ray tracing, diffraction, interference, and atmospheric optics — visualised
Optics simulations model how light behaves as both a wave and a ray. Ray-tracing engines trace thousands of photon paths through lens systems, computing refraction with Snell's law and reflection with Fresnel coefficients. The double-slit wave simulation shows how coherent monochromatic waves produce interference fringes, and how adding more slits sharpens the pattern toward a diffraction grating spectrum.
Atmospheric optics simulations reproduce rainbows by ray-tracing sunlight through spherical water droplets and computing the angular distribution of wavelength-dependent refraction. Rayleigh scattering explains the blue sky and red sunset from first principles. These visualisations cover the same ground as university-level physical optics and geometric optics courses, making abstract wave phenomena directly observable and manipulable.
Each simulation in this category is built with accuracy and interactivity in mind. The underlying mathematical models are the same ones used in academic research and professional engineering — just made accessible through a web browser. Changing parameters in real time and observing the results is one of the most effective ways to build intuition for complex scientific and engineering concepts.
Topics and algorithms you'll explore in this category
Five quick questions to check your understanding of light and optics
Common questions about this simulation category