TCthomas.caron
~ / lab / physarum
06·live·2026.05

Physarum networks

65,536 GPU agents, four shaders, one slime mold. Local rules → global transport networks.
stack
WebGL2 · GPU compute · Physarum
kind
simulator
status
live

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.

click + drag to drop food
sensor ∠0.55 rad
angle to L/R sensors · widens search cone
sensor d9.0 px
distance the sensor reaches ahead
turn0.45 rad
how hard an agent turns per step
step1.00 px
pixels moved per frame
decay0.970
trail multiplied each frame after blur
regimes

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.

thesis

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
thomas.caron — software developer
montréal, qc · UTC−04:00
built with vite + cloudflare workers
© 2026 — last deploy: 2026.05.07 ·privacy