Ok, so, in the last few days I've learnt a few amazing things, and mostly these things are because of one person in particular, a certain fractalmath on youtube, who posted some videos a few years ago to explain how fractals are generated. He started by first explaining a bit about complex numbers, since they are an essential part of the fractal generating process. Thus, that is where I will begin too.
Please bare with me... It's all worth it in the end. After reading the next few posts, you will understand where the Mandelbrot Set comes from, but the process starts here.
Ok, so let's begin. You all remember the number line right? With all negative numbers to the left, positive to the right, and zero right between them? Something like this:
But remember the other line, the vertical one? On which all these same numbers are plotted, with the positives running eternally up, and the negatives eternally down? Well, these guys are given a different name. Imaginary numbers. They are just as real, actually, as Real numbers, but they needed to be called something else to differentiate them. So they're written like this : 2i ... or ... -0.5i ... Any number, with a little i next to it.
Adding and Multiplying Complex Numbers
How is it done? Let me show you, using my first two complex numbers above:
(1 + 2i) + (-3 + 1.5i) = (-2 + 3.5i)
When adding, you simply add together each of the real numbers, and then each of the imaginary numbers. Easy.
(1 + 2i) x (-3 + 1.5i) = ?
Multiplying is a bit trickier. You start off as you would normally, but then multiplying two imaginary numbers... How? :
So... 2i x 1.5i = -3
(1 + 2i) x (-3 + 1.5i) = -3 + 1.5i + 6i -3
(1 + 2i) x (-3 + 1.5i) = (-6 +7.5i)
Multiplying complex numbers on the complex plane
Now, for the purpose of understanding how this is all leading to fractal generation, you need to know how to determine the point of the answer of multiplying two other points on the complex plane. Look at this diagram:
Hehe... I can hear you guys saying ... C'mooonnn, get to the good stuff already. Don't worry, it's coming. It's gonna start getting really interesting from here on out. Those points on the complex plane, when fed into the function f(z)=z² + c, are what determines the shapes the amazing fractals you know. But how? That's what I'll get into next.
To end this post, here's a video of the original fractalmath, from whom I learnt all the above. Watch it and see if he explains things a bit better than I did :)