Number of particles: 2000
Simulation speed: Max
Number of species:
Initiation mode:
Background color:
Particle color:
Trail color:
Velocity: 1 pixels/step
Turn angle: 45°
Random turn angle: 10°
Scan angle: 45°
Scan distance: 9 pixels
Scan size: 2 pixels
Introduction
This webapp was created to simulate the motion of a slime mould in a 2d space. I was
inspired by a video by Sebastian Lague :Coding Adventure: Ant and Slime Simulations,
which was itself, inspired by this paper: Characteristics of physarum transport networks.
I found the website, Creating Interactive Web Simulations Using HTML5 and JavaScript, very helpful for creating this project.
This project was created with the intention of submitting it as my final project for CS50x.
Particle behavior
- All particles have equal velocity and do not collide with eachother.
- Particles leave a trail at their current location, which fades gradually.
- Each particle measures the "strength" of trail to the left and right of it's current position, and will turn towards the position of the stronger trail by an angle of "Turn angle". The exact locations the particles sense relative to their position can be controlled by parameters "Scan angle","Scan distance", and "Scan size".
- If more than one species are present, a particle of a given species will be attracted to trails of its own species, and will be repelled by trails of other species.
- Particles can also turn randomly every timestep, by an angle of +/- "Random turn angle".