StableShape
A morphology-generation plugin for Grasshopper, driven by computational fluid dynamics.
- Type
- Grasshopper plugin
- Language
- C#
- Method
- Stable Fluids (Jos Stam) · particle-spring mesh
- Release
- v0.9
- Resources
Fig. 00 — Stable Fluids in WebGL2 · drag to stir
Parameters
This interactive demo needs WebGL2, which isn’t available in this browser.
In action
StableShape is a Grasshopper plugin that turns fluid simulation into form. The live figure above runs the same Stable Fluids solver in your browser; below, the plugin at work inside Grasshopper.
Algorithm framework
The core of StableShape is two classes: StableFluid and ParticleSystem. StableFluid manages the velocity and density fields, resolving the Navier–Stokes equations through diffusion, advection and pressure projection — the steps that keep the simulation stable.
ParticleSystem operates on a mesh of particles connected by springs, handling tension and mesh reconstruction. By treating mesh vertices as particles carried by the stable velocity field, the framework achieves realistic fluid behavior.
From field to morphology
The project explores the transformation from scalar fields to morphology. In physics, a field is a quantity — scalar, vector or tensor — with a value at every point in space and time. Here the scalar field is fluid density.
In three dimensions, the level sets of a scalar field are two-dimensional: iso-surfaces. These surfaces can represent a three-dimensional fluid in a way a 2D height field cannot — each one is a closed body, the three-dimensional equivalent of a contour line.
Morphogenesis methods
StableShape offers two ways to generate form. The VDB method uses the Dendro plugin to convert density points into volumes; the mesh method uses the particle system to deform meshes. Both evolve complex fluid forms from simple primitives.
Everything runs inside Grasshopper — grid construction, VDB processing, the StableFluid solver and the ParticleSystem solver — so designers can manipulate and watch forms evolve in real time.
Implementation
The fluid solver runs in four stages: initialization, adding density, updating the velocity field and updating the density field. At each time step it resolves the Navier–Stokes equations through diffusion, projection and advection, keeping the simulation physically plausible and numerically stable.
The mesh solver drives the particle system: mesh topology, particle movement, tension and reconstruction. Together they generate fluid forms that evolve over time, opening new possibilities for architectural design exploration.