Liquid drains from foam through a network of Plateau border channels — the concave-triangular conduits where three soap films meet. Laplace pressure gradients (driven by bubble curvature) push liquid from small, high-pressure bubbles toward large, low-pressure ones, while disjoining pressure temporarily stabilises the thinning films.
P_Laplace = γ / r (2D curvature pressure)
Q_ij = κ · (P_i − P_j) (inter-bubble flow)
h_ij ∝ w_ij / L_ij (film thickness)
rupture: h_ij < h_crit (film collapse)
Joseph Plateau (1801–1883) discovered the laws governing minimal surfaces in soap films while he was completely blind. His rules — three films meet at 120°, four edges meet at the tetrahedral angle 109.47° — govern foam structure from beer froth to lung surfactant layers.
This simulation models foam drainage — the way liquid trapped between bubbles gradually flows downward through the network of Plateau border channels that form wherever three soap films meet. A 2D Voronoi diagram builds the bubble network from random seed points, each cell tracks its own water content and effective radius, and Laplace pressure differences between neighbouring bubbles (P = γ/r) drive flow along the shared borders until thin films rupture and bubbles coarsen together.
A live Voronoi foam of polygonal "bubbles", each coloured by its water content — brighter, more saturated cells are wetter. Liquid flows between neighbouring cells according to their Laplace pressure difference (Pi = γ/ri), gravity slowly drains liquid toward the bottom of the screen, and when a shared film thins below the critical thickness hcrit the two bubbles rupture and merge, which is exactly how real foam coarsens over time.
Drag Surface tension γ, Drainage rate κ and Critical film hcrit to change how fast liquid moves and how readily films rupture, or use Bubble count to rebuild the foam with more or fewer cells. Click or tap anywhere on the canvas to inject extra liquid into the nearest bubble and watch it drain into its neighbours. Pause/Resume and Reset are available in the HUD, and the ⓘ info button opens a modal with the underlying algorithm and key equations.
Joseph Plateau worked out the geometric rules that govern soap-film networks — three films always meet at 120°, four Plateau borders always meet at the tetrahedral angle of 109.47° — despite having gone blind decades before finishing this work. The same rules shape everything from a pint's head to the packing of biological cells.
Each polygon is a bubble in a 2D Voronoi foam generated from randomly placed seed points. Its fill colour encodes water content (darker and less saturated when dry, brighter cyan/blue when wet), the border thickness also grows with water content to suggest a thicker film, and small glowing dots at each vertex mark the Plateau borders where three films meet.
Every bubble gets a Laplace pressure P = γ/r from its surface tension γ and effective radius r — smaller bubbles have higher pressure. For every pair of neighbouring bubbles the flow is Q = κ·(P_i − P_j)·Δt, moving water from the higher-pressure (smaller) bubble to the lower-pressure (larger) one each frame, on top of a small constant gravity term that drains liquid toward the bottom of the canvas.
The model estimates a film-thickness proxy between each pair of neighbours from their combined water content divided by the distance between their centres. When that value drops below the Critical film hcrit slider, the shared film is treated as ruptured and the two bubbles are merged into one larger cell with combined area and water — visually this is foam coarsening, the same process by which real bubbles disappear and neighbours grow.
Surface tension γ scales every bubble's Laplace pressure, so higher γ produces stronger pressure gradients and faster flow. Drainage rate κ is a direct multiplier on the flow between neighbours, so it speeds up or slows down the whole simulation. Critical film hcrit sets the rupture threshold — raise it and films rupture (and bubbles merge) far more readily, producing a drier, more chaotic foam.
No — it is a simplified, qualitatively faithful model built for intuition rather than a full solution of the foam drainage equation or real 3D Plateau border geometry. The Voronoi cells approximate bubble shapes, radius and water content are proxies for true curvature and film thickness, and the pairwise flow/rupture rules capture the right trends (drainage from small to large bubbles, coarsening via rupture) without solving the underlying continuum equations exactly.