This project is a simple Mandelbrot set plotter written in C++ using SDL2. The Mandelbrot set is a famous fractal defined by iterating a complex function. This program generates a visual representation of the Mandelbrot set by calculating the number of iterations it takes for each point in the complex plane to escape a given radius.
- Computes and visualizes the Mandelbrot set.
- Uses SDL2 for rendering.
- Custom linear interpolation function for coordinate mapping.
- Adjustable color scheme based on the iteration count.
- SDL2 library
- C++ compiler (e.g., g++)
-
Ensure you have the SDL2 library installed. You can download it from SDL2 Downloads or using MSYS
pacman -S mingw-w64-x86_64-SDL2
-
Clone this repository or download the source code.
-
Open a terminal or command prompt and navigate to the directory containing the source code.
-
Compile the code using the following command:
g++ -fdiagnostics-color=always -g path_to_your_source_code/mandelbrot.cpp -o path_to_your_output_directory/mandelbrot.exe -Ipath_to_sdl2_include -Lpath_to_sdl2_lib -lmingw32 -lSDL2main -lSDL2 -mconsole
This project is licensed under the MIT License. See the LICENSE file for details.