Shkyrockett / engine

MIT License
5 stars 0 forks source link

Intersection of Quadratic Bezier and Quadratic Bezier Fails For Many Valid Intersections #26

Closed Shkyrockett closed 7 years ago

Shkyrockett commented 7 years ago

The implementation of the method for finding the intersection between two Quadratic Bezier segments does not produce results for many valid intersections.

quadratic bezier quadratic bezier intersection failure

Shkyrockett commented 7 years ago

It turns out that the issue with this is that the original source of the Bezier to Bezier intersections methods use a polynomial structure that adds the parameters of the polynomial to the field array in reverse order. I had thought I could just reverse the order of the parameters fed to the constructors and add the parameters to the field array in the same order as they are fed in, but mysteriously that does not work. I need to figure out why. Strangely, the insertion order has the opposite effect with the Bezier boundary methods, so I can't just revert to using the same constructor as the original source.