🦋 Lorenz Attractor Dynamics Simulation
3D Lorenz attractor: up to 80 trajectories forming butterfly wings in real time. Adjust σ, ρ, β parameters. RK4 integration, chaos theory visualised.
The Lorenz attractor is the icon of chaos theory: a fully deterministic system that is impossible to predict long-term. Tiny differences in starting conditions diverge exponentially — the famous butterfly effect.
🔬 What It Demonstrates
Three coupled differential equations, derived by Edward Lorenz in 1963 to model atmospheric convection, produce trajectories that never repeat yet stay confined to a fractal butterfly-shaped attractor with dimension ≈ 2.06.
🎮 How to Use
Drag to rotate the 3D attractor. Launch multiple particles with slightly different starting positions to visualise exponential divergence. Adjust ρ (rho), σ (sigma), and β (beta) to explore different attractor shapes.
💡 Did You Know?
Lorenz discovered chaos accidentally in 1961 by re-running a simulation with rounded values (0.506 instead of 0.506127). The forecast diverged completely, leading to his 1972 lecture asking whether a butterfly's wing-flap could trigger a tornado.
About this simulation
This visualiser traces the Lorenz attractor, the set of three coupled ordinary differential equations Edward Lorenz published in 1963 to model heat-driven atmospheric convection. Up to 80 particles are stepped through 3D state space, each leaving a colour-coded trail that settles onto the famous butterfly-shaped strange attractor. Because nearby trajectories separate exponentially, the system is the textbook illustration of deterministic chaos: completely rule-bound, yet impossible to forecast far ahead.
🔬 What it shows
Each curve obeys dx/dt = σ(y − x), dy/dt = x(ρ − z) − y and dz/dt = xy − βz. The animation advances every particle in tiny time steps (five sub-steps per frame) so you can watch initially neighbouring paths fan apart while remaining bound to the two-lobed attractor, whose fractal dimension is roughly 2.06.
🎮 How to use
Drag to rotate the scene and scroll to zoom. The σ, ρ and β sliders reshape the attractor; Particles sets how many trajectories run (1–80); Trail length controls how many recent points each trail keeps (100–3000); Speed × scales simulation time (0.2–6). Press ↺ Restart to re-seed every particle from fresh starting points.
💡 Did you know?
Lorenz met chaos by accident in 1961, when restarting a forecast from a rounded value (0.506 instead of 0.506127) produced a wildly different result. That insight led to his 1972 talk asking whether a butterfly's wing-flap in Brazil might trigger a tornado in Texas — the origin of the term butterfly effect.
Frequently asked questions
What is the Lorenz attractor?
It is the long-term behaviour of a three-variable system of differential equations introduced by Edward Lorenz in 1963 as a simplified model of convection. Instead of settling to a point or a loop, the solution wanders forever along a fixed butterfly-shaped surface in 3D space, called a strange attractor.
How does the simulation compute each trajectory?
For every particle it evaluates the three Lorenz equations using the current σ, ρ and β values, then advances x, y and z by a small time increment. The frame loop performs five sub-steps per frame for stability, and recent positions are stored in a ring buffer and drawn as a fading 3D trail.
What do the σ, ρ and β sliders change?
They are the three system parameters: σ (the Prandtl number, 1–30), ρ (the Rayleigh number, 10–60) and β (a geometric factor, 0.5–6). The classic chaotic regime uses σ=10, ρ=28 and β=8/3 ≈ 2.67. Lowering ρ below about 24.74 makes trajectories spiral into a stable point instead of behaving chaotically.
Why do particles that start together drift apart?
This is sensitive dependence on initial conditions, the defining feature of chaos. The attractor has a positive Lyapunov exponent, so the gap between two nearby trajectories grows roughly exponentially with time. Even identical equations and a microscopic difference in start point soon yield completely different paths.
Is the visualisation physically accurate?
The equations and the attractor shape are faithful, and the divergence you see is a genuine property of the system. It is, however, a heavily idealised toy model of convection rather than real weather, and the numerical integration uses a finite time step, so individual trajectories are approximations whose detailed paths depend on the chosen step size.
Observe the formation of intricate butterfly wing patterns as you manipulate parameters within this chaotic system, exploring the core principles of the Lorenz attractor.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install