Psychedelic fluids and particles with Processing

Realtime interactive psychedelic fluid simulation with processing for an upcoming installation. Watch the video below to see it in action, or click here for the interactive version (you will need Java). P.S. it takes a while to load so please be patient!

The biggest inspiration for this was undoubtedly Plasma Pong. A free game released a few years ago which was basically pong, but set in an advanced fluid simulation environment. Unfortunately Atari made the author take the site down, but you can still find the game on torrents (so I'm told :P).

Plasma Pong isn't open-source, so I had to write the fluid visuals from scratch, but luckily didn't have to reinvent the wheel thanks to to this paper by Jos Stam (a name which appears many times whenever you look for anything to do with fluid dynamics computations!). I'm not releasing my code for the fluid solver right now because I think it can be cleaned up a bit and optimized. This page by Mike Ash was also quite helpful in understanding whats going on, though his example solves in 3D so is unnecessarily complex for my needs.

Robert Hodgin of flight404 fame was also very influential by blowing me away with his processing work at Flash on the Beach 2007. I learnt how to use OpenGL in Processing by looking through his sample code on his site - and the particle trails I use here are modified versions of his.

This demo was done in Processing 0135 BETA (using Java) but I think I'm going to redo it in C++ with OpenFrameworks for performance reasons. While processing is brilliant for knocking up quick demos and getting off the ground quite quickly, for this project I need as much performance as possible.

So in short I'm halting the development of the Processing / Java version now and thought I'd post where I got to with it...

**UPDATE**
Coverage of the finished event can be found here