Presets
Playback
Body
Material
World
Run and interaction
Layers
Model check
The science
The model: a pressurised ring of springs
The jelly's skin is a closed ring of N point masses m = M/N. Neighbouring masses are joined by damped Hooke springs, force F = k (L − L0) + c (dL/dt) along the edge, and masses two apart by a weaker bending spring. Inside is a fixed amount of gas at constant temperature, so the ideal-gas law gives the pressure p = nRT / A, where A is the polygon area from the shoelace formula A = ½ Σ (xi yi+1 − xi+1 yi). The gas pushes every edge outwards with force p L (in this 2D cross-section p is a force per length), shared between its two end nodes. Time stepping is semi-implicit (symplectic) Euler with a sub-step of 1/1800 s so that the stiff springs stay stable.
Why the gas matters
Compressing the body shrinks A and raises p = nRT/A, so the pressure acts as a very soft, strongly nonlinear spring on the volume: the free energy is −nRT ln(A/A0). A free ring in equilibrium has hoop tension T = k (2R sin(π/N) − L0) = p R with A = (N/2) R2 sin(2π/N); the page solves this equation by bisection and compares it with the simulated settled radius. Lowering nRT (or switching on the leak) deflates the body until gravity squashes it; raising it makes a hard, bouncy ball. A non-round start shape (square, star, pillow) is pushed towards a circle because a circle encloses the most area for a given perimeter.
Contact
Nodes that pass through the floor, ramp, glass walls, obstacle ball or press plate are moved back to the surface and the normal velocity is reversed by the restitution e; the tangential velocity is changed by Coulomb friction |Jt| ≤ μ Jn. In the two-body mode a node inside the other polygon is pushed out along the nearest edge normal. The plate force is the impulse the plate removes from the nodes per unit time, so squashing the body slowly shows F ≈ p × (contact width).
Honest simplifications
This is a plane-strain model (a slice of an infinitely long cylinder), not a 3D solid; the "jelly" has only a skin with a gas inside, so it cannot model shear waves in the bulk, incompressible fluids (a water balloon is closer to constant area) or fracture. The gas is isothermal (fast heat exchange), whereas a real fast impact is nearer adiabatic. Contact is a penalty-free projection, so very fast collisions lose a little energy. Educational model.
Model checks in this page
(1) a free ring without gravity relaxes to the analytic equilibrium radius; (2) the centre of mass of a wobbling star-shaped body falls exactly like a point mass, y = y0 − g t2/2, because the internal forces sum to zero; (3) a body resting on the floor presses with a time-averaged force equal to its weight m g.