More fractal video feedback

I've been working on a new implementation of the fractal video feedback idea. Unlike the previous attempts, the code is nice and modular, so complicated bits of OpenGL hackery get encapsulated in an object with a simple interface. It's still very much a work in progress, but I thought I'd share some results now. Feedback (no pun intended) is very much appreciated.


Shoving the video through the YouTubes kills the quality. I have some higher quality screenshots in a Flickr gallery. Some of my favorites:

The basic idea is the same as Perceptron: take the previous frame, map it through some complex function, draw stuff on top, repeat. In this case, the "stuff on top" consists of a colored border around the buffer that changes hue, plus some moving polygons that can be inserted by the user (which aren't used in the video, but are in some of the stills). In these examples, the map is a convex combination of complex functions; in the video it's z' = a*log(z)*c + (1-a)*(z2+c). Here z is the point being rendered, z' is the point in the previous frame where we get its color, c is a complex parameter, and a is a real parameter between 0 and 1.

There are two modes: interactive and animated. In interactive mode, c and a are controlled with a joystick (which makes it feel like a flight simulator on acid). The user can also place control points in this (c,a) space. In animated mode, the parameters move smoothly between these control points along a Catmull-Rom spline, which produces a nice C1 continuous curve.

The feedback loop is rendered offscreen at 4096x4096 pixels. Since colors are inverted every time through the loop, only every other frame is drawn to the screen, to make it somewhat less seizuretastic. At this resolution, the system has 48MB of state. On my GeForce 8800GTS I can get about 100 FPS in this loop; by a conservative estimate of the operations involved, this is about 60 GFLOPS. I bow before NVIDIA. Now if only I had one of these...


  1. ... sweet zombie Jesus

  2. we should probably give consideration to the general function space of this program. We could use a single parameterised Laurent series, but then how do we control the parameters, and how rapidly and accurately can a general Laurent series be computed on this graphics card ? We could also just select an arbitrary basis and have a control, similar to an equaliser, that creates a linear combination of these functions. The trouble is we can easily define at least fifty basis maps that we might want to use...

  3. Anonymous2.9.07

    also, do you think we can do a voxel based perceptron ?

  4. flam3 (the rendering engine behind ElectricSheep) takes the latter approach, as explained in this paper (which, by the way, is a fantastic read -- it explains how the entire rendering engine works in about 9 pages). Their basis set is somewhat arbitrary, but gives fantastic results. One difference, however, is that flam3 fractals are largely human-designed, or genetically derived from human-designed fractals, whereas we'd like this system to be completely autonomous, or interactive in an intuitive sense that falls short of design.