Physarum networks
65,536 agents on a 512² torus. Each frame they sniff the trail map at three angles, turn toward the strongest reading, advance one step, deposit pheromone. Trails diffuse and decay. Networks emerge because reinforcing trails outcompete fading ones. Drag the canvas to drop a food blob — the colony rewires.
Physarum polycephalum agent model after Jones 2010 / Sage Jenson. Five passes per frame, all on the GPU: agent-step (sense + turn + move) → diffuse + decay → deposit (additive blend, 1px points) → optional food splat → render (lerp bg → accent). Agent state is an RGBA32F texture (x, y, heading); trail is R32F, ping-pong. Tero et al. 2010 showed the same rule recovers the Tokyo metro topology when food sources are pinned at city centers — minimal local rules, globally optimal transport network.
A WebGL2 implementation of the Physarum polycephalum agent model. Each agent senses the trail map at three angles, turns toward the strongest reading, deposits pheromone, repeats. The same rule that produces these networks in your browser recovers the Tokyo metro topology when run with food sources pinned at city centers. Drag to drop food and watch the colony rewire.
← back to lab