Skip to content

PhotonLab

Draw a lens, a slit or a waveguide, switch on a source, and watch Maxwell's equations play out in real time. Nothing to install; it runs in the browser.
PhotonLab running the double-slit experiment: a plane wave enters from the left, passes two openings in a metal wall and forms an interference pattern.

PhotonLab solves Maxwell’s equations on a two-dimensional grid with the finite-difference time-domain (FDTD) method. You see the field itself, not an animation of it. When light bends at a lens, interferes behind two slits or gets trapped in a photonic crystal, that is the solver’s actual output.

The solver is written in Rust, compiled to WebAssembly and runs on its own thread, so the interface stays responsive on a laptop, a tablet or a phone.

Draw anything

Brush, lines, rectangles, ellipses and polygons in glass, silicon, water, metals or your own refractive index.

Real sources

Point sources, one-way plane waves, Gaussian beams and phased arrays. Continuous, pulsed or wave packets.

Measure

Probes record the field every step. Look at the signal, its spectrum and the energy in the domain.

Share

A scene fits into a link. Save it as a file, export images, video or the raw probe data as CSV.