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
The last video suggest room for improvement regarding the black area, and I suggest modify the
drawFractal()method:red,green,bluecalculations outside ofif (iterations != Mandelbrot::MAX_ITERATIONS)blobhuevariable outside of that if statement, and sethueequal to(double) totalPixels / rangeTotalwithin the if statementhuevalue (e.g., =1.0), black area, which corresponds toMAX_ITERATIONS, will be other colors