-
-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cubic bezier curves and straight (horizontal or vertical) bezier curves intersection #76
Comments
Using a bezier curve to represent a straight line's a little odd, but that should still work. It might be IEEE floating points causing a problem here, but I'll have to log what |
Having the same issue. Still, awesome lib! 👍 |
I'll have a look to see if I can improve that, but the main reason for this is that it's trying to resolve the intersection as a curve/curve intersection rather than going "this is a degenerate curve, I should just check for line intersection". |
I didn't say it doesn't make sense, I said the code needs to know that it's dealing with a degerenate curve, and that it should automatically fall down to line/curve intersection instead of trying to do the iterative curve/curve intersection detection, which is far more sensitive to IEEE floating point rounding errors. |
Hi!
First of all great work with the library! Has saved me a ton of time.
The issue I have is an intersection with cubic bezier curves and straight horizontal or vertical bezier curve. My code is as follows:
To my understanding the lines should intersect each other at point
{ x: r * 2, y: r }
. Also If I change the straight line even 1px the intersection is detected.Happens in Chrome Version 58.0.3029.110 (64-bit) and Firefox 53.0.3 (64-bit) at least with version 2.2.3
The text was updated successfully, but these errors were encountered: