MRaster examples 23.0.0.0
Image Processing Library
Loading...
Searching...
No Matches
poly_root_cloud.cpp File Reference

Draw the roots of paramaterized polynomials. More...

Go to the source code of this file.

Detailed Description

Draw the roots of paramaterized polynomials.

Author
Mitch Richling http://www.mitchr.me/
Keywords
polynomial root
Standards
C++23
See also
https://github.com/richmit/mraster/
Details


Plot roots of the polynomial p. Two of the coefficients of p (c1 & c2) are parameterized by polynomials (p2 & p2) over the unit circle.

In pseudo-code: Loop Select sample points on the unit circle for t1 & t2 Plug t1 & t2 into p1 & p2 Set coefficients c1 & c2 in p to the value of p1 & p2 Find the roots of p and plot them Repeat

I made a prototype for this problem in Matlab. In the Matlab code I placed semitransparent filled circles at each root, and allowed color to build up with repeated layers of roots. This results in a "fuzzy" look spreading color more smoothly over the envelope of the root cloud. That code may be found here: https://github.com/richmit/PolyRootCloud/

In this code I wanted to emphasize more directly the way the circles in the parametrization map to the root cloud space. So I'm actually creating a histogram of root hits in the plane with a very fine grid, and using many more sample points on one parameter. This produces a Spirograph'esq effect.

Definition in file poly_root_cloud.cpp.