# An Introduction To The Mandelbrot Set That Doesn't Mention Complex Numbers

Note: This post assumes you've heard of the [Mandelbrot set](https://en.wikipedia.org/wiki/Mandelbrot_set) before, and you want to know more about it, but that you find [imaginary](https://en.wikipedia.org/wiki/Imaginary_number) and [complex](https://en.wikipedia.org/wiki/Complex_number) numbers (e.g. the square root of negative one) a bit mystifying and counterintuitive. Instead of helping you understand the relevant math like a reasonable person would, I'm just going to pretend the concept doesn't exist, and try to explain how to generate the Mandelbrot set anyway.

My goal is for this post to (theoretically) be acceptable to the historical [René Descartes](https://en.wikipedia.org/wiki/Ren%C3%A9_Descartes), who coined the term "Imaginary number" because [he did not believe such things could possibly exist](https://en.wikipedia.org/wiki/Complex_number#History).

* * *

I hereby formally invite you to a dance.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/animations/f7b3f1ef150270e1b4c8c53af576f88c84e50cf2210d470f.gif)

Pretty please with a cherry on top??

Since we're (presumably) both cool, hip people, let's go with a somewhat avant-garde dance that's popular with the kids these days.

I call this dance the Mandelbrot Waltz, but you can call it whatever you'd like. This dance follows very simple rules, with the quirk that your starting location will influence your part in the dance. You will unfortunately be cursed to dance forever (there's always a catch to these dance invitations!), but if you ever touch the edges of the dance floor, the curse will be lifted and your part in the dance ends, so it's really not all that bad...

In case you don't already know the moves, I'll describe how to do the dance yourself (if given an arbitrary starting point on the dance floor) step-by-step.

* * *

How To Perform The Mandelbrot Waltz: A Step-By-Step Guide
---------------------------------------------------------

**Preparation**:

*   **You will need**: Yourself, an empty room, and a drawing tool (like chalk or tape).
*   **Setup**: Draw a line from the center of the room to the nearest part of the wall, like so:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/2dc4493b5d0e88a4868fbe99054d75dd62eeff42e362be3a.png)

This line is to help orient the dancers, so we'll refer to it as the "orienting line" moving forward.

*   Now, draw a circle around the room's center, such that it intersects the "orienting line" halfway through. It should look something like this:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/a2c5b4cd9fe2ba8d37fe1aecb550ffd2d42f775948f75021.png)

A bird's-eye view of a dance hall, all decked out for a Mandelbrot Waltz. Fancy!  
Note that drawing on the floor is totally optional; if you can keep this all in your head, good for you.

**Starting Position**:

*   Choose a starting point anywhere you want in the room. Remember this position—or jot it down on a notepad if your memory is bad—for later.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/28da940d99218b6cfb2cb531d6c0b58fc25c067e12e5ef7b.png)

The red dot is you!

**Step 1 - Rotation Doubling**:

*   Imagine a line connecting your current position to the center of the circle:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/822e099129a1ebeed35a9339882a23f048d2c772264e7381.png)

Congrats on your new imaginary...line!

*   Find the orienting line we drew on the floor earlier, and measure, counterclockwise, the angle between it and your new imaginary line.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/7af6bdcb87e081f0ee70be897f43896f9556d44a2bfd9b86.png)

Yes, I may have used Microsoft Paint on the previous image for this one because I didn't want to bother coding...what of it?

*   Rotate yourself counterclockwise by that same angle, maintaining your distance from the center, like so:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/243845ccf1153d4b48ae1c9e5bfc97112e0798b581bf1509.png)

I would apologize for my terrible MS Paint skills, but I'm not sorry at all.

*   It's okay if you end up making more than a full 360° rotation, just keep on going around the circle until you've doubled the initial angle. For example (assuming the red point is your original position, and the black point is where you end up):

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/e3e546ad272be2bef6691f8d67a3770a843c032368e34d6f.png)

If you're confused by my bad drawing skills, we start measuring the first angle from the *black* line, not the grey line.

It should be intuitively clear that the further counterclockwise your starting point is from the orienting line, the further you'll travel. In fact, if your starting point is 360° from the orienting line--meaning you start off directly on top of it--doubling your angle will lead you 360° around the circle and right back to where you started. This means that if you get a few friends, and have them all do this step of the dance at the same time, their collective movement will look like this from a bird's-eye view:[^ofo1u21j84]

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/animations/be48b3e3421f6c60f32c7bb1c28b636995650c99942d6722.gif)

