▲ | CyLith 3 days ago | |||||||||||||||||||||||||
The library only solves up to cubic equations, and the comments have a link to the following page: https://momentsingraphics.de/CubicRoots.html For general polynomials, it matters a great deal in what basis it is represented. The typical monomial basis is usually not the best from a numerical standpoint. I am aware of some modern methods such as this: https://arxiv.org/pdf/1611.02435 For polynomials expressed in e.g. a Bernstein basis, there are often much faster and stable tailored methods working solving for the eigenvalues of a companion matrix of a different form. | ||||||||||||||||||||||||||
▲ | LegionMammal978 2 days ago | parent [-] | |||||||||||||||||||||||||
That doesn't sound right, nearest-point queries for cubic Béziers take at least a quintic solver, and this library uses a subdivision-based algorithm with Bernstein polynomials that is seemingly designed to work with any degree [0]. (Or at least, it doesn't have any code that complains when the degree is too large.) [0] https://github.com/GraphiteEditor/Graphite/blob/master/libra... | ||||||||||||||||||||||||||
|