To determine the color of a point, we start with its coordinates on the complex plane. For this explanation we will use the form A + Bi, where A is the real portion (x-axis) and B is the complex (y-axis.) Now before we start our test we should line up the tools that will help us through the process. First we must count how many times we iterate each point, easily done with a device such as a computer that is so very good at counting. Our second tool is a device that we will call each time we want to iterate our point. This function contains the counter described above and more importantly has the mathematical function we apply to the given input point. Specifically, the function starts with two complex numbers, one being the number 0+0i named Z, and the other being the point that we are testing, C. The function simply does the following, it gives Z a new value each time it is called. The value is Z squared plus C. Now Z has a new value, and after this change if Z squared plus C squared is less than four, we will perform the function on Z again (keeping in mind it is not 0+0i anymore.) If that was hard to follow, it can be thought of more geometricly as follows. The point 0+0i is the origin. After the first test, Z become the point we are testing, C. After repeated testing, Z has a few choices on what it will do. It can move farther than 2 units away from the origin, and after it does this it will continue running away from the origin, never to return. It can also stay within 2 units from the origin until the end of time, but since computers can't run till then and still show us a pretty picture, we will test a maximum of 100 times. If Z stays within 2 units during this many tests, we will say that it is in the Mandelbrot Set and will be colored black. But what of the frisky points that tend to run away, do they not deserve some coloration? Of course my friend, we will give them color according to how long they stayed inside the 2 unit boundary. So a point that stayed in the above ground pool of radius 2 for 15 iterations will be a different color than his friend who stayed in the pool for 87 iterations. Remember though that this is not an ideal pool, and after 100 iterations, it is time for adult swim, and only the Mandelbrot Set points are allowed to swim without a life guard. At 100, the computer life guard stops counting the time, and moves on to the next point.
Now that the test has been described, all that remains to be done is to perform the test on every point on the viewing window. Simple modifications of the test and also the method of assigning colors can create the spectacular images that adorn this page. Trigonometry and other mathematical goodies can be used within the math function to modify the shape of the fractal. These same tools can be used to make the colorations more spectacular by simply putting them into the assigning of red, green and blue values for each pixel. All this together creates a shape with self-repeating symnetry all along its surface. Also, a computer can create this with only a page or so of code and thankfully it can do so, as doing this all by hand is basically impossible. However the combination of math and counting needed, plays to the strengths of a computer system and the end result is one of the most complex shapes in the realm of mathematics.
Follow the White Rabbit.