Mandelbrot (and similar) sets

Back to Robert's Math Figures

(Some rambling discussion and one new picture at mandelbrot-d.html.)

Mandelbrot set (M(2): z --> z2 + c):

Mandelbar set:

M(3): z --> z3 + c:

M(4): z --> z4 + c:

Following is the code for the Mandelbrot set (in short, for a 175-by-175 grid of complex numbers c (written as x + i y here) values from -2.01 - 1.1i to 0.7 + 1.1i, we iterate z --> z2 + c until |z| > 2 or we've gone through 50 iterations):

```DensityPlot[
-Length[
FixedPointList[ #^2 + (x + I y) &, x + I y, 50,
SameTest->(Abs[#2] > 2.0 &) ]],
{x, -2.01, 0.7}, {y, -1.1, 1.1},
PlotPoints -> 175, Mesh -> False, Frame -> False,
AspectRatio -> Automatic ];
```
For the other pictures, change `#^2` to `#^3`, etc., or to `Conjugate[#]^3`, etc.

In Mathematica 3.0 we can make the function more than five times faster by compiling the iteration function. Here's the compiled version:

```cMandelbrot =
Compile[{{c, _Complex}},
-Length[
FixedPointList[#^2 + c &, c, 50,
SameTest -> (Abs[#2] > 2.0 &)]]];

ListDensityPlot[
Table[cMandelbrot[a + b I],
{b, -1.1, 1.1, 0.0114}, {a, -2.0, 0.5, 0.0142}],
Mesh -> False, AspectRatio -> Automatic, Frame -> False];
```

There's no shortage of Mandelbrot set information out there -- an Alta Vista search for "Mandelbrot set", for example, turns up over 2,000 entries.

A few good resources are the Spanky fractal database, Peter Alfeld's Mandelbrot page, and Eric Weisstein's Treasure Trove of Mathematics listing.

Designed and rendered using Mathematica version 2.2 and 3.0 for the Apple Macintosh.

M-notation and general inspiration lifted long ago from Alexander, Giblin, and Newton, "Symmetry Groups of Fractals", The Mathematical Intelligencer, vol. 14, no. 2, Spring 1992.