Flytrap
open · brush a trigger hair
Your pointer is the insect: brush a hair twice in 20 s · drag to orbit
Flytrap
What it is
A Venus flytrap head, rendered as a lit 3D object that fills the page: two open lobes, green outside and red inside, a fringe of cilia teeth along each rim and three trigger hairs on each lobe. Your pointer is the insect. Brush one hair and the plant remembers it for twenty seconds and does nothing else you can see except pulse the hair and start a countdown in the readout; brush a hair again inside that window and the lobes snap shut, because the real plant counts to two before it commits.
The snap is the actual mechanism, not a hinge animation. Following Forterre, Skotheim, Dumais and Mahadevan (Nature, 2005), each lobe is a doubly curved shell whose curvature across the midrib is bistable: the open lobe is convex, the shut one concave, and the state rolls in a double-well energy V(κ) = ¼(κ² − 1)² − μκ. Loading the shell past the critical drive makes the open well vanish and the lobe falls into the other one, buckling rather than swinging, in roughly a tenth of a second by the unit-tested ODE. The Cross-section toggle draws that profile and the well it is rolling in, live, and Slow-motion runs the snap at one twentieth speed so the buckling is readable while the twenty-second memory keeps real time.
Everything is built from the same closed-form shell in the browser. Each lobe is a 30 by 60 parametric grid, about two thousand vertices, rewritten whenever the curvature moves; the 19 cilia per lobe are an instanced mesh that follows the deformed rim, with the two rows offset by half a pitch so they interleave as the trap closes; 380 glands per lobe sit on the inner surface; the hairs are cylinders with invisible raycast targets. The hinge angle is coupled to the curvature so the rims meet exactly on the seam plane and never cross, and a small camera rig eases to the trap's flank when it shuts, because a closed trap seen from the front is a sliver.
After the snap, brushing the hairs inside counts as the prey struggling: five struggles seal the trap and deepen the cup, the way the real plant begins digestion. Reopen plays the days-long reopening as a five-second creep through the barrier under heavy damping, not a snap in reverse. Release a fly sends a scripted fly walking onto the right lobe to brush two hairs and spring the trap itself. The trap is the same on every visit; only what you do to it changes. With reduced motion on, the trap holds a still frame, skips the idle sway and still snaps when touched.
How to use it
- Brush a trigger hair; brush any hair again within 20 s and the trap snaps.
- Brush the hairs inside the shut trap to seal it; Reopen creeps it open in five seconds.
- Release a fly to let one wander in and spring the trap on its own.
- Slow-motion runs the snap at 1/20; Cross-section draws the profile and its energy well.
- Drag to orbit, scroll to zoom.
More experiments
- Ferrofluid — webgl, three.js, r3f
- Lathe — webgl, three.js, r3f
- Rocky — webgl, three.js, r3f