Clever Quest Lab ← Labs

Strange Attractors

Rotate chaos in 3D and measure the butterfly effect.

Drag to rotate, scroll or pinch to zoom. Keyboard: Space play/pause, R reset; on the screen: arrows rotate, + and − zoom, 0 resets the view.

Butterfly effect

Two points start 0.000001 apart. This is the distance between them as time passes, on a logarithmic scale. Butterfly mode draws both.

distancefitted lineprevious run

Distance now
–
Test time
0
Growth rate (largest Lyapunov exponent, estimate)
measuring…
Prediction horizon
–

Equations and parameters

Display

View and export

How to use it

The dark screen shows a point whose motion is set by three short equations. Pick a system above the screen, drag to rotate it and scroll or pinch to zoom. In Trail mode one point draws a long glowing line. Cloud mode drops up to 2,000 points into a tiny blob and lets the flow stretch and fold it over the whole shape. Butterfly mode follows two points that start a millionth apart.

The Butterfly effect panel plots the distance between the two points on a logarithmic scale, so a straight rising line means exponential growth. The slope of that line is the growth rate, and the panel turns it into a prediction horizon.

Controls

How it works

In 1961 Edward Lorenz, a meteorologist at MIT, restarted a small computer weather model from the middle of a run. He typed in 0.506 where the machine had held 0.506127, and the new forecast soon had nothing in common with the old one. In 1963 he published “Deterministic Nonperiodic Flow”, which reduced convection in a layer of fluid heated from below to three equations:

dx/dt = σ (y − x)
dy/dt = x (ρ − z) − y
dz/dt = x y − β z

Here x is the strength of the rolling motion, and y and z describe temperature differences. Lorenz used σ = 10, ρ = 28 and β = 8/3. The page solves the equations with the fourth-order Runge–Kutta method and a fixed time step.

An attractor is the set that trajectories settle onto once the start is forgotten. A fixed point and a closed loop are simple attractors. The Lorenz attractor is “strange”: the path never repeats, neighbouring paths separate exponentially (sensitive dependence on initial conditions), and the set is a fractal made of infinitely many layers. Its dimension is about 2.06, slightly more than a surface.

The system is deterministic: the same start always gives the same path. It is unpredictable in practice because a start error δ0 grows roughly as δ0·eλt, where λ is the largest Lyapunov exponent. For the classic Lorenz values λ is about 0.906 per time unit. The prediction horizon is

T ≈ ln(Δ / δ0) / λ

where Δ is the error you can tolerate. Because of the logarithm, a start that is a thousand times more accurate buys only about eight more time units on the Lorenz system. This is why weather forecasts have a limit of roughly two weeks, however good the measurements become.

The name “butterfly effect” comes from the title of a talk Lorenz gave in 1972, “Predictability: Does the Flap of a Butterfly’s Wings in Brazil Set Off a Tornado in Texas?”. In 1976 Otto Rössler found a simpler chaotic system with a single nonlinear term. The Thomas, Chen, Halvorsen and Aizawa systems are later examples.

Things to try

Frequently asked questions

Is chaos the same as randomness?

No. Each step follows exactly from the one before. The motion only looks random because tiny differences grow until they are as large as the attractor itself.

Why is my estimate not exactly 0.906?

The accepted value is an average along a very long trajectory. Each test here ends when the two points are far apart, so single runs scatter by about ten percent, and their average usually lands a little below 0.9.

Why would two computers draw different paths?

Different rounding in the last digit acts as a tiny start error, and chaos amplifies it. The exact paths differ, but the attractor’s shape and statistics stay the same.

What does a dimension of 2.06 mean?

The attractor is more than a surface, which has dimension 2, but far from filling a volume. It behaves like infinitely many sheets packed closely together.

Does a butterfly really cause a tornado?

Lorenz asked it as a question. A wing beat does not supply the energy of a storm. It is a small change that can decide which of the possible weather histories actually happens.

More free games and simulators