Option 16: soft-body jelly physics. The bot is now a ring of 24 masses joined by springs and filled with "air pressure." Nothing is hand-animated; every squash and wobble comes from the simulation. Drag it, throw it, or tap it to poke.

The bot is a real physics simulation, stepped 10 times per frame. Four forces hold it together:

**Materials change the same four numbers:**
**Jelly:**
soft and bouncy.

**Rubber:**
firm, quick recovery.

**Water balloon:**
almost no shape memory, so it sloshes and drapes over the peg.

**Stiff:**
barely deforms.

**The eyes ride the deformation.**
Each frame, the code measures the blob's rotation and stretch, then places and squashes the eyes to match. The bot also reacts:

- Eyes squint on hard impacts and when squashed.
- Eyes widen when it's moving fast.
**Water balloon + Drop onto the peg.**
It drapes and oozes off. Stiff just bounces.

**Drag it hard and let go.**
It keeps your throw speed, so you can fling it off the walls.

**Tap it gently.**
A poke pushes the skin inward, and the wobble ripples round the ring.

**Zero-g + Poke.**
With no floor contact, the wobble plays out on its own. You can watch the body's natural jiggle frequencies.

**Damping to 0.2.**
It jiggles for a long time, like a real jelly.

**Pressure is what makes it a ball.**
Springs alone make a floppy necklace that collapses. The "volume kept" readout stays near 100% even under big squashes.

**Shape matching is a 2005 game-physics technique**
(Müller et al.). It finds the best-fitting rotation of the rest shape and gently pulls every point toward it. That stops the blob inverting or tangling, which pure springs often do.

**Rotation comes from the maths too.**
The same best-fit rotation turns the eyes, so if the bot rolls, its face rolls with it.

**Why 10 substeps?**
Stiff springs explode if one step is too big. Small steps keep the simulation stable, which is why stiff materials cost more to simulate.

**The body's structure**
```
● ─ ● ─ ● ● mass points (24) ● ╲ ╱ ● ─ edge springs ● (pressure) ● ╲ bend springs (skip one) ● ╱ ╲ ● pressure pushes along each edge's normal ● ─ ● ─ ●
```

**One substep**
```
forces = gravity + springs (stretch + damping) + pressure × (restArea ÷ area − 1) × edge length + shapeMatch × (goal − position) + drag spring (if held) velocity += force × dt → position += velocity × dt → collide
```

**Face from physics**
```
centroid C, best rotation θ, stretch (sx, sy) eye position = C + rotate(θ) × (restEye × stretch) eye squash = sy × blink × squint(impact, volume)
```

**Critical thinking:**
option 1 faked squash with hand-tuned curves; this one gets it from physics. Which reads more alive? Is "correct" motion always better than directed motion?

**Lateral thinking:**
stress balls, water beds, car tyres and biological cells all hold shape with a skin plus internal pressure. Could your bot's material change with its mood: stiff when determined, water-balloon when sad?

**First principles:**
why do springs alone fail to keep area, while pressure alone fails to keep shape? What minimum set of rules gives something that feels "solid but soft"?

- How do games make soft bodies cheap enough to run on phones?
- Can this be a 3D jelly instead of 2D?

D. Modern real-time 3D

#16 Soft-body jelly

Share: /e/grokbot-animation/16/