Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve fractal image - black area #3

Open
TheWindRider opened this issue Feb 12, 2018 · 0 comments
Open

Improve fractal image - black area #3

TheWindRider opened this issue Feb 12, 2018 · 0 comments

Comments

@TheWindRider
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant