client::fractal_generation

Function generate_fractal_set

Source
pub fn generate_fractal_set(
    fragment_task: FragmentTask,
) -> Result<(ImageBuffer<Rgb<u8>, Vec<u8>>, Vec<u8>, Vec<PixelIntensity>), FractalError>
Expand description

Generates an image of a Fractal Type based on the provided fragment task.

§Arguments

  • fragment_task: A FragmentTask containing details such as the fractal type, resolution, and range.

§Returns

Returns a tuple containing the generated image, the pixel data, and the pixel intensity matrice.

§Details

This function scales the coordinates based on the provided resolution and range, computes the number of iterations for each pixel, and then maps these iterations to a color value.