The Mandelbrot set is a very well-known fractal discovered by Benoit Mandelbrot in the late 1970s. Despite its complex appearance, it is generated from an extremely simple iterative procedure. Consider any number in the complex plane. Write . Now for any positive integer n, define . Then c belongs to the Mandelbrot set provided that there is a real number r such that is inside the disk of radius r in the complex plane for every n. (It turns out that the Mandelbrot set lives entirely inside the closed disk of radius 2, so that in practice it suffices to check whether for every n.)
As a quick example to demonstrate, consider . This has distance 1 from the origin. Now , which has distance from the origin. Next, , which is back to distance 1 from the origin. But since , the pattern will repeat forever, and we will clearly never escape the disk of radius 2. Thus, belongs to the Mandelbrot set. (An example of a number which would not belong to the Mandelbrot set would be c = 1, which the reader can verify.)
When generating computer images of the Mandelbrot set, it is common to try the iterative procedure a set number of times, and then assume that if we haven’t escaped the disk of radius 2 yet, we never will. Of course this is a bit imprecise, but it is the best we can do with finite memory. Various colorings of the points outside the set also take into account how many iterations it takes before escaping the disk.
There are many fancy images of the Mandelbrot set on the web, but it’s always more fun to brew your own. Here are a couple I generated for my pattern formation class:
Another interesting set from the field of complex dynamics is the Julia set. Its formal definition is more complicated, but a special case of Julia sets arise from a procedure very similar to the one that generates the Mandelbrot set. If instead of adding back at each iteration, we add back some other pre-chosen complex parameter, , then we generate a family of Julia sets for different choices of . Here’s one with :
I also designed an interactive animation in which the user can cycle through a family of Julia sets. Here’s a video of it in action:
And another version of the same concept, zoomed in and colored:
As before, check out my course’s website for other interesting content generated by my fellow classmates.