Periodic 3D self-propelled-Voronoi energy
e = Σ kᵥ(vᵢ−1)² + k_S(sᵢ−s₀)², relaxed with FIRE.
Faithful port of a validated MATLAB reference implementation (analytic forces, FD-verified).
Small N (interactive limit <100) → the rigidity transition (s₀*≈5.41,
a large-N value) is finite-size-rounded here. Set k_S=0 to watch the
volume-only energy drive an equal-volume tiling (volume CoV → 0).
Runs entirely in your browser: voro++ (WebAssembly) tessellation · exact analytic forces · FIRE relaxation · Three.js (WebGL) rendering. MIT License.
Interactive, in-browser energy minimization · MIT License
The model. N cell centers in a periodic unit box define a 3D Voronoi tessellation. Each cell i carries a dimensionless energy penalizing departures from a target volume and a target surface area (its shape index):
kᵥ = Kᵥ⟨V⟩2/3/K_S is the single dimensionless stiffness ratio and s₀ is the preferred shape index. Volumes and areas are reduced so the average cell volume is 1.
The transition. Rigidity here is controlled by geometry alone: the tissue is
solid below a critical shape index and fluid above it. The 3D Voronoi value is
s₀* ≈ 5.41 (the analogue of p₀* ≈ 3.81 for the 2D model). Because the demo is
capped at N < 100 for interactivity, the transition is finite-size-rounded —
the sharp threshold only emerges at large N. Setting k_S = 0 makes
the volume term alone drive an equal-volume tiling (volume CoV → 0).
How it works. Everything runs client-side. The periodic Voronoi tessellation is computed by voro++ compiled to WebAssembly; the forces are the exact analytic gradient of the energy above (finite-difference-verified to ~10⁻¹⁰); configurations are relaxed with the FIRE 2.0 minimizer; rendering is GPU via Three.js.
Using it. Relaxer — set N, seed, s₀, kᵥ, k_S and Run / Step / Converge to watch FIRE relax the packing; color cells by shape index, volume, or cell energy, and toggle faces/edges. Transition — sweep s₀ (a few seeds each) and plot ⟨E/N⟩ and ⟨sᵢ⟩ vs s₀, with s₀* ≈ 5.41 marked.
Three.js (WebGL rendering) · voro++ compiled to WebAssembly via Emscripten · the FIRE 2.0 minimizer.
Code released under the MIT License — free to use, modify, and distribute. Cited works are © their respective authors/publishers.