If your friends can move this fast, I'll be very impressed!

And if you have a *lot* of friends doing Step 1 at the same time, it will look something like this:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/animations/32051118a0d07b82cfd78d50602762c14843f0ef5b21b6b7.gif)

To me this animation almost looks like a magical spiral staircase extending itself another story high, if that makes sense...  
Also, how do you have so many friends!?!?

**Step 2 - Distance Adjustment**:

*   Imagine a number line, going from 0 onward:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/c13bc863abaea1ab9a058e84c2e309ca8bbbb69c0ee810f0.png)

You get the idea...I hope.

*   Take the number line, and imagine placing it on the floor, so that it goes from the center of the room towards (and past) you. The end of the line marked with number 0 should be at the center of the room, and the number 1 should land on the perimeter of the circle we drew. It should look something like this:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/007b49cb9ef3af87eb2a7ec40e362d82aa3d798bb40de721.png)

Hanging out on the number line, as is my hobby.

*   Note the number on the number line that corresponds to where you're standing. For instance, if you were standing on the red dot in the above example, your current number value would be something like 1.6 or so. (I totally didn't cheat and find that number by looking at my source code.)
*   Now, take that number, and square it (a.k.a. multiply that number by itself).

If you're not a math person, don't worry—that's what the calculator app on your phone is for! ;)  
Seriously though, all this boils down to is that if your number is exactly 1 it stays the same (1-->1), if it's smaller than 1 it gets even smaller (e.g. 0.5-->0.25), and if it's bigger than 1, it gets bigger (e.g. 1.6-->2.56)—and the change is more extreme the further away from 1 you start at.

*   Move to the point on the number line which is equal to that (squared) number:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/15a09e2fa3a910860746d6bafe6afa774f7ecf17e02f6b23.png)

If the original value was below 1.0, we would have moved inwards.

This means you'll be moving towards the center of the room if you started Step 2 inside the circle, and will be moving outward if you started outside it. To illustrate, if you get a few friends, and have them all do this step of the dance at the same time, their collective movement will look like this from a bird's-eye view:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/animations/14557484b3ff38d547e6905d39522677227cc8792c495dfb.gif)

I think some of your friends near the edge of the room might need medical attention...they hit that wall *fast.*

And here's what it looks like if you have a *lot* of friends doing Step 2 at the same time:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/animations/65658bcb47bc1d901b22dc16e1bc498649f3366f21c300b5.gif)

The movement here somewhat reminds me of a [dolly zoom](https://en.wikipedia.org/wiki/Dolly_zoom). I'm not sure what to make of that!

**Step 3 - Re-positioning**:

*   Remember where you originally started at the very beginning of the dance. (Keep in mind that your original starting position is not necessarily the same position as where you were on step 1 if you've been dancing for a while and repeating these steps multiple times over.)

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/animations/2886964946b57f1425c2221ce500fe789195f193dfd5c58a.gif)

I've arbitrarily chosen the green dot as our initial starting position. Sue me.

*   Visually overlay this memory on top of the current scene, but move it a bit so that the center of the circle is directly on top of your current position. You can visualize it like so if you want:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/df15f52bac02ddd60c932a5fa763965e6af8680da41fe605.png)

This time I used [photopea.com](https://www.photopea.com/), since good ol' MS Paint wasn't gonna cut it.

*   Move to where this mental image now puts your "original position" relative to yourself.

This step of the Mandelbrot Waltz is arguably the "secret sauce" to its deceptively complex beauty, but it can't really be animated by itself as a single step, since it depends on the dancer(s) having already moved from their initial positions. Otherwise, if you began step 3 in the exact same place as their starting position, you'd just double your distance from the center, like these dancers do:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/animations/ea5b3690b1753d98c0b4c721b07089bb250b5f196ac39418.gif)

This is what Step 3 would look like if it was the only move in the dance. In this case it just looks like "zooming in," but this step will get *way* more interesting if the ~~points~~ dancers start off somewhere different than their original positions.

