3 ms·
I've done similar images in the past and the approach I used was: 1) Choose a target image resolution, and set up a square array of that size, initialized to z
by taneq 11y ago
I've done similar images in the past and the approach I used was:
1) Choose a target image resolution, and set up a square array of that size, initialized to zeroes.
2) Decide on the bounds you want to use, and linearly map coordinates into the target image. Say you want to graph x in the range [Xmin, Xmax) and your resolution is Xres, then pixel_x = (int)((x - Xmin) * Xres / (Xmax - Xmin))
(Note that if you have a higher-dimensional attractor you'll need some form of projection down to two dimensions.)
3) Iterate your attractor equation (starting point doesn't matter because it's an attractor). Each iteration, increment the pixel that matches your current coordinates. Stop iterating when you land on a pixel with a value above some preset.
4) Apply a palette to your pixel values to turn it into a nice picture like the ones linked here.