The Vicsek model (Vicsek et al., 1995) describes point particles that move at a fixed speed and update their heading to match the average heading of their neighbors, plus a small noise perturbation.
Despite its simplicity, the model exhibits a sharp order-disorder phase transition as noise increases — below a critical η, particles spontaneously align into a coherent flock; above it, motion is disordered.
The animation cycles through the heading update for a single focus particle; the right panel gives the equations and pseudocode.
For an interactive simulation showing the phase regimes, see Tab ② Simulation.
Uniform noise is standard (Vicsek 1995). Gaussian noise has equivalent RMS magnitude at σ = η/√12.
③ Position Update
xi(t+1) = xi(t) + v0(cos θi(t+1), sin θi(t+1))Δt
Each particle moves at constant speed v0 in its new heading direction. Speed is fixed — only direction changes.
System Properties
Order Parameter φ
φ = (1/N)|Σj eiθj|
= (1/N)√((Σcosθ)2+(Σsinθ)2)
φ = 0: all headings random. φ = 1: perfect alignment. A global statistic — not part of the particle dynamics. Near the critical ηc, φ fluctuates strongly.
φ ≈ 0
φ ≈ 0.5
φ ≈ 1
Algorithm Sketch
initialize N particles in [0,L]²:
xi ∼ U([0,L]²); θi ∼ U(−π, π)
repeat each timestep:
for each particle i:
Ni = {j : dist(xi, xj) < r}
⟨θ⟩r = atan2(Σj∈Nisinθj, Σj∈Nicosθj)
Δθi ∼ U(−η/2, η/2)
θi ← ⟨θ⟩r + Δθi
xi ← xi + v0(cosθi, sinθi)
apply boundary conditions
φ ← (1/N)|Σieiθi|
Phase Transition
The transition from disordered to ordered motion is driven by the competition between alignment (neighbor averaging) and randomness (η). Near the critical ηc, the order parameter φ shows large fluctuations and anomalous scaling. Whether the transition is continuous or weakly first-order remains debated (Grégoire & Chaté, 2004).
Particles are colored by heading angle — a uniform color means alignment, a rainbow means disorder.
Adjust η (noise) and density to explore the three collective regimes. Use the presets to jump between them, then explore the parameter space around each.
Particle swarmready
Press Run to start
Heading distribution & order parameter
φ (order param.) = —
φ (order param.)
Presets (colored by phase)
Controls
speed1×
Noise type
Uniform U(−η/2, η/2)
Boundaries
Periodic (toroidal)
Parameters
η0.10
N200
v00.05
r1.0
Display
Show interaction radii
Phase diagram (approx.)
Order is driven by low noise and high density, where density is set by both particle count (N) and effective interaction size (~r). The dashed boundary estimates ηc ≈ 0.45√(ρeff/2π) — reflecting the fundamental tension between noise (which randomizes headings) and density-driven alignment discussed in the Phase Transition note on Tab ①.