Exploring Fractals: Zooming into Mandelbrot set with software developed in C


Benoit B. Mandelbrot (born November 20, 1924, Warsaw, Poland—died October 14, 2010, Cambridge, Massachusetts, U.S.) was a Polish-born French American mathematician universally known as the father of fractals.

– britannica.com

The software was developed to generate specific parts of the famous Mandelbrot set.

The output files of the program are 800x600 binary .ppm images. The RGB value of each pixel is determined by the amount of iterated value divergence, which is calculated using the following formula and starting parameters:

$$c.Re = x_{pixel}; c.Im = y_{pixel}$$ $$z_{0}.Re = 0; z_{0}.Im = 0$$

$$\sum_{i=0}^{n} z_{i+1} = z_{i}^2 + c$$

$$\text{where } n = \text{number of iterations}$$

Below are the images and the command with its parameters used to create them:

./fractal.out <img>.ppm <x_min> <y_min> <x_max> <y_max> <num_of_iter>
./fractal.out fractal001.ppm -2.0 1.0 3.0 2.0 30

fractal001

./fractal.out fractal002.ppm -0.75 0.12 0.01 0.01 100

fractal002

./fractal.out fractal003.ppm -0.925 0.266 0.01 0.01 100

fractal003

./fractal.out fractal004.ppm -1.25066 0.02012 0.0001 0.0001 400

fractal004

./fractal.out fractal005.ppm -1.25 0.02 0.001 0.001 400

fractal005

./fractal.out fractal006.ppm 0.2671 -0.003 0.002 0.002 100

fractal006

./fractal.out fractal007.ppm 0.2817 0.5770 0.0002 0.0002 125

fractal007

./fractal.out fractal008.ppm -0.8407 0.2244 0.0002 0.0002 100

fractal008

./fractal.out fractal010.ppm 0.25 0.05 0.1 0.1 100

fractal010

./fractal.out fractal011.ppm -0.805 0.18 0.01 0.01 100

fractal011

./fractal.out fractal012.ppm -0.815 0.1809 0.05 0.05 100

fractal012

./fractal.out fractal013.ppm 0.317 0.042 0.01 0.01 100

fractal013

Of course, there were some development attempts that didn’t quite make the cut, showcasing the trial and error of fractal creation journey. But their presence was crucial as they indicated progress toward success:

fractal014

fractal015

fractal016

fractal017

fractal018

fractal019