To compute the points which are in the Mandelbrot set, we take a candidate c=x+yi and a complex number, z = 0+0i, for the initial value of our process. Then we compute a new point z'=z^2+c. Then we apply the same process to z', that is- we compute z"=(z')^2+c. We continue this iteration process until either the point is more than 2 units away from the origin, 0+0i, or we have done this process 50 times. (We can test for distance from the origin by taking the sum of the squares of the real and imaginary parts and comparing this sum with 4.)

The points for which we have iterated 50 times without going outside the circle of radius 2 form the basin of the Mandelbrot set.

The second option of drawing the contours alternates the colors of those points which escape outside of the circle of radius 2. That is, 50 iterations will determine the basin and such points will be colored blue. If the point 'escapes' in 49 iterations it will not be colored, if it escapes in 48 it will be colored blue, and so on. We can see how the complexity of the graph continues at this level.

In the following applet you can click the mouse in the basin and see the next 5 points in the iteration. If you click inside the basin most of the points will remain inside the basin, and certainly the 50th point will be inside. You will see some interesting patterns if you choose a point in one of the 'bulges' of the basin.