This Rust program generates grayscale images of the Mandelbrot set and saves them as PNG files. It uses multi-threading for efficient rendering and supports custom image dimensions and complex plane coordinates.
- Renders Mandelbrot set images in PNG format
- Multi-threaded rendering for performance
- Customizable image size and complex plane region
- Simple command-line interface
./mandelbrot FILE PIXELS LEFT,TOP RIGHT,BOTTOMFILE: Output PNG filename (e.g.,mandel.png)PIXELS: Image dimensions in the formatWIDTHxHEIGHT(e.g.,1000x750)LEFT,TOP: Upper-left complex coordinate (e.g.,-1.20,0.35)RIGHT,BOTTOM: Lower-right complex coordinate (e.g.,-1,0.20)
./mandelbrot mandel.png 1000x750 -1.20,0.35 -1,0.20This command generates a 1000x750 PNG image of the Mandelbrot set covering the specified region of the complex plane.
Make sure you have Rust installed.
cargo build --releaseThe executable will be located at target/release/mandelbrot.
After building, run the program as shown in the usage section. The output image will be saved to the specified file.
Below is a sample output generated:
This project is licensed under the GNU GPL v3 License. See LICENSE for details.