So putting it all together, what does dancing these three steps in order look like? Let's randomly place some friends on the dance floor, and start dancing for one round of three steps!

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/animations/a41550e9d2df9d1c14350a76ef0ec1c95c56b7c3562f7fef.gif)

a-one and a-two and a-three...

With a few hundred more friends, the first round (of steps 1, 2, and 3) will look something like this:[^2hriejzw3rq]

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/animations/fc5c20642db644fa965ccf0ec1e252ad5bfa11e3fc971ddf.gif)

Steps 1 --> 2 --> 3. The white spaces you see during the animation of Step 1 here is because I didn't bother to add any points past the edges of the walls (which I did before to make things less visually distracting for first-time viewers). Ultimately it doesn't make any difference in the end result of the dance, since anyone who find themselves in that white space will eventually be pushed out of bounds.

This might look relatively basic now, but one great thing about the Mandelbrot Waltz is that every time you dance another round, the formation the dancers end up in will get more and more interesting.

**Repeating the Steps**:

*   Once you've finished a round (of steps 1, 2, and 3), if you've found yourself hitting a wall at any point, your part in the dance is now over. You can now relax, and go enjoy a cocktail or something ~~with the other losers~~. :)
*   If you haven't hit the wall so far, go back to the start of Step 1 and begin a new round. Rinse and repeat for eternity, unless or until you hit a wall.
*    That's all there is to it! :)

* * *

Now you too can waltz the Mandelbrot with ease! Sit back, relax, and, enjoy this GIF of a whole bunch of randomly arranged dancers doing a full Mandelbrot for 25 rounds in a row:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/animations/82a6b8db2e6ca724e7dc4b4d4586403a58219797ebcca2f2.gif)

20,000 points in random starting positions doing steps { 1 --> 2 --> 3}, 25 times in a row. The movement has been sped up for obvious reasons.

Well, well, well... now this is interesting! It looks like while most of the dancers bonked into the walls and were knocked out of play, a smaller subset of the dancers have moved into a regular-looking pattern and are making and unmaking some sort of complex shape. It seems reasonable to assume that the remaining dancers know how to waltz the Mandelbrot very well indeed, and most (with the exception of some at the edges perhaps) will probably stay stable in this dance forever.

What can we say about this set of infinite dancers, this... Mandelbrot set? Well, looking carefully at the GIF above, the Mandelbrot Waltz seems to be favoring dancers which start off inside of some well-defined area. Dancers inside this area never hit the walls, but dancers outside of it probably walk away with bloody noses from how fast they hit that edge.

In order to find the shape of this area, let's do an experiment. Since we've already done the waltz at least once, we can interview our previous dancers and find out how many rounds each dancer lasted. If they only lasted one round, we'll outfit them with a white shirt. If they lasted two rounds, we'll reward them with a slightly darker shirt, and so on, with those who lasted to the very end of the dance getting pitch-black shirts as the ultimate honor. We'll then tell them to start off in the same position they began last time, and set the music going! This way, a bird's-eye view of the dance will let us pay attention to the "Mandelbrot set" of dancers which survives to the very end:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/animations/a59bd35c3f609a626cd789aaa9b30e8f2c60f77065742e0c.gif)

The longer the dancer survives, the more visible they are from the beginning.  
I only show the first three rounds here, since hopefully you get the basic idea, and I want this GIF to be playable online without crashing your computer.

If we had a *lot* more dancers, such that literally every point/pixel in the plane/dance-floor started with a dancer in it, then that initial starting shape would be ["the" Mandelbrot set](https://en.wikipedia.org/wiki/Mandelbrot_set):

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/b3cb7f07413d317db688b53f795ebda5e60c738fb0829609.png)

No, I did *not* draw this in MS Paint. I would be incredibly impressed if anyone did that though!

Notice that this shape is a fractal, and has an incredibly detailed and complex perimeter. In fact, the outer edge of the Mandelbrot set is so complex that (assuming an infinite number of infinitely small dancers) you can zoom in on it forever and ever, easily finding new patterns never seen before by human eye.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/cd332ee46785181a0514d2c6fc5d1ce4443f4ebfc3c1e08c.png)

This particular area of the Mandelbrot Set is sometimes referred to as the "Double-Spiral Valley," for obvious reasons, and can be found in between "Sceptre Valley" and "Seahorse Valley." Of the three, "Sceptre Valley" sounds the coolest by far, but if you want to see it for yourself, you'll have to do some mathematical spelunking!

