Curious coder and an aspiring Physicist
Coordinated behaviour is extremely common in animals. One such example is the phenomenon of collective motion. It is the spontaneous emergence of ordered movement in a system consisting of many self-propelled agents, for example flocking in birds, swarming in insects, schooling fishes, etc.
Vicsek model is a mathematical model describing the emergent properties in self-propelled particles. The central idea is that every particle aligns itself in the average direction of motion of its neighbours.
A box of size L was taken with periodic boundary conditions. We consider point particles moving on the plance. The particles have a certain radius of interaction beyond which they cannot percieve their surroundings. Positions were updated at an interval of $\Delta t=1$
The particle positions are randomly initialized within the L $\times$ L box. Each of the particles are given a fixed speed $v$ at a random direction $\theta$
The positions are updated as follows
The direction of motion of the particles after every time step is given by,
$\langle\theta(t)\rangle_r$ is the average direction of the velocities of particles (including particle i) being within a circle of radius r surrounding the given particle.
In our case $\Delta \theta$ was taken to be a random number chosen with uniform probability from the interval $[\ \eta/2, \eta/2]$
Thus we have 3 free parameters for a system of given size L:
Color of a particle corresponds to its direction of motion.