Prism
Refracts light at its triangular glass boundaries, separating wavelengths through material dispersion; a pulse's GDD comes from the paths its colours take, so a prism pair compresses.
Open in the canvas →In the real world
A prism disperses light because its refractive index depends on wavelength. Each face refracts according to Snell's law:
Since n itself varies with λ, different colors refract by different amounts and separate — this is why white light fans into a rainbow. Real optical glass is characterized by a Sellmeier equation, a sum of resonance terms fit to measured data, not a single simple formula.
In OpticalSetup
Each face is a genuine refracting boundary — incident rays bend by real vector Snell's law, and a ray that exceeds the critical angle undergoes total internal reflection instead of exiting, exactly as a real prism does. For dispersion, broadband and supercontinuum beams are sampled at several discrete wavelengths across their band, and each sample refracts with its own wavelength-dependent index, so the beam visibly fans into a spectrum. Fused silica, CaF₂ and the SCHOTT glasses N-BK7, N-FK51A, N-SK16, F2, N-SF5, N-SF10, N-SF11, N-SF14, N-SF57 and N-LASF9 are selectable, with 74 more glasses from the SCHOTT, OHARA, CDGM and HOYA catalogues under each maker's name; existing sketches still default to N-BK7.
For a pulse, each colour carries the phase of its own traced path: the index of the glass times the distance inside it, plus the air between. A detector reads the GDD from those phases, so it includes what the geometry does as well as the glass: a pair of prisms gives the negative GDD of a prism compressor, more insertion adds the glass back, and the detector says whether the colours arrive together, side by side, or still diverging. Still diverging, it gives the central ray's GDD, and a duration only where that divergence would change it by under 1 % over the next metre.
Each face transmits by the Fresnel equations at the angle the ray actually meets it, for its polarization: p-polarized light (in the canvas plane, the app's 0°) at Brewster's angle crosses without loss, which is why compressor prisms are cut for it, while s-polarized light loses several percent per face. The face also turns linear polarization toward p and leaves unpolarized light partly p-polarized. Past the critical angle the ray is totally reflected with no loss, but s and p come back shifted in phase against each other, so light polarized at an angle between them leaves elliptical, as in a Fresnel rhomb.
The Sellmeier curves make refractive index and GDD accurate to a few percent over their valid transparent ranges, but absorption bands, temperature, coatings, and surface quality are not modeled. Faces are uncoated: Fresnel reflection is the only loss, and the reflected light is not traced. The path phase is two-dimensional, sampled at five or nine wavelengths, and needs the colours to reach the detector through elements whose phase is modelled (mirrors, glass, gratings, ideal lenses, filters and similar); otherwise each ray keeps the GDD of its own glass path. A probe on one colour cannot see the others, so after a prism it points to a detector for the duration.