Home
Reset

The Mandelbrot set

[Computation may take a few seconds.]

When you get a zoom you like, you can get a high quality version by clicking "High quality image" below. See 'iterations' section below for more details. [It will take up to 20 seconds on Chrome, but may crash other browsers.]

How to use this page

Click on the image for a zoom of that region. The image is divided into 100 regions in a 10 by 10 grid. When clicked, each region and the surrounding eight regions zoom in to fill the whole image (an enlargement, scale factor 31/3). After 27 consecutive zooms the image becomes grainy. This is because the x and y coordinates of where you're looking have too many decimal places and are being rounded. At the bottom of this page there is a diagram showing the coordinate axes and the Mandelbrot set.

The images (300 by 270 pixels) are created using SVG (scalable vector graphics) and javascript. Your browser gets the javascript and runs it, using your cpu time, rather than the web server's cpu time. Unfortunately the image can only be saved using printscreen.

The Mandelbrot set

The Mandelbrot set is a region of the two-dimensional plane which satisfies a simple rule: any point c in the plane is in the Mandelbrot set if zn+1 = zn2 + c converges as n tends to infinity (starting with z0 = 0).

However, in fact the plane is the complex plane, where the y-axis represents the imaginary part of the complex number, and the x-axis represents the real part of the complex number. For example, z = -1.75 + 0.2i would be plotted as (-1.75, 0.2). The rules for arithmetic with complex numbers are applied when checking to see if the sequence given above converges.

This link leads to a 1-D analogue and explanation of this process, which may help to clarify what is going on: 1-D analogue

An explanation of the colours

The black region is complex numbers c for which the sequence converges. You will notice that there are some outlying black areas. Zooming in reveals that there are many smaller black areas which cannot be seen in the initial diagram.

The other colours represent the "escape time": how many iterations of the sequence are required before zn becomes larger in magnitude than 2. The deep red surrounding the image initially shown on this page indicates that only one iteration was required. A slightly lighter red indicates two iterations. Up to around 25 iterations are shown here coloured in increasingly light gold. Other colours will become visible if you zoom in. The colours chosen are arbitrary, and you will be able to find many other examples of the Mandelbrot set coloured using schemes different from the one used here.

Iterations

Ideally, you want to iterate the sequence for any point until it "escapes", or until you can prove that it will never escape. However, points close to the black areas may require thousands of iterations to find their escape number (and hence their colour). This becomes a computing time problem. As each pixel of the images used on this page has to have its colour computed (and there are 81,000 pixels in these images), the iteration depth has to be limited. In this program it is limited to 400. This still means an average image may require several million evaluations of the equation zn+1 = zn2 + c. The higher quality image is 600 by 540 pixels, and the iteration depth is 2000, leading to close to a billion calculations for some images.

What is lost by only iterating up to 400 times is the detail, especially near the boundary with black regions. With the higher quality images (with 2000 iterations) you will notice some of the black regions are significantly different.

Some interesting zooms

Here are some pre-defined zooms, to give an idea of the variety and detail which can be found (they will open in a separate tab or browser):

The Mandelbrot set in the complex plane

This grid shows how the Mandelbrot set lies on the real and imaginary axes.

A faster Mandelbrot explorer

The following link leads to a page with a much faster clickable Mandelbrot image, which you can use to explore areas in more detail quickly. Once you know what areas you want to get in higher quality, you can come back to this page.

Fast Mandelbrot