Wednesday, November 23, 2011

The Inverse of Fun

The other night, my wife and I were talking and laughing about things that were fun and not fun.  I uttered the phrase, "the inverse of fun," and my wife said, "The inverse of fun would be one-over-fun."  We laughed even more as I pictured the expression for the inverse of fun in my head:  1/fun.

I was laughing because my wife was correct.  As a math teacher, though, I decided to be more precise.  So I told her that the multiplicative inverse of fun is indeed 1/fun.  But what if fun were a function?  Then the term "inverse" would mean something else entirely.

That was a concept I had been working through that very week.  You may recall from my previous blog posts (apologies for not posting for so many months; I haven't been able to find time for exploring fractals) that I adapted a small Java program to generate and explore various fractal equations.  There was one fractal, the so-called "Mandeldrop," that I desperately wanted to explore.  I first ran into it here, where the author of the page states it is an "inverted" Mandelbrot set.  I really liked the picture, but without any more details about the Mandeldrop's generation, I had to puzzle out the precise meaning of "inverted."

I found a forum that said that the Mandeldrop maps the complex number z to 1/z.  That is exactly the definition of inverse that my wife provided.  However, when I tried to code it that way, the results were garbage.  I realized I needed to understand more about complex numbers.

To date in this project, I have learned a lot (and shared a lot) about complex numbers.  But they are so, well, complex that I hadn't yet considered what the inverse of a complex number would look like.  However, right in the middle of wikipedia's page on complex numbers, previously studied, is the equation that describes the inverse of a complex number.  It took me a while to translate the equation into usable code, but by the time I did, the results were still less than satisfactory.

So I considered the idea that the Mandelbrot set is actually a function.  So what is the inverse of this function?  I puzzled it out and translated it into code.  But the results were so far off I decided that I was now barking up the wrong tree.  I had to go back to the inverse of a complex number and figure out how to apply it to the Mandelbrot equation.

You may recall that the Mandelbrot set is generated by iterating the equation z = z^2 + c, where z = c at the start.  We take a point on the complex plane, square it and add the original point.  We take that answer, square it and add the original point.  Then we take the new answer, square it and add the original point.  We do this many times (which is why it can only done by computers) for every point on the screen.  If the point trends toward infinity, we give it a color; if it sticks around near the starting point, we leave it black.

When I finally realized I needed to invert both z and c, I got the Mandeldrop set.
This image has been rotated 90 degrees so the "drop" part of its shape is more evident.  Look at this basic Mandelbrot set that has been rotated, for comparison:
Can you see the part of the Mandelbrot set that is pointing straight up?  It looks like the Space Needle.  You can see this in the Mandeldrop.  Look at the bottom of the drop, the large circle there.  It's similar in shape and structure to the circle at the top of the Mandelbrot set, but if you look closely, you can see the "Space Needle" as well.  Let me provide you with a close up:

This close up proves that what the Mandeldrop set does, as the inverse of Mandelbrot, is turn the Mandelbrot set inside out.  Need more proof?  Let's zoom in on the top of the Space Needle.
It's a tiny Mandelbrot set, hidden in the Mandeldrop.  Naturally, there are uncountable numbers of tiny Mandelbrots in the Mandeldrop.

The thing I like about Mandeldrop is visually it reminds me of standing on the floor of a canyon as the sun is at the horizon; you look up and the sky is bright, but the walls of the canyon are black.  

Eureka 
A couple days after successfully generating the Mandeldrop, I had a moment of inspiration (if I can be so bold as to call it that).  From my previous blogs, you'll recall how the Mandelbrot set morphs when you modify the basic equation from z^2+c to z^3+c to z^4+c.  Well, I wondered, what would happen if you did the same to the Mandeldrop?  The result wasn't what I expected, so take a moment and think about how it'll change. 

OK, ready?  Here is the Cubic Mandeldrop:

It has two points.  Note the large circles at 12 and 6 o'clock have two "antennae", just as the Cubic Mandelbrot does.

Here is the Quartic Mandeldrop:
Once again, there are similarities between the Quartic Mandelbrot and this.  You can scroll down and look at previous posts to see what they are.

Before I go, I want to share one of the better mistakes...

While trying to find the inverse of the Mandelbrot set, I tried various configurations.  Most of them were garbage, but there was one fractal that was slightly interesting.  Below I show a close up of the one near-miss I had.  The tips at 12 and 6 o'clock seem to touch the rest of the fractal.  I zoomed in on the conjunction point to see if they actually touched or not, but I zoomed and zoomed and zoomed and never came up with a definitive answer.  Interesting, isn't it?

1 comment:

  1. Very cool...who knew my snappy multiplicative inverse statement would be so useful? :)

    ReplyDelete