Visualizations
045 / 500

045 · Generative art

Video Feedback

A virtual camera films its own monitor and grows spirals, tunnels and fractals.

Each pass the camera looks at a screen showing its previous frame through a slightly rolled, zoomed, panned and tilted view, so every frame is the last one warped into itself by a projective map. Every pixel is inverse mapped through that homography and bilinearly sampled; rays that miss the screen see the monitor's beige bezel, its power LED and the dark room, which is where the tunnel of nested screens comes from. The color then goes through a hue rotation, the gain and an S-shaped response curve that makes the loop bistable, and a Laplacian sharpness term adds ringing that the loop amplifies into lace. A glowing wand and shapes held in front of the lens keep feeding it.

Try it. Drag to roll (left and right) and zoom (up and down) the camera; Shift-drag or right-drag tilts it. Click to hold a shape up to the screen. Pick presets with the buttons or keys 1 to 6, and open Controls (or press O) to set roll, zoom, hue shift, gain, contrast and sharpness with sliders; M mirrors the view, C blacks out the screen.

  • Projective inverse mapping
  • Feedback loops
  • Color response curves
  • Bilinear sampling
  • Hue rotation matrices

View the source · one module, plus a small shared runtime for sizing, the animation loop and input

Build your own

Paste this into Claude Code, Codex or any coding agent to get a simple version running, then take it wherever you like.

Build a video feedback simulator with JavaScript and the HTML canvas element: a virtual camera pointed at the screen that shows its own picture. Put everything in a single index.html file with no libraries or build step, so I can open it directly in a browser.

Start simple:
- Keep two small Float32Array RGB buffers, about 320x200, as the current and next frame.
- Each frame, for every pixel of the next frame, work out where the camera is looking on the screen: center the coordinates, rotate them by a small roll angle, divide by a zoom factor slightly above 1, and bilinearly sample the current frame there. Pixels that land outside the screen see a mid-gray bezel.
- Multiply by a gain near 1 and swap the buffers. Display the result scaled up to fill the window.
- Draw a glowing dot that drifts around in front of the camera every frame, so the loop always has something to copy.

Once that works, make it beautiful:
- Rotate the hue a little every pass with a 3x3 matrix around the gray axis, so copies cycle through the rainbow.
- Pass the color through an S-shaped response curve with a hard clip at 1 (use a lookup table). This makes the loop bistable and gives the spirals crisp edges.
- Add a sharpen term (the pixel minus the average of its four neighbours) before sampling, and watch fine lace appear.
- Let me drag to change the roll and zoom, and click to drop bright shapes into the loop.

Explain the key ideas in short code comments. When you're done, tell me how to open it and suggest three directions I could take it next, such as a perspective tilt with a full homography, a mirror mode for kaleidoscopic symmetry, or presets that glide smoothly between settings.
PreviousPole-Zero FilterDrag poles and zeros over a 3D |H(z)| surface and hear the filter you built ring. NextRoute PlannerDijkstra, A*, bidirectional search and contraction hierarchies race on a printed atlas.

Related visualizations

  • Op ArtGenerative art Riley and Vasarely style compositions that ripple, bulge and vibrate.
  • CRT MonitorRetro An emulated electron beam, decaying phosphors and a shadow mask, under a 7x loupe.
  • IFS EditorFractals Sculpt fractals by dragging affine parallelograms while the chaos game redraws them.
  • Hidden 3DIllusions A live magic eye picture: a turning 3D sculpture hidden in colorful noise.
  • KaleidoscopeGenerative art Draw once, and twelve mirrored strokes bloom into a mandala.
  • Anamorphic MirrorIllusions A wildly warped drawing that a chrome cylinder turns back into a picture.
  • Waterfall IllusionIllusions Stare for twenty seconds, then watch a frozen picture drift the other way.
  • Evolved TrianglesGenerative art Two hundred translucent triangles evolve from chaos into a painted landscape.
  • Infinity Mirror3D A mirrored room of neon and glowing orbs, reflected into an endless kaleidoscope.

Use ← and → to move between demos. While the canvas has focus, keys go to the demo instead.

← More from Emergent Mind Labs