Physarum
Summary
Physarum is a GPU-accelerated simulation that creates organic network patterns inspired by the Physarum polycephalum slime mold organism. This operator simulates particles (agents) that sense their environment through forward-facing sensors, rotate toward higher concentrations of deposited trails, and move while depositing their own trails. The emergent behavior produces vein-like networks, branching patterns, and maze-solving structures as particles collectively optimize paths through space, creating patterns similar to biological transportation networks, neural systems, and fungal mycelium.
The simulation operates in 2D or 3D space with a volumetric trail map that stores deposited pheromone-like values. Each particle extends sensors at specified distances and angles to sample trail concentrations, rotates toward the strongest signal using configurable rotation angles, and moves forward depositing trail substance. The trail map undergoes diffusion and decay each iteration, spreading and fading the deposited trails to create smooth gradients that guide particle movement. You control particle behavior through sensor parameters (distance, angle), rotation parameters (turning angle based on sensor readings), move distance, and diffusion settings (blur type, decay rate, filter size).
Physarum supports optional volume constraints to confine particle movement within texture-defined regions using force-based repulsion (2D texture in 2D mode, 3D texture in 3D mode). The simulation outputs both particle positions and the trail texture, allowing visualization of the particle swarm itself or just the accumulated trail patterns. Boundary behaviors (off, clamp, loop, zigzag) control how particles interact with simulation bounds. This makes Physarum ideal for generative network art, organic vein patterns, maze generation, path optimization visualization, neural network aesthetics, and procedural mycelium textures.