A Lua/Love2D physics simulation of stable fluids implenting Jos Stam's paper on the subject. Can be run as a stand-alone sandbox to explore the concept or used as a Lua library to implement this behavior into your own game or project.
- LMB -> Add static density source.
- RMB -> Add static density source with a random velocity.
- LMB + Shift -> Remove density.
- RMB + Shift -> Remove velocity.
Note: Currently, once a source is added there is no way to remove or modify it. (WIP)
A pure-Lua implementation of Jos Stam's 2003 paper "Real-Time Fluid Dynamics for Games"
The link above directs to a freely accessible online pdf of his paper.
Special thanks to Gonkee's (YouTube channel) video --- "But How Do Fluid Simulations Work?" --- for introducing me to this concept and paper.