Mandelbrot Set

The Mandelbrot Set is the collection of points that satisfies the following feedback process:

zn+1=z2+c

where z and c are complex numbers: z=a+ib, c=x+iy. Images can be generating by iterating this recurrence and associating the real component of c (x) with the horizontal dimension of an image, and associating the imaginary component of c (y) with the vertical dimension of an image.

One method to test if a particular point P is in the set is as follows:

Set z0 to 0, c to P, and iterate the recurrence for M, a specified maximum number of iterations. If the magnitude of z remains finite even after M iterations are performed, consider P to be in the set. If the magnitude of z "escapes to infinity" (practically, |z|>2) before M iterations are reached, consider P not to be in the set, and call the iteration where z escaped E.

Images can be colored many different ways, and different aspects of the image are shown by different coloring schemes. Four types of coloring are shown here:

Black & White If P is in the set, color it white. If P is not in the set, color it black. This coloration shows exactly what is in the set and what isn't.
Gray If P is in the set, color it white. If P is not in the set, color it on a scale from white to black relative to E: E=[1..M-1] → color=[white..black]. This coloration accentuates the set by outlining it in black, surrounded by gray.
Fire If P is in the set, color it white. If P is not in the set, color it on a scale from red to yellow relative to E: E=[1..M-1] → color[red..yellow]. This coloration makes it appear that the set is glowing white hot, with a cooler "temperature" as the distance from the set increases.
Rainbow If P is in the set, color it white. If P is not in the set, select a color from a rainbow palette based on E. This coloration uses a color of maximum intensity for every pixel, so all detail is made visible.

Black & White Gray Fire Rainbow
Re ∈ [-2.25,0.75]
Im ∈ [-1.5,1.5]
Re ∈ [-0.95,-0.88333]
Im ∈ [0.23333,0.3]
Re ∈ [-0.75104,-0.7408]
Im ∈ [0.10511,0.11536]
Re ∈ [-1.254024,-1.252861]
Im ∈ [0.046252,0.047415]

A set can also be colored by looking at z rather than E. z can be considered to be a vector drawn on a circle, and the coloration based on the angle made by that vector with the x axis. If the angle is between 0 and PI (0 and 180), color it white, and if the angle is between PI and 2PI (180 and 360), color it black. As only two colors are used, this coloration is known as "binary decomposition."