🔮

Optics & Light

From Rayleigh scattering and rainbow arcs to ray-traced reflections and GLSL shader tricks — explore how light bends, scatters and glows in real time.

Optics is the branch of physics that studies how light behaves — how it reflects, refracts, diffracts, scatters and interferes as it travels through lenses, mirrors, prisms, water droplets and the atmosphere. With each interactive Optics simulation here you can adjust angles, wavelengths and refractive indices in real time and watch the laws of light respond, from Snell's law and total internal reflection to Fresnel reflectance and wave interference. You will learn the geometric and wave models that explain rainbows, blue skies, optical fibres, holograms and diffraction gratings. These browser-based tools turn abstract equations into something you can see and manipulate, making Optics intuitive for students, teachers, engineers and anyone curious about why light does what it does.

8+ simulations Three.js · GLSL Ray Tracing · SDF · Fresnel

Optics Simulations

Click any card to open the simulation live in your browser

🎫
★★★ Advanced New
Holography Concept
Record a hologram as the interference of object and reference beams, then replay it to reconstruct the wavefront — virtual, real and undiffracted orders. Fringe spacing Λ=λ/(2sin(θ/2)).
HolographyInterferenceWavefrontCanvas 2D
🌈
★★★ Advanced New
Diffraction Grating
Adjust slit spacing, wavelength and number of slits to see sharp principal maxima, the single-slit envelope and rainbow spectra. Computes resolving power R = mN, angular dispersion and free spectral range live.
Diffraction Spectroscopy Interference Canvas 2D
🌐
★★★ Advanced
Moiré Patterns — Beat Frequencies
Overlay two periodic patterns at slightly different angles or pitches and watch the moiré beat pattern emerge. The predicted period d_m = d₁d₂/√(d₁²+d₂²−2d₁d₂cosθ) is shown live.
Canvas 2D Moiré Beat Pattern Interference
🌀
★★★ Advanced
Optical Vortex Beams — OAM
Laguerre–Gauss beams carry orbital angular momentum: a helical phase exp(iℓφ) makes a doughnut intensity with a dark core. Interfere them to see the spiral and fork patterns that measure OAM.
Canvas 2D Laguerre-Gauss OAM Vortex
🎭
★★★ Advanced
Holography — Recording & Reconstruction
Record a hologram as the interference of an object wave and a reference beam, then reconstruct the image. Drag object points, change wavelength and reference angle, watch fringes form.
Canvas 2D Holography Interference Diffraction
🌈
★★★ Advanced
Ice Halos & Sun Dogs
Monte-Carlo atmospheric optics: refract sunlight through hexagonal ice crystals and watch the 22° halo, sun dogs, 46° halo and circumzenithal arc emerge from real Snell's-law physics.
Canvas 2D Atmospheric Optics Ice Halo Monte Carlo
🔴
★☆☆ Beginner New
Laser Labyrinth — Reflection & Refraction
Bounce a laser beam off mirrors and through glass to hit the target. Explore the law of reflection, Snell's law, and total internal reflection. Drag mirrors, rotate with scroll, build your own optics puzzles.
Ray Tracing Snell's Law Canvas 2D
🌈
Popular ★★☆ Moderate
Atmospheric Optics
Rayleigh scattering drives the blue sky. Watch it shift to red at sunset. Includes a 22° ice-crystal halo and ray-tracing through a single water droplet to produce a rainbow arc.
Rayleigh Ray Tracing Canvas 2D
🌦️
★☆☆ Easy
Rainbow Formation
Snell's law, internal reflection and wavelength-dependent dispersion inside a spherical water droplet. Reveals why your primary and secondary rainbows sit at 42° and 51°.
Snell's Law Dispersion Wave Optics
💠
★☆☆ Easy
Kaleidoscope
Mirror reflections with n-fold symmetry, generated in a WebGL fragment shader. Change the segment count and shape in real time via sliders.
GLSL Symmetry Fragment Shader
🌀
★★☆ Moderate
Fractal Explorer
Mandelbrot and Julia sets rendered with distance estimation colouring and smooth iteration count. Infinite zoom via a GLSL fragment shader — no CPU involvement once loaded.
GLSL Mandelbrot Distance Estimation
❄️
★★☆ Moderate
Snowflake Crystal Growth
Reiter's diffusion-limited model grows a six-fold symmetric crystal in the browser. Adjust humidity and temperature to switch between plate, dendrite and needle morphologies.
Diffusion Symmetry Canvas 2D
🔺
★☆☆ Easy
Sierpiński Triangle
IFS iterated function system and chaos game generating the Sierpiński fractal. Hausdorff dimension ≈ 1.585 — explore why fractals have non-integer dimension.
IFS Fractal Chaos Game
🪞
★☆☆ Beginner
Mirror Maze
Ray tracing in 2D: place plane mirrors and watch light beams reflect via Snell's law. Build kaleidoscopic patterns or focus rays to a point — geometry-only, no shaders needed.
Ray Tracing Snell's Law Canvas 2D
🎨
★☆☆ Beginner
Color Mixing
Interactive additive (RGB light) and subtractive (CMY pigment) color mixing. Drag spotlights to overlap; see how mixing primaries produces white or brown — the physics of paint vs light.
RGB CMY Canvas 2D
🌑
★☆☆ Beginner
Light & Shadows
Point and area light sources cast umbra and penumbra. Drag objects to see shadow sharpness change with light size — demonstrates why the Sun casts harder shadows than an overcast sky.
Umbra Penumbra Canvas 2D
🔍
★★☆ Moderate
Mirrors & Lenses
Interactive geometric optics ray tracer. Choose converging or diverging lenses and mirrors, adjust focal length, and watch three principal rays form real or virtual images.
Geometric Optics Thin Lens Canvas 2D
〰️
★★☆ Moderate New
Diffraction & Interference
Huygens-principle wave field for single slit, Young's double slit and diffraction grating. Fraunhofer intensity curve overlay. Adjust wavelength, slit width, separation and grating line count.
Huygens Fraunhofer Canvas 2D
🔬
★★☆ Moderate New
Snell's Law — Refraction & TIR
Set the angle of incidence and refractive indices n₁, n₂ — watch the refracted ray bend by Snell's law n₁sinθ₁ = n₂sinθ₂. Increase θ₁ past the critical angle to trigger total internal reflection (the principle behind optical fibre).
Snell's Law Refraction Fiber Optics Canvas 2D
💎
★☆☆ Beginner New
Total Internal Reflection
Drag to set the angle of incidence. Watch refracted and reflected rays obey Snell's law — then exceed the critical angle and see TIR lock in. Fresnel reflectance (Rs, Rp) and fibre optic demo.
TIR Fresnel Canvas 2D
🌅
★★☆ Moderate New
Water Caustics
Sunlight refracts through a wavy water surface (Snell's law, n=1.333) and focuses into shimmering caustic patterns on the pool floor. Adjust wave amplitude, frequency, depth and sources.
Snell's Law Caustics Refraction Canvas 2D
🔮
★★☆ Moderate New
Light Polarization
Explore Malus's Law, Brewster's angle, five polarization wave types, and birefringence with a wave plate. Fresnel Rs/Rp equations computed live.
Malus's Law Brewster Birefringence Canvas 2D
🔴
★★★ Advanced
Airy Disk
Diffraction-limited imaging through a circular aperture. Rayleigh criterion and effect of aperture/wavelength.
Diffraction Rayleigh Criterion Canvas 2D

Key Optical Phenomena

Physics behind the simulations

🔵
Rayleigh Scattering
Intensity ∝ λ⁻⁴ — shorter wavelengths (blue) scatter more. Explains the blue sky and red sunsets.
↩️
Snell's Law
n₁ sin θ₁ = n₂ sin θ₂. Governs refraction at every interface — from lenses to raindrops.
🪞
Fresnel Reflectance
Reflection probability depends on the angle of incidence. At grazing angles almost all light reflects — seen on water surfaces.
🌊
Wave Interference
Constructive and destructive superposition of coherent waves. Produces iridescence, soap-bubble colours and diffraction patterns.

Learning Resources

Articles and tutorials about the algorithms in this category

About Optics & Light Simulations

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.

Key Concepts

Topics and algorithms you'll explore in this category

Interactive ModelReal-time browser simulation with live parameter controls
WebGL / Canvas 2DHardware-accelerated rendering in the browser
Mathematical FoundationDifferential equations and numerical integration
Open SourceMIT-licensed code — inspect, fork, and learn
No Install RequiredRuns directly in Chrome, Firefox, Safari, Edge
Educational FocusBuilt to explain the underlying science clearly

🔭 Test Your Optics Knowledge

Five quick questions to check your understanding of light and optics

Optics Quiz

Frequently Asked Questions

Common questions about this simulation category

Do these simulations require installation?
No. Every simulation runs entirely in your web browser using WebGL and Canvas 2D. Nothing to install or download — open the page and the simulation starts immediately.
Can I use these simulations for teaching?
Yes — all simulations are designed to be educational and run without an account or login. They are widely used in university lectures, high-school science classes, and self-directed learning. Embed them via iframe or link directly.
What devices do the simulations support?
All simulations work on desktop browsers (Chrome, Firefox, Edge, Safari). Many work on mobile and tablets too, though some physics-heavy simulations benefit from the GPU performance of a desktop or laptop.
How does the ray tracing simulation handle refraction and total internal reflection?
The ray tracing simulation applies Snell's law n₁ sin θ₁ = n₂ sin θ₂ at every interface. When the angle of incidence exceeds the critical angle θ_c = arcsin(n₂/n₁) for a ray passing from a denser to a less-dense medium, total internal reflection occurs and no refracted ray is generated — exactly as in optical fibres and diamond facets.

Explore Other Categories

Every Optics simulation in this collection runs free in your browser, letting you learn Optics online without any downloads or accounts. Each interactive Optics model is built on the real physics of light — Snell's law, Fresnel coefficients, diffraction and Rayleigh scattering — so adjusting wavelength, angle or refractive index gives instantly accurate results. These visualisations underpin real-world applications such as fibre-optic communications, where total internal reflection guides light along glass cables across continents. Whether you are revising for a physics exam, preparing a lesson or exploring how lenses, rainbows and holograms work, this interactive Optics model library makes the science of light tangible, hands-on and easy to understand at your own pace.