Skip to main content
. 2016 Nov 30;6:37969. doi: 10.1038/srep37969

Figure 1. Explanatory implementation of a PPS as pseudo-code.

Figure 1

Each particle determines the number of its neighbors on the left side (Lt, all other particles in a semicircle with radius r) and on the right side (Rt, all other particles in a semicircle with radius r). The change of its heading (Δϕ) in each time step t is the left-hand side result of equation 1. After rotating, each particle moves forward with a fixed velocity (v).