Lorenz AttractorBeta
Watch thousands of particles trace the chaotic Lorenz butterfly in 3D
This tool is a beta version still being stabilized. Please let us know if a result looks off.
Every particle starts in a tiny cloud near (1, 1, 20) and follows the Lorenz equations dx/dt = σ(y−x), dy/dt = x(ρ−z)−y, dz/dt = xy−βz. At first they move as one blob, but they soon drift apart (the butterfly effect) and fill the whole two-winged strange attractor. Drag to rotate the view. Set ρ below 1 and everything falls to the origin; below about 24.74 each particle spirals into one of two fixed points.
Working…
0.0
It hasn't frozen — the result will appear when the calculation finishes.
About Lorenz Attractor
Every dot on screen is a particle obeying the Lorenz equations dx/dt = σ(y − x), dy/dt = x(ρ − z) − y, dz/dt = xy − βz. By default 3,000 particles start scattered at random inside a small box, 0.5 units on a side, centred on (1, 1, 20). Each one is integrated with RK4 using time steps no larger than 0.004, and its tail joins its last 16 frames.
The Time readout is the dimensionless time inside the equations; at 1× speed, 0.5 units of model time pass per real second. Spread is the sum of the standard deviations along x, y and z. It starts at about 0.44 and tells you whether the cloud is still one clump or has been smeared across the whole attractor.
What x, y and z originally meant
Lorenz's 1963 paper derived these three equations as a drastically cut-down model of convection in a fluid layer heated from below. x is the strength of the convective roll (its sign is the direction of rotation), y is the temperature difference between rising and sinking fluid, and z measures how far the vertical temperature profile departs from a straight line. σ is the Prandtl number (viscosity relative to heat diffusion), ρ is the Rayleigh number divided by its critical value (how hard the layer is heated), and β is a constant set by the shape of the convection cell. Lorenz used σ = 10, β = 8/3 and ρ = 28, which is what the Classic button restores.
So a particle circling one wing is a roll turning one way, and a jump to the other wing is the roll reversing. The point of the model was that you cannot say in advance how many loops it will make before the next reversal.
Experiment 1: how fast the cloud tears
Reset with the defaults and watch Spread. In a separate run of the same starting distribution, Spread was about 1.2 at model time 1 and had jumped to around 30 before model time 2, so at 1× speed the cloud splits into two wings within about four real seconds. That is quick because the start sits where x is close to zero, and part of the cloud heads straight for the left wing while the rest goes right.
After that Spread wanders between about 20 and 30 and grows no further, because the attractor itself is bounded. Had the initial cloud been far tighter, say 0.0001 across, it would have travelled as a single point for 8 to 10 units of model time and then grown by factors of 10 and 100 to the same end state. This tool fixes the initial spread at 0.5, so you cannot watch that slow exponential phase here.
Experiment 2: switching the chaos off with ρ
Below ρ = 1 the heating is too weak for convection. At ρ = 0.5 every particle falls into the origin, the state with no motion. Above ρ = 1 two new fixed points appear, C± = (±√(β(ρ−1)), ±√(β(ρ−1)), ρ−1), which are steady rolls turning one way or the other. At ρ = 20 they sit at (±7.12, ±7.12, 19), and the particles spiral into one or the other depending on where they started.
Those rolls lose stability at ρ_H = σ(σ + β + 3)/(σ − β − 1). With σ = 10 and β = 8/3 that is 10 × 15.667 ÷ 6.333 = 24.74, the “about 24.74” in the tool's description. The story is not quite that simple, though. For roughly 24.06 < ρ < 24.74 the stable fixed points and the chaotic attractor coexist; set ρ = 24.5 and many particles are still flipping between wings after 60 units of model time. Lower still, for about 13.93 < ρ < 24.06, you get transient chaos: particles wander chaotically for a while before settling onto a fixed point (Kaplan and Yorke, 1979).
Reading the forecast horizon from Lyapunov exponents
At the classic values the largest Lyapunov exponent is about 0.906, meaning nearby trajectories separate on average like e^{0.906t}. A gap doubles every ln 2 ÷ 0.906 ≈ 0.77 units of model time and grows tenfold every 2.54. With an initial error of 10⁻⁶ and an attractor about 20 units across, a forecast fails at roughly ln(2×10⁷) ÷ 0.906 ≈ 18.6. Cutting the initial error a thousandfold adds only about 7.6.
The three exponents sum to −(σ + 1 + β) = −13.67. Any blob of particles shrinks in volume by a factor of e^{−13.67} per unit of model time, stretched in one direction and squeezed much harder in another, which is why the particles end up on a sheet of zero volume. Sprott's calculation puts the attractor's dimension at about 2.06: a fractal just slightly thicker than a surface.
What this simulation leaves out
The Lorenz system is not the weather. It keeps only three Fourier modes of the convection problem, and at strong heating like ρ = 28 a real fluid layer does not behave this way. What Lorenz showed is that a deterministic system this simple can already be nonperiodic and unpredictable. The view is a rotated projection of a 3D object, so from some angles the wings overlap and orbits appear to cross; in three dimensions trajectories never intersect. The β slider displays 2.67, while the Classic button sets exactly 8/3.
Worked examples
Fixed points at ρ = 20
- Input
σ 10, ρ 20, β 8/3- Output
C± = (±√(8/3 × 19), …, 19) = (±7.12, ±7.12, 19)
Particles spiral into one of the two points; in a separate run of the same equations the final coordinates matched these values to two decimal places.
Forecast horizon
- Input
Largest Lyapunov exponent 0.906, initial error 10⁻⁶, tolerance 20- Output
t ≈ ln(2×10⁷) ÷ 0.906 ≈ 18.6 model time units
An initial error of 10⁻⁹ gives t ≈ 26.2, only 7.6 more.
How to use it
- Moving σ, ρ or β changes the equations without moving the particles; changing the particle count restarts the run.
- Reset scatters a fresh cloud near (1, 1, 20).
- Drag to rotate the view and watch Spread and Time to see when the cloud comes apart.
Frequently asked questions
Is it called the butterfly effect because the attractor looks like a butterfly?
No. The name comes from the title of a talk Lorenz gave at the American Association for the Advancement of Science meeting in December 1972: “Predictability: Does the Flap of a Butterfly's Wings in Brazil Set Off a Tornado in Texas?” The resemblance of the attractor to wings is a coincidence.
Why does an orbit never repeat itself?
There are infinitely many periodic orbits on the attractor, but all of them are unstable. A particle shadows one for a while, drifts off, shadows another, and never closes a loop.
What happens if I push ρ up to 60?
The attractor grows and rises (the fixed points sit at z = ρ − 1) while keeping its two-winged structure. Scaled to its size, it looks much like the ρ = 28 picture.
Will Reset give me the same picture every time?
Each reset uses a new random seed, so the starting cloud differs slightly. Within seconds the individual particles are in entirely different places, yet the overall shape of the attractor is the same every time. That combination, unpredictable details with a predictable overall shape, is why climate statistics can be forecast when a specific day's weather cannot.
Related guides
Sources
- E. N. Lorenz, Deterministic Nonperiodic Flow, J. Atmos. Sci. 20, 130–141 (1963)
- J. C. Sprott, Lyapunov Exponent and Dimension of the Lorenz Attractor
- J. L. Kaplan, J. A. Yorke, Preturbulence: a regime observed in a fluid flow model of Lorenz, Commun. Math. Phys. 67, 93–108 (1979)
Last reviewed: