Interactive dejong attractor

Hey all

I made this using openframeworks and a kinect.

Basically info from the kinect is fed in to a shader that generates a dejong attractor on an FBO. That is then used to generate a curl field, taking the density/alpha value at a given point as defining a vector field. Then there are a bunch of particles floating around that field whose colour comes from the attractor and motion comes from the curl. Most of the heavy lifting is done on the GPU, woot.

Big thanks to everyone who works on oF, the kinect and opencv stuff. I hope I can contribute in some meaningful way sometime.

I set it up at a friends party, there are some clips of that too. It’s not really designed as a dancefloor thing but it went ok.

I chucked the source up warts and all

The attractor is effectively a density map, I tried to use parallel reduction on it but it was a bit too slow and it looked ok as a hardcoded maximum, the reduction code is up here but it needs a bit of work. Would appreciate any comments or suggestions on that as it seems like something useful to find the max luminosity etc which is useful for post. Also I’m not 100% on the curl field but there it is.

In theory the vector field/display stuff can take anything bindable as a texture, but I haven’t really played around with that. If you do anything cool with it let me know.

If you don’t have a kinect it should respond to mouse movements, runs about 100fps on my laptop. Any questions just drop me a line