CurvG
Sign In

No. 11 · Dynamical systems · Chaos

Two lines of formula and four numbers: how do they draw pictures like these?

Start from a point, put it into two lines of formula to get the next, and repeat. After three million hops, draw where the points landed and you have a picture. Change the four numbers and it morphs; for some values the chaos suddenly vanishes, leaving just a few points.

Why?

The explanation

Every step is fully determined, yet the point never repeats and never wanders off, roaming for ever over a shape with fractal detail: a strange attractor. A positive Lyapunov exponent means chaos; a negative one means the orbit settles into a cycle of a few points.

01One map

These are the Clifford attractor equations (attributed to Clifford Pickover):

xn+1=sin⁡(a yn)+ccos⁡(a xn),yn+1=sin⁡(b xn)+dcos⁡(b yn)x_{n+1}=\sin(a\,y_n)+c\cos(a\,x_n),\qquad y_{n+1}=\sin(b\,x_n)+d\cos(b\,y_n)

Since ∣sin⁡∣|\sin| and ∣cos⁡∣|\cos| never exceed 1, the point always stays inside the box ∣x∣≤1+∣c∣|x|\le1+|c|, ∣y∣≤1+∣d∣|y|\le1+|d| and cannot escape. The stage does something simple: iterate three million times, count how often each pixel is hit, and map the counts to brightness on a log scale.

02Measuring chaos: the Lyapunov exponent

Take two starting points extremely close together and iterate both. If their distance is multiplied on average by eλe^{\lambda} each step, λ\lambda is the (largest) Lyapunov exponent. The stage computes it by carrying a tangent vector along with the Jacobian matrix.

  • λ>0\lambda>0: tiny differences grow exponentially; that is chaos, and the points spread into a picture with fractal detail.
  • λ<0\lambda<0: differences shrink, and every point is drawn into the same cycle. At a=−0.95a=-0.95, b=1.6b=1.6, c=1c=1, d=0.7d=0.7 it is a 3-point cycle.
  • λ≈0\lambda\approx0: the point circles along a closed curve, neither chaotic nor settling.

All six pictures in the gallery have λ\lambda above 0.

03Why there is a shape at all

Chaos does not mean the points are sprinkled at random over the box. The map stretches and folds the plane again and again: stretching pulls neighbouring points apart (the chaos), folding brings them back into a bounded region. What survives endless stretching and folding is a set with zero area but infinite layers of detail, and the points cover it with a fixed density, which is the light and shade in the picture.

The Lorenz attractor (wonder No. 3 on this site) is the same kind of object in continuous time; here time moves in discrete hops, so millions of points take only a fraction of a second.

Questions

Does the same set of numbers always give the same picture?

Yes. A single orbit is extremely sensitive to its start, but the density of landing points (the attractor’s "invariant measure") does not depend on it, so the picture is stable from any start.

How does "random picture" choose?

It draws four numbers between −2.5 and 2.5, computes the Lyapunov exponent and keeps only sets above 0.1 whose points spread out enough, drawing again otherwise. It usually takes only a few tries.

Can I print one?

Use "save share image" or export a video from the bar below. Write down the four numbers and you can redraw the same picture anywhere with the same two lines.

The syllabus side

Related curves

Sources: Paul Bourke — Clifford attractors · Lyapunov exponent — Wikipedia · Attractor — Wikipedia