OK, the method is as follows:
For the basic newton fractal (the upper image in my first post), you first choose any function you like. I happened to use
for the images I generated. You have to then determine the derivative of the function, which I’ll write as f’(x). Now you take each pixel in the image and use its two coordinates, x and y, to create a complex number z. You then iterate z using the formula
. The iteration is repeated until z seems to have converged or you’ve gone over the maximum number of iterations. At this point, you take the number of iterations and use it to determine a color (via a palette for instance), which you assign to the pixel.
This is the method I used to generate the upper image. Newton fractals are implemented in most fractal generators, but usually only for certain equations. With Kaleidoscope, the program I wrote, you can use any equation you want (usually what you’ll want to generate neat images is a complicated function with trigonometric and polynomial parts). The program takes care of the icky complex differentiation part, you just need to enter the equation.
This was all just for the regular Newton fractal, though, i.e. the upper image in my previous post. In order to generate the more complex lower image, an additional step is involved. After iterating the value z, you have to determine the value
, which is the difference of z after the iteration and z before the iteration. You then use this as the starting value for a new iteration. After the second iteration is finished, you can determine
again, and iterate it again, as many times as you like. You then have to take the total number of iterative steps from every iteration in order to determine a color for the pixel.
The result is that multiple secondary copies of the fractal are generated, in addition to the original. These are centered in the attractors (
http://en.wikipedia.org/wiki/Attractor) of the original fractal, which you can see really well in the images from the previous post (the 9 blue dots in the upper image are attractors).
I implemented this fractal as the “Hyper Newton” fractal type in Kaleidoscope.
I’ve figured out why the algorithm has exactly the effect it has, and put an explanation in the documentation for the Kaleidoscope program. I also included an implementation in pseudocode (and the program is open – source anyway, so you can find the implementation in Java if you really want to).
Wow, this has been a long post. See the Kaleidoscope doc for details, or feel free to use the program if you want to see more examples of the fractal.
CS