Florian Brucker

Fractals from Iterated Root-Finding Methods

last update on 2010-05-21

You can find a lot of fractals on the web that were generated using Newton's method. These fractals are called, not surprisingly, Newton fractals, and Simon Tatham has some nice material about them. In short, they are generated by first selecting a function from the complex numbers to the complex numbers, and by then using Newton's method to search for roots of the function. Each pixel in the final image is colored according to which root Newton's method converged to when started using the point "below that pixel". In addition, the faster Newton's method converged, the brighter the pixel will be. Such fractals typically look something like this:

Newton fractal for 2x^3 - 2x + 2

You can find more information about Newton fractals in Simon Tatham's great article. Now Newton's method is just one of several iterative root finding methods. Here is a whole collection:

It turns out these can be used to create beautiful fractals, too.

2x3 - 2x + 2

Polynomials are the "traditional" functions used for generating Newton fractals. Since a polynomial of degree 3 has exactly 3 roots in the complex numbers, each fractal consists of three parts, colored red, blue, and green. The black regions in the Steffensen fractal indicate regions where the method did not converge, or took too long to do so.

x3 - 3x

While using polynomials as base functions is nice, Newton fractals show their real beauty when more complex functions are used. All fractals shown here contain some black areas, where no convergence occurred after 100,000 steps. The Schröder fractal is especially interesting, since it contains regions in which the convergence behaviour seems to be chaotic: in these areas, the behaviour changes rapidly, resulting in a noisy coloring.

cos(x)

Finally here are some details for the complex cosine. Since the cosine has infinitely many roots, colouring the fractals according to which root the method converged to does not make sense. It also turns out that the fractals are rather boring when viewed on a big scale. Thus only renderings of the more interesting details are included here.

Source Code

The images shown above were generated using a simple C program. It's released under the GPL and here's the source code.