Mandelbrot Set! (GitHub link included!)

GitHub – Mandelbrot Set

UPDATE: I have now written a Zoom Sequence Generator driver program. With that, you can create videos like and Visit the GitHub repository to know more!

The MandelBrot Set is “a particular set of complex numbers which has a highly convoluted fractal boundary when plotted.” Mathematically speaking, define a sequence z such that: latex_6fd6b1325fe1f8910391ee6566d5c53b and latex_27ae09541f9c34b36225d5e11bc47613Then the Mandelbrot set is the set of all numbers c such that latex_aaaddd7a521e9e243910ec57306d9ff5

I have written a program in C++ that generates a .bmp image of the required coordinates of the Mandelbrot Set! It is fully customizable in terms of:

  • Region of the set you want (real coordinates, imaginary coordinates)
  • Number of iterations
  • Colour of the image

You can enter commands for many images at once. It is up for download and/or testing on GitHub here. Right now, I am working on the shading algorithm for the colors. (Currently, I am using a quartic polynomial shading, which tends to make images purple-ish) Here are some cool images from the program:


lightning mini_mandel200 full_pinksample3The entire Mandelbrot Set.

(RealAxis -2 to 1, ImaginaryAxis -1 to 1, 50 iterations per pixel)


A part of the fractal that resembles lightning bolts.

(RealAxis -0.04 to -0.03, ImaginaryAxis 0.98 to 0.99, 50 iterations per pixel)


Many smaller copies of the entire structure exists inside the main structure. This is one of them.

(RealAxis -1.420 to -1.415, Imaginary Axis -0.0025 to 0.0025, 200 iterations per pixel)


The entire Mandelbrot Set rendered in pink.

(RealAxis -2 to 1, ImaginaryAxis -1 to 1, 50 iterations per pixel)

An “elephant trunk” from the “elephant valley”

(RealAxis 0.27707 to 0.28165, ImaginaryAxis 0.00627 to 0.01085, 200 iterations per pixel)



Some other images-

You will find the input commands for all these images over at github.

sample5 sample6

I have also made an animated GIF of the 3rd image above, as the iteration count goes from 50 to 200. Please be patient while it loads, as it is a rather large image (around 50MB). View it here. (Bluish bands around the boundaries are compression artifacts)


3 Replies to “Mandelbrot Set! (GitHub link included!)”

Leave a Reply

Your email address will not be published. Required fields are marked *