https://github.com/sirbuig/mandelbrot-set
Mandelbrot set visualizer
https://github.com/sirbuig/mandelbrot-set
bitmap bmp c-language mandelbrot-set
Last synced: 18 days ago
JSON representation
Mandelbrot set visualizer
- Host: GitHub
- URL: https://github.com/sirbuig/mandelbrot-set
- Owner: sirbuig
- License: mit
- Created: 2024-04-11T20:05:11.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-16T20:38:12.000Z (9 months ago)
- Last Synced: 2025-03-17T20:21:39.688Z (3 months ago)
- Topics: bitmap, bmp, c-language, mandelbrot-set
- Language: C
- Homepage:
- Size: 441 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mandelbrot-set
This project generates a Mandelbrot fractal and saves it as a `.bmp` file.
## Commands
Clone the project
```
git clone https://github.com/sirbuig/mandelbrot-set.git
```Make sure that `cmake` is installed and that you have a C compiler, such as `gcc`.
Create the build directory
```
mkdir cmake-build
cd cmake-build
```Run CMake to generate the build files
```
cmake ..
```Compile the project
```
cmake --build .
```Run the compiled program
```
./mandelbrot_set
```After running, a file called mandelbrot_24bit.bmp should appear in the current folder. This file contains the image of the Mandelbrot fractal in BMP format.
## Why BMP?
I found it interesting to use especially because the image is pixel-generated. It's simple to grasp and I had fun understanding how some image formats store the bytes under the hood.
This is the resource I used: https://engineering.purdue.edu/ece264/16au/hw/HW13.
## Results
I still want to continue the project, but I'm taking a break from it. These are some of the results so far:
1. Original
```cpp
int width = 2000, height = 2000;
double centerX = -0.75, centerY = 0.0, scale = 1.0;
```
2. Smaller scale
```cpp
double centerX = -0.75, centerY = 0.0, scale = 0.5;
```