screenshot-2007323215022.png

screenshot-2007323214419.pngscreenshot-2007323221638.pngscreenshot-2007323223317.png

Interactive Version

My first sketch uploaded to this blog! This sketch approximates fluid dynamics using Navier-Stokes equations for fluid flow. A vector field is used to represent the velocity of the flow and the density of the fluid is mapped to a colour gradient. For extra sparkle, I used a simple lighting model to add highlights.

I wrote this sketch after stumbling on Plasma Pong on the web the other day. This is a new variation on the old Pong game where the ball is gusted around on clouds of colourful ‘plasma’.

Usefully, the author, Steve Taylor, credits several sources for the approach he uses, including this article: Real-time Fluid Dynamics for Games (PDF) by Jos Stam of Alias | wavefront, which was very helpful.

The interactive applet runs reasonably well at a grid size of 128×128 pixels. For the next version, I’ll try a hi-res version with automatic input of density and velocity rendered to a video. It’d be nice to try camera tracking and audio beat detection as inputs too.