Skip to content

Improve fractal image - black area #3

Open
@TheWindRider

Description

@TheWindRider

The last video suggest room for improvement regarding the black area, and I suggest modify the drawFractal() method:

  • Put red, green, blue calculations outside of if (iterations != Mandelbrot::MAX_ITERATIONS) blob
  • Declare a hue variable outside of that if statement, and set hue equal to (double) totalPixels / rangeTotal within the if statement
  • By initializing the hue value (e.g., =1.0), black area, which corresponds to MAX_ITERATIONS, will be other colors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions