Vicsek Model Explorer © 2026 Theodore P. Pavlic · MIT License

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.

Current state
▶ Focal particle ▶ Neighbor ▶ Non-neighbor → ⟨θ⟩r ↺ Δθ → θ(t+1)
Update Equations
① Heading Update
⟨θ⟩r = atan2(Σj∈Ni sin θj, Σj∈Ni cos θj) θi(t+1) = ⟨θ⟩r + Δθi
Average heading of all particles within radius r (including i), plus noise. Kennedy & Eberhart (1995) borrowed this social-averaging idea for PSO.
② Noise
Δθi ~ U(−η/2, η/2)  // uniform (default) Δθi ~ 𝒩(0, σ2)    // Gaussian (optional)
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 ej| = (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|
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).