Mandelbrot Set

The Mandelbrot set is the set of complex numbers c such that the function (Subscript[f, c])(z)=(z^2)+c remains bounded in absolute value when iterated from z=0.

f[c_][z_]:=z^2+c

Here is our numSteps module from last time:

numSteps[f_,start_,bound_,maxSteps_:100]:=Module[{steps,z=start},
steps=0;
While[ Abs[z]≤ bound && steps<maxSteps,
z = f[z];
steps++
];
steps
]

Now we can plot the Mandelbrot set:

DensityPlot[                  , ColorFunction->"GreenPinkTones",AspectRatio->Automatic,PlotLegends->Automatic]