physarum slime mold simulation

parameters

glossary

  • decay: the dropoff factor of residual deposits
  • sensorAngle: angle from center of the two side "sensors" on each particle
  • sensorDistance: distance from the particle the sensors protrude
  • rotation: angle of rotation particles make when turning
  • velocity: distance particles travel each frame
  • depositSize: amount of residue deposited by particles each frame
  • divergenceProbability: the probability of particle diverging from the chosen path
  • diffusionDistance: the distance diffusion is applied for each pixel
  • size: size of the canvas
  • particles: number of particles, as the proportion of the canvas area

what even is this?

A javascript implementation of a physarum slime mold simulation, inspired by this post by Sage Jenson. The simulation consists of a set of particles and a "deposition" layer where the particles leave trails. The trails diffuse each frame. Each particle has a position, heading, and 3 "sensors" used to determine direction change. Lots more information available in the linked blog post and the original paper.

You can right click on the canvas to save any appealing images, and the parameters are encoded in the URL so you can share any interesting configurations!