You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made my own implementation of the algorithm in another language (not yet published, but it will be at some point) and I read both your version and the reference implementation.
While reading them I thought that this collinearity test was likely not very robust; testing exactly for 0. in these cases rarely is.
I had a use case that was returning bogus results, e.g. here for union:
I replaced the test by a more robust one derived from my line intersection test (basically see yours, when you reach that point, you have collinear segments; it seems you use a modified version of Eberly, I followed it to the letter). That solved my problem in this case:
In case you are interested in testing this here is the list of points for the two contours (in floating point hex notation, to make sure you get exactly the same values):
I made my own implementation of the algorithm in another language (not yet published, but it will be at some point) and I read both your version and the reference implementation.
While reading them I thought that this collinearity test was likely not very robust; testing exactly for
0.
in these cases rarely is.I had a use case that was returning bogus results, e.g. here for union:
I replaced the test by a more robust one derived from my line intersection test (basically see yours, when you reach that point, you have collinear segments; it seems you use a modified version of Eberly, I followed it to the letter). That solved my problem in this case:
In case you are interested in testing this here is the list of points for the two contours (in floating point hex notation, to make sure you get exactly the same values):
The text was updated successfully, but these errors were encountered: