Fractals

Strange attractors

A simple formula repeated millions of times draws the cloud a chaotic orbit is pulled into.

  • GPU particles
  • looping animation
Open in the editor →

A point goes into two formulas with sines, a new point comes out, and so on. After a million steps the path has neither escaped nor settled into a cycle: it wanders forever inside a cloud of veils, loops and folds. That cloud is a strange attractor, the set chaotic orbits are drawn into. Such chaos is why weather cannot be forecast far ahead.

How it works

The 2D maps (Clifford, de Jong, Svensson, Bedhead, Hopalong) give the new x and y from the old ones. The 3D flows (Lorenz, Aizawa, Thomas, Halvorsen) are velocity equations, integrated in small midpoint steps and projected through “Turn” and “Tilt”.

Clifford: x′ = sin(a·y) + c·cos(a·x) y′ = sin(b·x) + d·cos(b·y) Lorenz: ẋ = σ(y − x) ẏ = x(ρ − z) − y ż = xy − βz

The GPU holds 262,144 particles. They start on the orbit, and on each pass every one steps and leaves a mark in its pixel. “Quality” is the number of passes: 260 by default, about 68 million points. Knots get hundreds of times more marks than the fringes, hence a log scale: “Exposure” stretches it and “Gamma” lifts the faint veils. “Colour by” tints points by speed, step direction, distance from the centre or the density itself.

The a–d sliders are offsets from known good values, such as Lorenz’s classic σ = 10, ρ = 28, β = 8/3. Most random coefficients collapse to a few points, so “Random parameters” keeps trying until the orbit fills a fair part of the frame.

A bit of history

In 1963 the MIT meteorologist Edward Lorenz published three equations, a stripped-down model of convection whose solutions never repeat and are so sensitive to starting values that a rounding error eventually wrecks the “forecast”. His 1972 talk, “Does the flap of a butterfly’s wings in Brazil set off a tornado in Texas?”, named the butterfly effect, and the Lorenz attractor does look like a butterfly. David Ruelle and Floris Takens coined “strange attractor” in 1971, and in 1976 Michel Hénon fitted chaos into a two-line planar map, the ancestor of the maps here: Clifford is named after the science writer Clifford Pickover, and Hopalong was devised by Barry Martin.

What to tweak

  • Nudge a or b by hundredths: the cloud melts from shape to shape, then suddenly collapses to a few points, a window of order inside chaos.
  • “Look” set to “threads” draws Thomas or Aizawa as a few long trajectories, like pen work (Lorenz gets them on “auto”).
  • A dark background, a magma or inferno palette and “Gamma” at 2.5–3 bring out the faintest veils.
  • In animation, “Wobble” makes flat attractors breathe; “Spin” turns the 3D ones.
  • Add the “Glow” effect on top and the dense knots shine like a nebula.

Parameters

Attractor
Clifford · de Jong · Svensson · Bedhead · Hopalong · Lorenz · Aizawa · Thomas · Halvorsen
a
b
c
d
Quality
Passes over a quarter-million particles
Exposure
Gamma
Look
For 3D flows: a particle cloud or a few long trajectory threads auto · cloud · threads
Colour by
speed · direction · distance · density
Zoom
Turn
For 3D flows
Tilt
Spin
Turns of a 3D attractor per loop
Wobble
a and b circle around — the cloud breathes