Playground · Lorenz Attractor
Lorenz attractor
Three simple equations from a toy weather model, and out comes this — the butterfly. The trajectory never repeats and never escapes, looping forever around two wings. It's where the phrase "butterfly effect" comes from: turn on the twin and watch two near-identical starts drift apart.
How it's built
Edward Lorenz's 1963 system: ẋ = σ(y−x), ẏ = x(ρ−z)−y, ż = xy−βz (σ=10, ρ=28, β=8⁄3), integrated with RK4 in vanilla JS and drawn as a fading 3-D trail you can rotate. It's fully deterministic yet never settles into a loop — a strange attractor. The twin starts a millionth away; within a few seconds it's on the other wing. Same lesson as the three-body problem and the double pendulum: deterministic ≠ predictable.