# Mandelbrot Set

Popularised by Benoit Mandelbrot, the Mandelbrot Set is a fractal, one of the first, if not the first, ever discovered and understood as such.

• Choose a constant, c.
• Start with the complex number 0, $z_0=0$
• Repeatedly apply the function $z_{i+1}=f(z_i)=z_i^2+c.$
• Ask, do the values go off to infinity, or do they remain nearby.
• If they remain nearby, then the initial point c is in the Mandelbrot set.
• If the values go off to infinity, then c is not in the set.
Of course, it's hard to know for sure that the values will remain nearby, and they can exhibit some quite interesting behaviour. However, we can know for sure that if the absolute value gets large then the points will definitely go off to infinity. We can also plot the orbits of points, and have a "good guess(tm)" as to whether they appear to be "closed".

Points outside the set can be coloured according to just how quickly they go off to infinity, and points inside the set can be coloured according to the number of points in the orbit to which they converge.