Sand Attractor

Sand particles are dropped onto the canvas, with each subsequent position governed by this fascinating and elegant strange attractor:

xn+1 = a1 + a2xn + a3xn2 + a4xnyn + a5yn + a6yn2
yn+1 = a7 + a8xn + a9xn2 + a10xnyn + a11yn + a12yn2

Coefficients a1 - a12 are chosen from a dozen sets known to produce stable patterns*. Even a small change in just one of the coefficients can profoundly influence the results.

Colour palettes are created by sampling one of several photographs taken by the programmer**. Colours are chosen from the palette according to the distance the particle has had to jump to reach its current position from its last.

At each refresh, the coefficients are adjusted slightly and a new palette chosen, leading to slightly different results*** on every new iteration.
* see also here. And here. Oh, and here.
** the sampling method is adapted from some code by Jared Tarbell, whose fascinating artworks can be viewed here.
*** which may or may not be stable!

All site contents © 2010-2012 Jo Wilson