An Interactive Ray Tracing Simulation of Laser Scanning Confocal Microscopy

A laser scanning confocal microscope builds an image one point at a time: a focused beam excites fluorescence at a single spot, a detector records the intensity, and a scanner moves the spot across the sample. A pinhole in front of the detector rejects light that doesn't originate from the focal plane, giving the system its optical sectioning ability.

This simulation is a 1D ray tracing model of a single-galvo confocal, built in OpticStudio. The sample is a uniform gray slab with a small fluorescent region embedded in it (shown in blue). When the excitation focal spot overlaps that region, emission is generated (shown in green) and traced back through the system to the detector.

Two parameters to explore:

  • Galvo angle: scans the excitation focal spot laterally across the sample
  • Focus position: moves the sample above or below the focal plane along the optical axis

A detector is shown at the end of the emission path, with a single large pixel displaying the integrated intensity — the value that would correspond to one point in a reconstructed image.

1,681 precomputed ray tracing frames (~40MB) load into your browser once before you interact.

The simulation runs entirely in your browser — no installation needed.

👉 Launch the simulation

Feedback and questions are welcome — like the Köhler simulation, this is designed as a teaching tool, and I'd love to hear how it works in practice.