MRaster examples 21.0.0.0
Image Processing Library
Loading...
Searching...
No Matches
newton_min_root.cpp File Reference

Draw a Newton Fractical – color by orbit distance from roots. More...

Go to the source code of this file.

Detailed Description

Draw a Newton Fractical – color by orbit distance from roots.

Author
Mitch Richling https://www.mitchr.me
Standards
C++20
See also
https://www.mitchr.me/SS/newton/index.html#min_root_d
Details


We do the standard Newton iterations, but we keep track of the minimum distance from the roots by any iterate of the orbit. Then we use the two largest minimum distances to color the pixel. The distances are used to set the r, g, b channels (i.e. distance to root 1 is r, root 2 is g, and root 3 is b). Closer is a brighter color. By using the two largest and omitting the third distance, the color represents how close the orbit got to the roots to which it didn't converge.

Definition in file newton_min_root.cpp.