Fluid




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.
Interactive Version
Hello,
The link with the source code ,”fluid_dynamics.pde” doesn’t work.
Oops, forgot to add .PDE to the server’s MIME types. Should work now, thanks.
Wow man!
I love your fluids !!!!
No. Really. Nice nice sketch.
and thank you for the link to the documentation.
Yeah, great Work. respect, Man ! Just sittin on a VB-Derivate.
regards from germany chmee
[…] Fertig. ist gemacht. Aber : Meine VB-Version läuft mit etwa 1fps auf nem XP2800+, während schon diese Version in Java ( in der PDE-Datei ist der Source einsehbar ) mehr fps rauswirft. Darum ersuche ich nun um gütige […]
Really nice sketch, I used the same paper when I wrote my version of the smoke applet but I think I’m missing something - yours seems to have much better eddies and things! - nick
www.coolbubble.com