You may be wondering what a nerd like me would be so facination about the Mandelbrot Set (or maybe not). Its a religious experience to understand what it is. Simply...
f(z) = z2 + c
Color was added (obviously), but nothing more. I'll make it sound way more complicated than it actually is, but I'll try to explain how this works. In math there are two types of numbers. Real numbers are what we use every day (i.e. 2, 4, 3.14159, etc.). Then there are imaginary numbers which are in the form:
Where b is a real number and i is the square root of -1.
Why is it imaginary? Well, think about this. What's the square root of -25?
52 = 25 (not -25)
(-5)2 = 25 (again not -25)
The square root of -25 is the imaginary number 5i (that is 5 times the square root of -1). Don't be put off by the name. Imaginary numbers are used heavily in modern mathematics and physics. They do very well to explain real phenomena. So don't get existential on me about how they are "imaginary" and therefore don't matter. That's just a term (as in not real, heh, get it?).
Anyway, by combining a real and imaginary number in an additive relationship you create what's called a complex number.
a + bi
This complex number has two components. The real component (a) and the imaginary component (bi). These two components can be used to represent cartesian coordinates where x is the real and y is the imaginary component.
Therefore, you can orient these numbers onto a cartesian grid. When you do this you create what is called the imaginary plane. The mandelbrot set lies on this plane. For every coordinate (complex number) on this plane the initial function is applied. But not just once It is applied in an infinate series.
f(z) = z2 + c
((z2 + c)2 + c)2 + 2
In this function z an complex number coordinate on the plane and c is always the original z value. Everytime the function f(z) is performed the resultant complex number is fed back into the function (f(f(z))). This encompases one iteration.
If at any point the resultant's distance from the origin (known as its modulus) excedes 2, the original value of z is considered not to be part of the set. As long as its modulus remains less than 2, it is deemed to be part of the set. The more iterations that are run for each coordinate the higher the resolution (detail) of the set can be observed. Theoretically, the set itself consists of each coordinate on the imaginary plane that can be iterated through the function infinately without ever exceding a modulus of 2 from the origin.
The way mathematicians create a gradient of color is simple too. Every coordinate that escapes 2 after n iterations through the function gets the same color. Which is why there is a circle around the set; it is the circle formed by the 2 modulus limit.
This shows the circle I'm talking about.