Physarum trails guide

Overview

Physarum trails lets tens of thousands of tiny agents crawl over a picture, and the paths they share grow into a glowing network.

A few thin, wavy gold threads over a pearl-crowned figure before dark spires, with the spiked halo of a second figure showing faintly behind it
The Capillaries preset partway through a run: thin gold threads over a picture turning from A into B.

It models Physarum, a slime mould that finds food by laying a trail and following it. Each agent looks ahead a little to the left, straight on and a little to the right, turns towards the strongest trail it senses, steps forward and adds a little trail of its own. See sensor angle and deposit.

The trail lives in a trail map that spreads and fades a little on every step. See trail diffusion. The bright parts of the picture count as food, so the colony gathers where the picture is bright. See food pull and luminance.

No agent follows a plan, yet shared routes form: this is emergence, and the routes are the network you see. The thickest paths are drawn as glowing threads. See filament.

A run is 220 steps of this, spread over the run's time, with an easing curve setting how fast the steps come. Replay grows the network again from a fresh, even scatter. After a run the colony keeps moving, so the network shifts slowly at rest.

With A → B transition on, as the page opens, the picture fades from A to B during a run and the food moves with it. See picture A and picture B. With it off, only picture A is used.

Five presets set every control at once: Capillaries, Gold veins, Crimson web, Mycelium and Starved. You can swap in your own two pictures, tap the picture to stir the agents there, and keep a PNG or a video.

Open Physarum trails Start here

In this guide

  1. StartWhat you need and your first network in five steps.
  2. Every controlEvery control in the panel, one line each.
  3. Three looksThree presets caught partway through a run, and how each was made.
  4. Keep your workThe PNG and the video.
  5. HelpWhat to do when something goes wrong.

It runs in your browser with WebGL on your GPU. Your pictures stay on your device and nothing is uploaded. A mouse, a trackpad, a pen and a finger all work.