Home▸Rendering & Computer Graphics▸Light Through a Medium 2D: Phase vs Group Velocity & Dispersion

Light Through a Medium 2D: Phase vs Group Velocity & Dispersion

2D companion to the 3D quantum light system: a real wave packet crosses from vacuum into a tunable refractive medium, showing phase velocity vs group velocity and Cauchy-style chromatic dispersion spreading a white pulse into red, green and blue.

Rendering & Computer Graphics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-3d-quantum-light-propagation-through-a-medium ↗ Open standalone

This is the 2D companion to the 3D Quantum Light Propagation Through a Medium scene. Instead of decorative spinning primitives, it computes a real wave packet crossing from vacuum into a tunable refractive medium: the carrier oscillates at the phase velocity c/n(λ) while the Gaussian envelope advances at the group velocity c/N(λ), with the group index derived analytically from a Cauchy dispersion relation. Switching to the white-pulse view launches red, green and blue components together and lets each refract and travel at its own speed, visibly spreading the pulse into its component colors exactly as a prism splits white light — a genuinely different rendering technique and a genuinely different physics model from the 3D scene's placeholder geometry.

⚙ Under the hood

2D companion to the 3D quantum light system: a real wave packet crosses from vacuum into a tunable refractive medium on a flat canvas. Watch the carrier's phase fronts slide through the envelope at the phase velocity c/n while the packet itself advances at the group velocity c/N, then switch to the red/green/blue pulse view to see Cauchy-style chromatic dispersion visibly spread a white pulse into its colors as it crosses the boundary.

refractive-indexdispersionphase-velocitygroup-velocitywave-packetoptics2d

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)