Newton Fractal Generator

Draw the Newton fractal of z³ - 1, with one color for each root.

This is a free online Newton fractal generator. Every pixel is painted with the color of the root that Newton's method finds when it starts from that point, and the brightness shows how many steps it needed. Zoom in with the mouse wheel and download the result as a PNG image.

The Newton fractal is different from the Mandelbrot and Julia sets: nothing escapes to infinity here. Almost every starting point converges to one of the three solutions of z³ = 1, and the picture shows which one. The surprise is the border between the three regions: it is not a curve, it is a fractal where all three colors touch at every single point.

Everything runs directly in your browser. No image is uploaded to a server, and nothing needs to be installed.

Fractal options

Position
Use the mouse wheel over the image to zoom where the pointer is.
Detail
More iterations show more detail near the border of the set, and take longer to draw.
Colors
How dark the points that take many iterations to converge become.
Image size
Image details:
image: 800 x 600 px
magnification: 1.00 x
size of a pixel: 5.33e-3
drawn in: 0 ms

Use the mouse wheel over the image to zoom in and out where the pointer is, and drag the image to move it. On a phone, use one finger to move the image and two fingers to zoom.

How to generate a Newton fractal image?

To create and save your own Newton fractal, follow these steps:

  1. Look at the whole plane first - The default view shows the three basins meeting around the origin, each one in its own color, with the three roots at the center of the big lobes.
  2. Zoom into the border - Use the mouse wheel over any place where two colors meet. Between any two colors you will always find the third one, in smaller and smaller bubbles that never end. The buttons above the image take you to the best places.
  3. Drag to explore - Hold the mouse button and drag the image, or slide one finger on a touch screen and pinch with two fingers to zoom.
  4. Adjust the iterations - The Newton method converges quickly, so 50 to 80 iterations is usually enough. Raising them shows more of the structure exactly on the border, where convergence is slowest.
  5. Adjust the shading - "Shading strength" controls how dark the slow points become. A high value draws thin dark lines that trace the border between the basins; a low value gives flat, poster-like colors.
  6. Choose the resolution - Select a common resolution or type any width and height, up to 4K.
  7. Download the image - Click "Download PNG image" to save exactly what you see.

Settings

Below are the parameters you can configure to draw the Newton fractal.

FieldDescription
Center (real part)The horizontal position of the center of the image on the complex plane. The three roots are at 1, and at -0.5 plus or minus 0.866i.
Center (imaginary part)The vertical position of the center of the image.
ZoomThe magnification of the view. The mouse wheel changes this value, magnifying the image where the pointer is.
Maximum iterationsHow many steps of Newton's method are applied before giving up on a pixel. Most points converge in fewer than 20 steps; only the points on the border of the basins need many.
Increase the iterations when zooming inRaises the iterations automatically as the magnification grows.
Shading strengthHow much the color of a pixel is darkened by the number of steps it needed. It is what turns the flat basins into a picture with visible structure.
Color of the points that do not convergeThe color of the few pixels that never reach a root within the chosen number of iterations, such as the points exactly on the border and the origin itself, where the method has no next step.
Resolution / Width / HeightThe size of the generated image in pixels.

There is no palette to choose here: the three colors are fixed, one for each root, because the color of a pixel means something in this fractal rather than being a decoration.

What is the Newton fractal?

Newton's method is the classic way to find a solution of an equation: start from a guess, and repeat

zn+1 = zn - f(zn) / f'(zn)

until the value stops changing. This tool applies it to f(z) = z³ - 1, whose three solutions are 1, and -0.5 ± 0.866i, the three cube roots of one. The iteration becomes

zn+1 = zn - (zn³ - 1) / (3 zn²)

Every pixel of the image is a starting guess. The method almost always converges, so the question is not whether it works but which of the three roots it finds — and that is what the three colors show. The set of starting points that lead to the same root is called the basin of attraction of that root.

Near a root, the answer is the obvious one. Far from the roots, it becomes unpredictable: the three basins interlock in an infinitely fine pattern, and every point on the boundary of one basin is also on the boundary of the other two. That property, called a Wada boundary, is what makes the picture so strange — you can never draw a line with only two colors on its sides. It was Arthur Cayley who first asked, in 1879, which root Newton's method converges to; he solved the case of degree two easily and admitted the cubic case "appears to present considerable difficulty". The answer had to wait a century, for computers able to draw it.

Newton fractal vs Mandelbrot set

Mandelbrot and Julia setsNewton fractal
What is calculatedWhether the sequence runs away to infinity.Which of the three roots the sequence converges to.
What the color meansHow many steps the point needed to escape.The root that was found, darkened by how many steps it needed.
The inside of the setA large region of points that never escape, usually painted black.There is no inside: almost every point of the plane belongs to one of the three basins.
The borderSeparates two regions: escaping and non escaping.Separates three regions at once, and all three touch at every point of it.

Frequently Asked Questions (FAQ)

Is this Newton fractal generator free to use?

Yes, this tool is 100% free and works directly in your browser, with no installation and no sign-up required.

Are the images uploaded to a server?

No. The fractal is calculated by your own browser and the image never leaves your computer.

Can I use the generated images in my own projects?

Yes. The images come from a mathematical formula and you can use them in websites, wallpapers, posters, videos, games and printed material.

Which equation does this tool solve?

z³ - 1 = 0, the classic case. Its three solutions are 1, -0.5 + 0.866i and -0.5 - 0.866i, and each one has its own color in the image: red, green and blue respectively.

Why do the three colors never separate cleanly?

Because the border of the three basins is a Wada boundary: every point of it touches all three basins at the same time. Wherever two colors seem to meet, zooming in always reveals bubbles of the third one in between.

What happens at the origin?

At z = 0 the derivative 3z² is zero, so Newton's method has no next step and the calculation stops there. That single pixel, and a few points that fall exactly on it, are painted with the "points that do not converge" color.

Why is the image not black and colorful like the Mandelbrot set?

Because nothing escapes to infinity in this fractal, so there is no "inside" to paint black. Almost every pixel converges to a root and gets that root's color; the picture is a map of three regions, not a set with an outside.

Why does the picture look flat?

Lower the "Shading strength" if the dark lines cover too much, or raise it if the basins look like flat blocks of color. The shading comes entirely from how many steps each pixel needed.

How deep can I zoom?

Up to a magnification of about 1013. Beyond that, the 64 bit numbers of the browser cannot separate two neighbor pixels and the image breaks into flat blocks.

Where can I see other fractals?

Try the Mandelbrot Set Generator, the Julia Set Generator and the Burning Ship Fractal Generator.

Related tools

Mandelbrot Set Generator

Mandelbrot Set Generator

Draw the Mandelbrot set, zoom into it with the mouse and download the image.
Julia Set Generator

Julia Set Generator

Draw Julia sets by choosing the constant c, zoom into them and download the image.
Burning Ship Fractal Generator

Burning Ship Fractal Generator

Draw the Burning Ship fractal, zoom into the ship and download the image.
Barnsley Fern Generator

Barnsley Fern Generator

Draw the Barnsley fern with the chaos game, using four affine transforms.
Sierpinski Triangle Generator

Sierpinski Triangle Generator

Draw the Sierpinski triangle, by dividing a triangle or by playing the chaos game.
Create images using math equations

Create images using math equations

Generate images from mathematical formulas.