💧
Fluid Simulation
Interactive 2D fluid dynamics using Jos Stam's Stable Fluids algorithm. Click and drag to inject dye and velocity.
Presets:
0 fps | 128x128
Controls: Left-click drag to inject dye and velocity. Right-click drag near the obstacle to reposition it. Use presets to try different flow configurations.
Implements the Navier-Stokes equations via Stable Fluids (Jos Stam, 1999). The simulation is unconditionally stable at any timestep. Left-click drag to inject dye and velocity. Right-click drag to place obstacles. All computation runs in your browser on a 2D grid using Canvas ImageData for rendering.