Implementing a Mandelbrot Image Generator (In Rust) (Agai... wait, this is my first time using Rust!)
mandelbrot-rust -w 4000 -h 4000 --x_mid=-1.25737518304050244765 --y_mid=0.378759463618701690545 -z 6800000000 -i 2040 -c 13
mandelbrot-rust -h 2000 -w 2000 -x 0.443841 -y 0.372062 -z 18000 -i 2040 -c 91
main.rs
contains the main function called upon startup (duh)cli.rs
gets the values for the different parameters to use during computations (and providing default values if non are given)generator.rs
creates the "raw" mandelbrot data, computing the iterations for every point of interest on the gaussian plane, using...- ...
mandelbrot.rs
, which provides the function to check for a given complex value how many iterations it takes to exceed the threshold of 2^2 (=4) color_map.rs
contains different color modes to map the raw mandelbrot data to RGB-values in the form of a vector in row-major order, with every triple of values forming the RGB values of a single pixelpng_writer.rs
then takes this vector and writes it to a PNG image file
num
for handling complex numbersimage
for writing image data as PNGsclap
for handling CLI option inputslittle_exif
for writing parameters as EXIF metadata
- Functionality to also generate images of julia sets
- More color modes / better CLI (currently using numbers - at least provide information about which color mode is which)
- Video generation capability
- Custom complex expression evaluation for mandelbrot sets (currently only fixed z = z^2 + c)