Mandelbrot Set

Click and make a rectangle to zoom in, shift-click to zoom out.
Click Options for more settings.

This is a famous fractal in mathematics, named after Benoit B. Mandelbrot.

It is based on a complex number equation (zn+1 = zn2 + c) which is repeated until it:

Let's see how this works! We always start with z = 0, and c is the position of the point we are testing on the complex plane.

We repeat the formula: znew = z2 + c

Let's try c = 1:

  • Start: z = 0
  • Step 1: z = 02 + 1 = 1
  • Step 2: z = 12 + 1 = 2
  • Step 3: z = 22 + 1 = 5
  • Step 4: z = 52 + 1 = 26 ...

The numbers are growing fast! It diverges (escapes to infinity). So the point c = 1 isn't in the Mandelbrot Set, and gets colored.

Now let's try c = -1:

  • Start: z = 0
  • Step 1: z = 02 - 1 = -1
  • Step 2: z = (-1)2 - 1 = 0
  • Step 3: z = 02 - 1 = -1
  • Step 4: z = (-1)2 - 1 = 0 ...

It just bounces back and forth between 0 and -1, and never escapes. So the point c = -1 IS in the Mandelbrot Set, and is colored black.

Detailed colorful spiral swirl of the Mandelbrot set fractal zoomed in

Original developed by Christian Stigen Larsen 2012
See: https://github.com/cslarsen/mandelbrot-js
Modified by Rod Pierce 2018