Mandelbrot Art Generator

by Christopher King

Table Of Contents

A Mandelbrot set generator with a little extra funk

The Mandelbrot set is one of the most beautiful structures in mathematics and offers a diverse view of self similar structures. After being inspired by a video of falling headfirst into infinity, I thought that it would be interesting to make a tool that would allow me to print some funky art.


Generated under CC-BY-NC 4.0
For commercial use: CLICK HERE

Render Settings
The number of different blobs of colors Detail
Higher numbers spread the lines more Blob Spread
How many cycles of color the lines go through Color Repetition
Changes the starting hue of the pattern Hue Shift
Bends and stretches space Warp
Position Settings
How zoomed in the image is Scale
The position along the X axis X
The position along the Y axis Y
The height / width in pixels Fine X
The height / width in pixels Fine Y
Image Settings
The height / width in pixels Canvas Resolution


For those unfamiliar with the mandelbrot set, the visualizations we commonly see are a representation of complex number plane. The color at each position basically shows how fast a function explodes into infinity when you iterate over it again and again. The white areas indicate the locations where the function is stable and does not exceed some threshold. The function we iterate over in mandelbrot set is We start with z = 0 and c is our pixel’s position on the complex plane and then we see if z explodes into infinity or remains finite.
In almost all implementations of the Mandelbrot set, there's an early exit condition. If the complex number’s value becomes greater than 2, we can assume that the number will go to infinity and therefore stop iterating the function at that position.
Something really beautiful happens if we change the early out condition to check if only the real part of the number is greater than some arbitrary value. This is what causes the prevalence of the overlapping line aesthetic in my generator.

There are some obvious optimizations that could be made to this. You could write this as a shader and render it with the GPU rather than CPU, or use single instruction multiple data paradigm's closer to the silicon than I am in this webpage. But seeing how this already served its purpose in generating the images that I wanted, I'm going to leave it as it is. If you're interested in that topic, One Lone Coder made a great video about this.