flâneur — a map of the web's best reading

Clifford Attractors

paulbourke.net · 365 words · saved by 1 readers

Question: How are the colour effects here achieved? Answer: The main thing happening here is that I don't draw the attractor to the final image. Rather I create a large grid of 32 bit (int or float) and instead of drawing into that in colour I evaluate points on the attractor and just increment each cell of the grid if the attractor passes through it. So it's essentially a 2D histogram for occupancy. One wants to evaluate the attractor much more/longer than normal in order to create a reasonable dynamic range and ultimately smooth colour gradients. I then save this 2D grid, the process of applying smooth colour gradients comes as a secondary process ... better than trying to encode the right colour during the generation process. One can even just save the grid as a 16 or 32 bit raw, open in PhotoShop and apply custom gradient maps there. Of course this is "just" a density mapping of the histogram and doesn't immediately allow for colouring based upon other attributes of the attractor p

Clifford Attractors Clifford Attractors Attributed to Cliff Pickover Graphics by Paul Bourke February 2004 See also Peter de Jong attractors Contribution by Paul Richards including source code. Definition x n+1 = sin(a y n ) + c cos(a x n ) y n+1 = sin(b x n ) + d cos(b y n ) where a, b, c, d are variables that define each attractor. a = -1.4, b = 1.6, c = 1.0, d = 0.7 a = 1.1, b = -1.0, c = 1.0, d = 1.5 --> a = 1.6, b = -0.6, c = -1.2, d = 1.6 a = 1.7, b = 1.7, c = 0.6, d = 1.2 a = 1.5, b = -1.8, c = 1.6, d = 0.9 a = -1.7, b = 1.3, c = -0.1, d = -1.2 a = -1.7, b = 1.8, c = -1.9, d = -0.4 a =

Explore this link on the map →

related reading