Mandelbrot Set

This little exploit started about a week ago, when I first became fascinated by its intriguing nature and found something rather personal in this beautiful mathematical concept. Hereby I pay my tribute to Benoît Mandelbrot, the mathematician who first visualized it while working at IBM.

How Does It Work?

Picture a 2D plane, where the x and y axes are the real and complex line, respectively. Thus, all points on this plane can be written in the complex form:

z = a + bi

and hence represent complex numbers. Then, consider the following operation on this set of complex numbers, once:

f(z) = z² + c

where c is an arbitrary constant (real or complex), z the complex numbers we just discussed. Now, you have just squared the value of every point on the plane and added a constant, and to visualize it, imagine the point just became darker. The bigger the values get, the darker it becomes. This may not be a big problem once you do one iteration on the plane, but what happens if you do it twice, three times, millions of times? The numbers will increase exponentially to infinity.

Right?

Well, not quite.

What if you have 1? 1² is one, 1⁴ is one, and so on. If the constant we chose is 0, then applying the function on 1 will always return the input itself. In fact, so will all numbers within the circle of radius 1 on the plane. These numbers do not diverge — we call them “stable”. The ones that eventually diverge, a.k.a. increase ad infinitum, we call them “unstable”.

Choose the constant to be 0, perform infinitely many iterations, color each point on the plane every turn, then you will get:

Yep, a picture of the Mandelbrot Set.

Now, the fascinating thing is, you can generate the picture with the help of a computer and some simple code. I decided to give it a try, following the instructions of Jean François Puget from IBM. He also takes into account the optimization of computing speed, since doing so many iterations on so many numbers can take a while, even for computers.

Lisa Zhu
·
4 min
·
6 cards

Read “Mandelbrot Set” on a larger screen, or in the Medium app!

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store