Simple fractal generator built with C and SDL2 library.
Iterative formula of the Mandelbrot set
Generation with 10 000 iterations

C
SDL2
OpenGL
- CMake
- GCC compiler
- VsCode IDE
- Linux
- Windows
.
├── CMakeLists.txt
├── include
│ └── Functions.h
├── README.md
├── results
│ └── Fractale_generation.png
└── src
├── Functions.c
└── main.c
The CMakeLists file already includes a fetching functionnality in case SDL2 isn't already installed in your computer. You can directly use the following commands after cloning the project :
cmake -B build # generates build files
cmake --build build # compile
Before running, you may need to pay attention to the number of iterations defined in the include/Functions.h directory. The default number of iterations has been set to 2000 but you can set it to whichever value you want (200 iterations is a good starting point). You can also change the default monitor to display the generation on by changing the defined value of MONITOR_INDEX in the Functions.h file. After fixing the number of iterations, you can run the generation using this command :
./build/Fractale # run
v
SDL2 >= 2.30.0 # Used as graphic library
lim # For complex math functions (csqrt, etc)