A simple to use opensource C++ / Java / AS3 library (with examples) for openFrameworks, Cinder, Processing and Flash, for solving and displaying real-time 2D cell-based fluid simulations based on Navier-Stokes equations. The library provides a very simple to use API with many convenience methods for adding and getting forces and colors at any position. This ease of use has made the library incredibly popular with artists and creatives.
MSAFluid (2008)
Included examples
The source code for the examples below are included with the library to demonstrate how to use the features, including how to interact with the fluid using camera and/or multi-touch screens.
Body Paint
MSAFluid (and MSAOpenCL) form the technical basis for 2009 installation, Body Paint.
MSAFluid in the wild
This library and the supplied examples have turned out to be hugely popular and now they have a life of their own. Many multi-touch visuals and interactive dance performances use MSAFluid – often without even changing the example parameters!
Download source
Java version (for processing): github.com/memo/p5-MSAFluid
C++ version (for openFrameworks and Cinder): github.com/memo/ofxMSAFluid
AS 3.0 version (ported by Eugene Zatepyakin): blog.inspirit.ru/?p=248
Acknowledgements
The library is based on Jos Stam’s famous paper – Real-Time Fluid Dynamics for Games. The main example was inspired by the brilliant Plasma Pong (even with some advice from the author, Steve Taylor, who pointed me in the direction of Jos Stam’s paper). Other useful resources include :
- Mike Ash (C)
- Alexander McKenzie (Java)
- Pierluigi Pesenti (AS3 port of Alexander’s)
- Gustav Taxen (C)
- Dave Wallin (C++) (uses portions from Gustav’s)
- Chris Sugrue & Arturo Castro (C++)
- Alain Ramos (C++)
- Mick West, Part 1 and Part 2
- NVidia (C / Cg)