In mathematics, the Mandelbrot set is a fractal that is defined as the set of points c in the complex number plane for which the iteratively defined sequence
Table of contents |
2 Adding Color |
It can be shown that once the modulus of zn is larger than 2 (in cartesian form, when xn2 + yn2 > 22) the sequence will tend to infinity, and c is therefore outside the Mandelbrot set. This value, known as the bail-out value, allows the calculation to be terminated for points outside the Mandelbrot set. For points inside the Mandelbrot set, i.e. values of c for which zn doesn't tend to infinity, the calculation never comes to such an end, so it must be terminated after some number of iterations determined by the program. This results in the displayed image being only an approximation to the true set.
Whilst it is of no mathematical importance, most fractal rendering programs display points outside of the Mandelbrot set in different colours depending on the number of iterations before it bailed out, creating concentric shapes, each a better approximation to the Mandelbrot set than the last.
Mathematically speaking, the pictures of the Mandelbrot set and Julia sets are black and white. Either a point is in the set or it is not. Most computer-generated graphs are drawn in color. For the points that diverge to infinity, and are not in the set, the color reflects the number of iterations it takes to reach a certain distance from the origin. One possible scheme is that points that diverge quickly are drawn in black; then you have brighter colors for the middle; then you have white for the points in the set, and near-white for the points that diverge very slowly.Plotting the set
Adding Color