A laboratory for light

Light, exactly
as it behaves.

Photonica simulates light the way physics does. Every ray carries its own wavelength, every lens is real glass, every photon arrives exactly when it would. Build any optical experiment you can imagine, measure it like an instrument, design optics you could manufacture, and watch light itself cross the room.

Windows 10 / 11 · RTX-class GPU · free
Live · SF11 prism · real Sellmeier dispersion
33 / 33checks against closed-form physics
17experiments, ready to open
Real timeray traced on your GPU
MCPan AI can run the lab
Who it's for

One lab. Every kind of curious.

For students

The textbook, running.

Snell's law, lenses, total internal reflection, polarisation, diffraction. Change one number and the physics answers back with a measurement — the same numbers your exam expects, now something you can hold.

Start with light & colour →
For the curious

Rainbows, diamonds, and light slowed two billion times.

Why a diamond throws fire, how one raindrop makes a rainbow, what a pulse of light looks like halfway across a table. Open a demo, drag a prism, and see it happen.

Your first experiment →
For engineers

Design it. Tolerance it. Build it.

Real glass catalogues, thin-film coatings, a damped least-squares optimiser, Monte-Carlo tolerancing with yield, Zemax import, and every measurement exported as raw JSON.

Lens design →
Try it right here

Why white light splits.

Glass slows light down — but not every colour by the same amount. Violet crawls, red slips through, and so each colour leaves a prism at its own angle. That one fact is behind every rainbow, the fire in a diamond, and the coloured fringes on a cheap lens.

The slider runs the same dispersion formula Photonica uses for every ray: the Sellmeier equation, with the manufacturer's coefficients for two real glasses.

n²(λ) = 1 + Σ Bᵢλ² / (λ² − Cᵢ)

SF11 · 60° apex
532 nmgreen
n, BK7 crown
1.51947
n, SF11 flint
1.79482
bent by the prism
67.64°
speed inside SF11
167,032 km/s
Rays & real glass

Every ray is a real wavelength.

Nothing in Photonica is painted on. White light is dozens of wavelengths travelling together, glasses bend each one by their measured dispersion, and every surface splits the power between reflection and transmission the way Fresnel's equations say it must.

  • Manufacturer Sellmeier and Schott data; load any Zemax AGF catalogue
  • Fresnel reflection, total internal reflection, thermal dn/dT
  • Anti-reflection, mirror and dichroic thin-film coatings
  • Lenses, aspheres, prisms, gems, water, mirrors, splitters, gratings
  • Every reflection branch followed — including the ghosts
White light entering a glass prism and leaving as a spectrum, in Photonica
24 λwavelengths in one white beam
Time of flight

Light has a speed. Watch it.

Every photon carries a real arrival time, slowed by exactly the right amount in every piece of glass it crosses. Slow the clock down two billion times and a pulse of light walks across your bench — and the screens stay dark until it has genuinely arrived.

  • Group-delay timing on every path, femtosecond resolution
  • Light-in-flight playback with a Blender-style loop range
  • Screens that show only light that has already arrived
  • A planet-scale calculator: fibre, satellites, the Moon, Mars, Voyager
A light pulse caught mid-flight in Photonica, with the slow-down factor overlaid
2.1 billion×slower than light
Waves & polarisation

Not just rays. Waves.

When the geometry runs out, the wave takes over. Photonica sums Huygens wavelets for slits and apertures, sends light through diffraction gratings order by order, and carries a full polarisation state — so a quarter-wave plate really does make circular light.

  • Double slits and pinholes as Huygens–Fresnel sums
  • Diffraction gratings with per-order efficiency
  • Jones-vector polarisation and a live Stokes readout
  • Point spread function, Strehl ratio and MTF
Young's double-slit interference fringes on a screen in Photonica
λL / dfringe spacing, measured
Lens design

From sketch to something you could build.

Describe what a lens should do — a focal length, a spot size, zero colour error — and the optimiser bends the surfaces until it does. Then tolerancing asks the hard question: when real glass is ground slightly wrong, how many of the lenses you make will still work?

  • Damped least-squares optimiser: curvatures, thicknesses, spacings, conics, tilts
  • Operands for spot size, focal length, collimation, chromatic focus
  • Monte-Carlo tolerancing with a refocus compensator and yield
  • Collision checks: unbuildable designs count as failures
  • Import Zemax .zmx lens prescriptions
Photonica's optimiser and tolerancing panel designing an achromatic doublet
1320×merit improvement, 7 iterations
Photoreal & video

Cinematic, when you want it.

Press P and the same scene becomes a spectral path-traced photograph: caustics pooling behind glass, beams glowing through haze, bloom around the brightest light. Then set camera keys on a timeline and render it — reel, square, widescreen or 4K.

  • Spectral path tracer with caustics, haze, bloom and depth of field
  • Camera timeline with eased keyframes and orbits
  • Reel 9:16, square, 4:5, 16:9, 21:9 and 4K formats
  • Burned-in time-of-flight stats and a watermark, if you want them
Photonica's render timeline preparing a video of light in flight
4Kstraight to mp4
AI in the lab

Your assistant can run the bench.

Photonica speaks MCP, the open protocol AI assistants use to work with tools. Ask Claude to build a telescope, measure its magnification and check it against theory — it places the lenses, reads the numbers, and verifies its own work on your screen. That's exactly how Photonica's own validation suite was run.

  • 28 tools: build, measure, trace a ray, optimise, tolerance, screenshot, render
  • Reads polarisation state, arrival times and detector power directly
  • Local only: a private pipe on your machine, switchable off in one click
MCP reference →
# connect Claude Code to Photonica
claude mcp add photonica -- "…\photonica-mcp.exe"

# then just ask, in plain words:
"Build a Keplerian telescope with a 500 mm objective
 and a 50 mm eyepiece, find the spacing that
 collimates the output, and check the angular
 magnification against −f₁/f₂."
Checked, not claimed

We tested it against the textbook.

Thirty-three classic experiments — Snell, Fresnel, Brewster, the critical angle, the thick-lens equation, prism dispersion, achromats, Malus's law, wave plates, gratings, telescopes — each run through Photonica and compared to its closed-form answer. Every number and every method is published.

33/33closed-form checks passed
0.02%median relative error
5fields: interfaces, lenses, dispersion, polarisation, waves
0results hidden or rounded away

Read the full validation report ↗

DXR
The honest bit

The only thing we won't fake is your GPU.

Photonica ray traces every photon in real time, so it needs a DirectX Raytracing 1.1 graphics card — NVIDIA RTX 20-series or newer, AMD RX 6000-series or newer, or Intel Arc. Most laptops without a dedicated GPU can't run it yet. We'd rather tell you that plainly than ship something that fakes the light to get around it.

Photonica v0.2.4

Step into the lab.

Unzip, run, open a demo. Seventeen experiments are waiting, and the docs will take you from your first beam to your first lens design.