This is a simulation of the Vicsek Model for self-propelled particles.
I came across this model in this Nature article, describing some advances in the field of active matter.
You can tweak the model configuration by passing arguments to the URL. The following parameters are available:
N
: number of particles in the simulationv
: velocity of particles in pixels per updaten
: noise amplitude in radians to be added to particles' velocity directionr
: radius in pixels to look for neighboring particles in the average direction computationfps
: frames per second to drawblur
: motion blur to apply from 0.0 to 1.0bs
: body size of particles in pixelsts
: tail size of particles in pixelstw
: tail width of particles in pixelscm
: number of individual directions to consider on color computation
For instance, to create a simulation with 500 individuals, noise amplitude of 2 radians and velocity of 10 pixels you can access http://allanino.me/vicsek-model-simulation/?N=500&n=2.0&v=10.