Pokeable · Specimen 002

RainbowJelly.

Six layers.
Set overnight.
Bring your own tools.

WebGPU · Live
How it works
  1. The cube is a mesh of 2,560 tetrahedra. A smooth, finer surface is pinned inside them with barycentric weights, so it bends with the volume.
  2. XPBD solves a Neo-Hookean shape constraint and a volume constraint per tet, in 8 small substeps of a fixed 60 Hz clock.
  3. A knife cut splits the tets by side of the plane and duplicates the shared vertices, so each side becomes its own soft body. The surface is clipped exactly and a fresh face is triangulated across the cut.
  4. Nails store their tip and entry point as barycentric coordinates in the tets they hit, so they ride along as the jelly moves.
  5. The torch heats a temperature field on the vertices. Hot tets soften, sag and slowly adopt their new shape as rest shape, then set as they cool.