Lorenz Attractor REC

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

What's happening

Three variables — x, y, z — each feed back into each other's rate of change. Edward Lorenz wrote this down in 1963 as a drastically simplified model of atmospheric convection: x is roughly the rate of fluid roll, y and z describe how temperature varies across and along that roll.

The constants

σ (sigma) is the Prandtl number — how readily the fluid diffuses momentum versus heat. ρ (rho) is the Rayleigh number — how hard the system is being driven (heated from below); above ≈24.74 the steady states become unstable and the system turns chaotic. β (beta) is a geometric factor from the box the fluid sits in.

Why the butterfly shape

The trajectory never settles down and never exactly repeats, but it also never flies off to infinity — it stays confined to a bounded, infinitely-detailed shape called a strange attractor. The two "wings" correspond to the fluid rolling one way or the other; when and how often it switches wings is unpredictable.

Sensitive dependence

This is the origin of the "butterfly effect": two trajectories that start a hair's width apart diverge exponentially, so long-term behavior is unpredictable even though the equations are completely deterministic. Add a second or third attractor above — give it a near-identical starting point — and watch how quickly it peels away from the first.

Controls

Drag to orbit, scroll to zoom. Frame (button) picks the angle that shows the most of the current shape; the Auto-Frame toggle does that continuously, smoothly drifting toward the best nearby angle as the attractor grows, without flipping to the back side. Axes draws the x/y/z reference lines, Gridlines draws a floor grid for spatial reference; Screenshot and recording capture only the animation, not the elapsed-time readout.

Drag to orbit · right-drag or Shift-drag or two-finger scroll to pan · pinch / Alt-scroll / Zoom slider to zoom. Add attractors below — each solves the same equations from its own seed, so tiny differences diverge into chaos. Screenshot and recording capture only the animation, not the elapsed-time readout.
Fine-tune