GitHub – Mandelbrot Set
UPDATE: I have now written a Zoom Sequence Generator driver program. With that, you can create videos like https://www.youtube.com/watch?v=YfE8wf7N0qg and https://www.youtube.com/watch?v=3pCIyW4cQNA. 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: and
Then the Mandelbrot set is the set of all numbers c such that
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:
(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.
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)
Well Done. Beyond my imagination.
Thank you Mrs. Meena 🙂