Thursday, May 24, 2007

What Makes Me Manic!

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...

This equation:

f(z) = z2 + c

creates this:







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:

bi

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.

(a, b)

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.

12 comments:

ChemE said...

If the sets are limited to a radius of 2, centered at the origin, why are the pictures square?

Jordan Munroe said...

I added an image that demonstrated the circle I'm talking about. The pictures are square because pictures. The second and third image are zooms of the set.

You can get a DVD from this site that will actually show animated zooms. They are really cool. It also has a good tutorial that explains it a lot better than I do.

Jordan Munroe said...

The pictures are square because they are pictures.

ChemE said...

I didn't realize pictures were required to be square.

On a serious note, I appreciate the image showing the circle. I actually follow what your saying now that I have that image.

Joshua G. Sanders said...

ok my head just exploded. I know this is unrelated but I heard you mention on ping once something about taking meds for depression. I was wondering if you would mind chatting with me about that. I had a couple of questions. If you're up for it my email is: sonofsanders@gmail.com Thanks.

Joshua G. Sanders said...

So, and this is probably a stupid question but, do you work in chemistry or some field that requires math or is this just something you do for fun? I wish my brain was capable of digesting this stuff. It seems fascinating but when I read it I feel like an armless man trying to solve a rubix cube.

Jordan Munroe said...

Man, pealing those stickers off with your teeth would be a pain in a butt! I'm a software programmer. Math is part of my religion, yo! It is the programming language of God!

Joshua G. Sanders said...

ahhh. If discerning mathematical equations was a requisite for entering heaven I'd be really hot for eternity.

Jordan Munroe said...

Never suggested it was a prerequisit. I also never said I could spell.

Joshua G. Sanders said...

leave the spelling to us English Majors. we have to have something we're good at right? spelling and etymology is where we nerd out. I'll rant about that on my blog sometime. Although, when blogging I get really lax about it so....

Anonymous said...

The beauty of this conversation is that, for a guy like me, GOd is the prefect poet/lyricist/artist... painting the beauty around us with the brushstrokes of his words.

Yet, within every artistic word is the mathematical exactness to make it all work together.

God is awesome.

Jordan Munroe said...

Yeah, yeah, yeah.

Now lets got back to talking about how smart I am.

jk :p