Aperture Caustic Bench turns a small optics problem into a playable drafting-table instrument. Rays leave the source as a structured bundle, pass through three lens elements, get clipped by an iris, split into chromatic paths, and burn their history into a sensor plane instead of vanishing after a single frame.
The build is strongest when you treat it like a bench experiment instead of a diagram. Move the aperture and the transmitted beam tightens. Change the lens preset and the caustic smear shifts across the sensor. Let the exposure accumulate and the math starts behaving like a physical trace: bright where many paths agree, bruised and noisy where the optical train is fighting itself.
The app has three interacting systems:
- A refractive ray-bundle solver with iris clipping, three lens elements, glass-index dispersion, and a simulation timestep clamped to 0.05 seconds.
- A sensor-plane caustic exposure accumulator with chromatic heat bands, focal spread, blocked/transmitted ray counts, and wavefront-error metrics.
- A responsive bench control surface with keyboard presets, 44px touch targets, live numeric outputs, and desktop/mobile Playwright proof QA.
The controls expose the useful variables without turning the piece into a fake cockpit. Aperture, focus, wavelength spread, source width, and exposure persistence all produce visible optical consequences. The numeric panel keeps score with blocked rays, transmitted rays, spread, focus error, and burn-in behavior, so the canvas has a measurement layer instead of pure eye candy.
Svelte is doing the right amount of work here: state, presets, controls, and responsive layout. Canvas 2D handles the drawing because this is layered line work, accumulation, labels, and fast immediate-mode redraws. WebGL would buy shader glamour and then demand more ceremony around a problem that wants legible geometry.
The tradeoff is precision versus readability. A physically complete optical model would bury the interaction under calibration detail. This build chooses a compact ray solver with visible dispersion and bounded timestep behavior, then spends the saved complexity on making the system understandable while it runs.
The visual language helps. Warm drafting paper, blackened brass, inked lens outlines, and amber sensor burn-in make the demo feel like an optical rail somebody dragged out of a workshop drawer. No neon lab slop. No hologram nonsense. Just rays, glass, aperture, and the slow violence of light getting organized.