Soft-body physics
The slice is a real volume, not a wobbling picture. A jittered lattice of particles fills the rest shape and is joined by a Delaunay tetrahedralisation. Sixty times a second, ten XPBD substeps pull every tetrahedron back toward its own best-fit rotation of its rest shape (Müller's quaternion extraction), while a near-incompressible volume constraint stops the jelly from shrinking as you pull it.
Firmness sets the shape compliance on a logarithmic scale; internal damping bleeds relative velocity along every edge. The floor offers static and kinetic friction, so a slice can stick, slide and settle.
Optical rendering
The studio is drawn first; the jelly then refracts that image through its deforming surface. A back-face depth pass measures how much candy each ray crosses, and Beer–Lambert absorption turns thick regions deep amber and thin edges golden. A short march through rest space gathers light scattered by pith, membranes and juice vesicles; Fresnel, GGX highlights and softbox reflections give the wet gloss.
Citrus construction
Every structure lives in the specimen's original rest coordinates: the flavedo along the outer arc, the albedo pith beneath it, curved radial membranes, staggered juice capsules, a few teardrop seeds and sparse air bubbles. The render surface is embedded in the tetrahedra by barycentric weights, so all of it stretches with the jelly and survives every cut intact.
Cutting technique
Each piece is a convex polygon in that rest plane, dilated by a rounding radius and extruded with a soft bevel. A stroke becomes a vertical blade plane, which is mapped into each piece's best-fit rest frame and used to clip its polygon in two. New tetrahedra and meshes are built the moment you release; the knife then presses, the jelly squashes, and at breakthrough the halves inherit the deformed positions and velocities while a thin wedge collider eases them apart.
Space pause · N nudge · R reset · K knife · H hand
Drag empty space to orbit · wheel to zoom · double-click to re-frame
Knife: right-drag or two fingers to orbit · Hand: wheel or second finger twists