The Mandelbrot set forms one connected shape (rather than there being some parts which are disconnected from the rest), though sometimes the connections between larger areas (or "continents") can be incredibly thin and delicate. If you want to zoom in and explore the details of the fractal yourself, I highly recommend [Xaos](https://xaos-project.github.io/), a desktop software tool which allows for real-time exploration of this delightful mathematical world. If you'd rather explore the set musically (perhaps to set your waltz to), I recommend playing with the incredible [Fractal Music Generator](https://betazeta.itch.io/fractal-music-generator).

One cool aspect of thinking about the Mandelbrot set in the way I've set out above is that A) we can animate it in some really fun ways, and B) we can construct new fractals by changing the rules of the dance! If there's interest I'll do a separate post exploring some fun results I've gotten, but for now, I'll just give a few examples of B).

To start, here's what we get if we square the angle during step 1 instead of just doubling it:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/de1c8db35a46e704c49eb7dd3455a695ce8c3700efb59b87.png)

I find this fractal shape both beautiful and eerie, like an inkblot come alive. I haven't seen anything that looks exactly like this before, so if a name hasn't already been given to it, I'll call it the "Shadowblot" fractal.

And here's what we get if for Step 2, instead of squaring the distance from the center (i.e. *r*²), we raise it to the negative power of itself (i.e. *r*^-^*^r^*):

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/1a5d101ede2d01fa4be79dd49c63a6e56bfa93eb8423a9d7.png)

Some of my friends claim to see an "[amogus](https://knowyourmeme.com/memes/amogus)" in this fractal, but frankly, I have no idea what they're talking about.

Finally, if during Step 2 we simply set the distance from the center to always be equal to 0.3, then (turning the resulting fractal on its side) we get this lovely little heart:

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/b6e51019c8aa7e017a3a9d9c7c921ba40be8b97aab87103d.png)

Awww... I love you too, fractals :3

The possibilities are endless, and I encourage you to experiment with the Mandelbrot Waltz yourself. I'll link the source code I used to create the above visualizations here when I next get the chance to upload them, but it's also worthwhile to try your hand at your own interpretations. Feel free to share anything you create :)

* * *

I hope you've enjoyed this brief exploration of one of my favorite topics in visual mathematics! I see the Mandelbrot Set as emblematic of the many fascinating intersections between Math and Art, and hope this post can help make the beauty of these connections accessible to more people.

Happy dancing!

*Note: if anyone is interested in performing the Mandelbrot Waltz as I described it in real life (especially with a large group of simultaneous dancers), please let me know—I'd be fascinated to see how it would play out in messy real-world conditions.*

[^ofo1u21j84]: Note that this visualization assumes that the dancers are all rotating around the central point as they move to their destination. If they just made a direct beeline for their end-goal, this is what step 1 would look like instead:[4]Step 1 depicted as a linear (rather than  rotation-based) movementEither way is fine; how exactly you want to implement any of these steps is really up to you, as long as you end up in the same place! 

[^2hriejzw3rq]: Meanwhile, this is what it would like like if the dancers just did step 1, skipped step 2, and went straight to step 3:[3]Dancers doing only steps 1 and 3 

[^r7l3zi8hq6p]: Here's what it would look like if I were stricter with the animation and only started with points which reached the edge of the box and no further: And here's what it looks like if I only render points which stay within a circle of radius 2 (which may be of interest to those already familiar with traditional methods for rendering the Mandelbrot set):Steps 1 and 3 

[^xuc7aw64fa]: The "edge" that you see crossing the screen (as well as the fact that you didn't see an edge in the "rotation-based" animation of step 1) is partly an artifact of the way I rendered the points, which go a bit past the edge of the box, but not infinitely far away. Here's what it looks like if the points only reach the edge of the box, but no further:Step 1 depicted as a linear movement, where no dancers start outside the viewing fieldAnd here's the same for the initial "rotation-based" variant of step 1:Step 1 depicted as a rotation-based movement, where no dancers start outside the viewing fieldSomehow this makes the animation looks more complicated (despite it technically involving fewer moving parts), which is why I'm leaving all this in the footnote to a footnote.