returns the number of iterations of the function , beginning with , that are needed to determine whether c is in the Mandelbrot set.

Details and Options

  • The Mandelbrot set is the set of all complex numbers c for which the sequence does not diverge to infinity when starting with .
  • With the option MaxIterations->n, the sequence will be iterated at most n times to determine if the sequence diverges.
  • The default setting is MaxIterations->1000.
  • If the maximum number of iterations is reached, z is assumed to be in the Mandelbrot set.
  • For some points that the algorithm knows in advance to be inside the Mandelbrot set, MandelbrotSetIterationCount will return one greater than the value of MaxIterations.


open allclose all

Basic Examples  (4)

Find the number of iterations needed to determine that is not in the Mandelbrot set:

Zero is known to be inside the Mandelbrot set and therefore returns :

It takes a few additional iterations to determine that 0.250001 is not in the Mandelbrot set:

MandelbrotSetIterationCount works on all kinds of numbers:

Options  (2)

MaxIterations  (1)

Sometimes MaxIterations needs to be increased to get the true number of iterations:

WorkingPrecision  (1)

Sometimes increasing WorkingPrecision gives a more accurate result:

Properties & Relations  (1)

Possible Issues  (1)

With MaxIterations->Infinity, the calculation may not converge in a finite number of steps:

Since is known to be in the Mandelbrot set, it returns DirectedInfinity:

Neat Examples  (3)

Make a Histogram of iteration counts along the imaginary axis:

Display the iteration count as height:

Half of a rotated Mandelbrot set:

Introduced in 2014