New Simulations
Strange Attractors — Lorenz, RΓΆssler, Thomas, Halvorsen
3D drag-to-rotate visualization of four chaotic strange attractors. RK4 integration, three colour modes (velocity / time / depth), adjustable trails and parameters. Pre-runs 2000 steps to land on the attractor before display.
Wolf-Sheep Predation — Agent-Based Ecology
50×50 spatial grid where sheep eat grass, wolves hunt sheep using range vision, and sheep flee from nearby wolves. Population time series chart shows Lotka-Volterra-style cycles emerging from local rules.
Kuramoto Synchronization — Coupled Phase Oscillators
N oscillators governed by dΟα΅’/dt = Οα΅’ + (K/N)Ξ£sin(Οβ±ΌβΟα΅’). Order parameter r(t) time series and live phase histogram show the continuous synchronization phase transition at K_c β 2Ο_Ο.
π Strange Attractors β 3D Chaotic Topology
What makes an attractor "strange"?
A strange attractor is a set toward which a dynamical system evolves, but where nearby trajectories diverge exponentially β the hallmark of deterministic chaos. The key properties are: (1) bounded motion, (2) sensitivity to initial conditions (positive Lyapunov exponent), and (3) fractal structure (non-integer Hausdorff dimension).
The simulation implements four classic systems using a 4th-order Runge-Kutta (RK4) integrator. Points are stored in a circular trail buffer and rendered with alpha-blended line segments. A simple perspective projection with two rotation angles (rotX, rotY) allows full 3D exploration via mouse drag or touch.
The four attractors
- Lorenz (1963) β αΊ=Ο(yβx), αΊ=x(Οβz)βy, ΕΌ=xyβΞ²z. At Ο=10, Ο=28, Ξ²=8/3: the butterfly with Lyapunov Ξ»β0.905 and fractal dimension β2.06.
- RΓΆssler (1976) β αΊ=βyβz, αΊ=x+ay, ΕΌ=b+z(xβc). Simpler than Lorenz; the attractor resembles a folded band. Ξ»β0.071 at a=b=0.2, c=5.7.
- Thomas (1999) β αΊ=sin(y)βbx, and cyclically. A single parameter b controls dissipation; at bβ0.19 three lobes emerge with 3-fold symmetry.
- Halvorsen β Cyclic quadratic coupling: αΊ=βaxβ4yβ4zβyΒ². Produces an elegant triple-spiral structure with 3-fold rotational symmetry.
Colour modes
Three modes reveal different attractor geometry:
- Velocity β HSL hue mapped to instantaneous speed (slow=blue, fast=red). Highlights the "fast fold" regions of the attractor.
- Time β Continuously cycling hue. Effective for spotting periodicity breaks.
- Depth β Hue mapped to the z-coordinate of the 3D trail. Reveals topological layering.
πΊ Wolf-Sheep Predation β Spatial Agent Ecology
From ODEs to individual agents
The classic Lotka-Volterra equations describe predator-prey dynamics with smooth differential equations. This simulation replaces them with individual agents on a 50×50 grid, where each sheep and wolf makes its own local decisions each tick. Global-scale cycles emerge from purely local interactions β no equations encode the oscillation explicitly.
Agent rules
- Grass regrows by a fixed rate each tick, capped at 100 energy units per cell.
- Sheep sense nearby wolves (range 5) and flee; otherwise random walk. They eat grass at their current cell, lose 1 energy/tick, and reproduce when energy exceeds the threshold (probability 4%/tick).
- Wolves sense nearby sheep (range 8) and move toward the nearest; otherwise random walk. They eat one sheep per tick (if co-located), lose 3 energy/tick, and reproduce at 70 energy (probability 2.5%/tick).
- Agents die when energy β€ 0.
The population time series chart records history for 350 ticks. Typical behaviour: sheep overshoot as grass is abundant β wolf population spikes with lag β sheep collapse β wolves starve β sheep rebound. The spatial structure produces refugia β patches where sheep survive wolf waves β which sustain the cycles rather than leading to extinction.
π Kuramoto Synchronization β A Phase Transition in Coupled Oscillators
The model
Yoshiki Kuramoto (1975) proposed one of the most elegant models in nonlinear science. Each oscillator i has a phase Οα΅’ β [0, 2Ο) that evolves as:
dΟα΅’/dt = Οα΅’ + (K/N) Ξ£β±Ό sin(Οβ±Ό β Οα΅’)
where Οα΅’ is drawn from a Gaussian distribution with spread Ο, and K is the global coupling strength. Natural frequencies are frozen (quenched disorder), so without coupling each oscillator simply runs at Οα΅’. The sin coupling term pulls each oscillator toward its neighbours' phases.
Order parameter and the phase transition
The degree of synchrony is measured by the complex order parameter:
r e^(iΟ) = (1/N) Ξ£β±Ό e^(iΟβ±Ό) β r β [0, 1]
r = 0 means the phases are uniformly spread (incoherent); r = 1 means all phases are identical (fully synchronized). Kuramoto's exact solution for the Lorentzian frequency distribution gives a critical coupling:
K_c = 2Ξ³ (Lorentzian) K_c β 2Οβ(2/Ο) (Gaussian)
Below K_c: r β 0 as N β β (incoherent phase). Above K_c: r jumps continuously from zero β a second-order phase transition. The simulation uses a Gaussian distribution and estimates K_c β 2Ο as a quick guide.
Try this
- Start with K=0 and watch the phases spread uniformly. The histogram is flat, r β 1/βN (finite-size noise).
- Slowly increase K past K_c β 2Ο. Watch r rise and the histogram develop a spike β a cluster of locked oscillators.
- Click Perturb to kick the phases and see how quickly the system re-synchronizes.
- Increase Ο (frequency spread) to raise K_c β more coupling is needed to overcome the disorder.
Real-world applications
Kuramoto-type synchronization appears across biology and engineering: cardiac pacemaker cells in the sinoatrial node, neural gamma oscillations in cortex, circadian clock cells in the suprachiasmatic nucleus, flashing fireflies, and stability of AC power grids. The universality of the model is one of the most striking facts in complex systems science.
Looking Ahead
Candidate simulations for Wave 60 include: a Turing-diffusion reaction-diffusion system (distinct from the Turing machine), a viscoelastic fluid solver, a double pendulum ensemble showing chaos onset, and a network science visualizer for random/scale-free/small-world graphs. We're also considering adding a "collections" feature to let visitors bookmark and share curated sets of simulations.