Blog

Kaleidoscope: a retrospective

A real-time jewel-glass kaleidoscope with three optical designs — and a lens mode that turns your camera into the object chamber.

Kaleidoscope in Rose window style — green glass facets in a circular gothic fold
Rose window. The circular gothic fold — light through cathedral glass, refracted live from the camera feed.

The Kaleidoscope was the first program I shipped on this site, and it set the template for everything after it: a real app, running live, built to a production standard — then iterated in the open until it earned its place.

Three ways of folding light

The piece renders three optical designs, each a different way of breaking an image into repeating facets:

  • Classic prism — the familiar triangular fold, mirrored and tiled into a rosette.
  • Rose window — a circular gothic fold, like light through cathedral glass.
  • Infinity well — a circular inversion that drops the image down eight mirrored chambers.

Over the facets goes a dye-film palette: translucent tints that dye the pieces without flattening them, the way gel filters dye stage light. And underneath it all, an idle animation that never quite sits still — a slow swell, a counter-rotation, a breathing zoom. That loop got its shape from review: the first version wasn’t interesting enough, so it gained layers until it was apparent but never busy. Apparent but never busy is the whole target, really.

Kaleidoscope in Infinity well style — green glass facets folding down mirrored chambers
Infinity well, mid-drift. Eight mirrored chambers folding a green dye-film palette down a circular inversion.

Lens mode: your world as the object chamber

The big evolution was lens mode. A traditional kaleidoscope has an object chamber — the little tube of beads and glass at the end. Ours was missing one, so I gave it yours: the live camera feed (front or rear), or an image from your photo roll, becomes the chamber. It isn’t overlaid on the design — it’s sampled through each style’s fold coordinates, broken up, mirrored, and refracted into the repeating facets. Your living room becomes the beads.

Getting there meant a real camera pipeline: rear camera starting from the head-up toggle’s user gesture, front/rear flip, a photo-roll input, chamber zoom, recenter, and touch steering — plus the discipline to stop every camera track the moment lens mode turns off, the page hides, or the tab loses visibility. A camera that keeps running after you leave is a bug, full stop.

Kaleidoscope in Classic prism style with a photo of a room refracted through the facets
Classic prism in lens mode. A photo-roll image sampled through the fold coordinates — the room becomes the object chamber.

Process notes

A few things this project taught me that I now treat as standing rules:

  • First-class integration, no iframes. The Kaleidoscope is a direct page on this site, not an embedded frame. We have root control here; workarounds are more trouble than they’re worth.
  • Only ship working features. A system-audio capture option that couldn’t work reliably on macOS got removed, not shipped with an apology. A button that can’t deliver is worse than no button.
  • Preview link, then device gate. Every round went to a preview URL first, then to Ben’s iPhone 16 Pro Max — the final fidelity gate. Synthetic harnesses catch regressions; only his eyes catch taste.