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
- Mouse: drag to rotate, wheel to zoom. In the flat XY, XZ and YZ views dragging moves the picture.
- Touch: one finger rotates, two fingers pinch to zoom. The page does not scroll while your finger is on the screen area.
- Keyboard: Space plays or pauses and R resets. With the screen focused, the arrow keys rotate, + and − zoom and 0 resets the view.
- Sliders change the parameters while the system runs. Reset parameters brings back the classic values.
- Save PNG downloads the picture. Copy link makes a link that reopens the page with the same system and parameters. Settings are remembered in this browser.
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:
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
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
- Lower ρ to 20 and turn on “Mark the fixed points”. The butterfly dies: the path spirals into C+ or C−. Below ρ = 1 everything falls to the origin.
- Set ρ to 160. Instead of chaos you get a closed loop, and the growth rate drops to about zero.
- Set the start distance to 0.001, note the horizon, then set 1e-9. The error is a million times smaller, yet the horizon is only about three times longer.
- Drop a cloud of 2,000 points on the Lorenz attractor and watch the blob become a ribbon that is folded across both wings.
- In the Rössler system set c to 2.5 for a single loop, then raise it: two turns near 3.5, four near 4, chaos from about 4.2.
- Look at the Lorenz attractor in the flat XZ view for the classic butterfly shape.
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.