divillysausages.com

The rules of attraction

One of the most interesting things I've come across over the last few days are Chaotic Attractors. With a simple bit of code and some Photoshop magic, you can end up with quite an awesome picture like this:

visualizing a chaotic attractor

Click on the image to open it fullsize in a new window

Attractors are a broad set of mathematical systems which approach limits. A chaotic attractor is an attractor whose limit is both cyclic and random, and often shows fractal topology. What this means is that by changing a few numbers you can produce stunning images really easily. This picture was generated using Clifford attractors (follow the link to view more images), before being taken into Photoshop and some colour added. How detailed you want the images depends on how many iterations you want to do. This picture was done with about 10,000 iterations.

One of the things I love about the picture is that by changing the colour in the background you can completely change the mood of the image. Reds and oranges make it more agitated, blues and greens more serene.

There are many ways to visualise chaotic attractors, though I've kept it simple here. You can get the C++ solution file (8Kb) here if you wish to try your hand at it. It's based on Paul Richards' code, though simplified and adapted to work with GXBase. Press 'q' to quit the program, and 's' to save the image to a .jpg file. You can use the images provided as desktop backgrounds if you wish.

visualizing a chaotic attractor

Click on the image to open it fullsize in a new window

Comments

Submit a comment

* indicates required