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
This seems to be where the problem lies. The rays here should be identical, and yet it's finding an intersection.
Here's the local variables right after this call in offset. From what I can tell of the inputs this curve SHOULD get moved not offset because it has parallel normals on a line that shouldn't intersect. Instead it gets passed to scaling where it gets turned into what visually looks like a line, but has tiny offsets to it's control points.
This is the bezier returned by offset. This was pretty hard to debug because visually without zooming in this looks like a line with colocated handles, but it's not and only by a few units.
The text was updated successfully, but these errors were encountered:
MatthewBlanchard
changed the title
Offset function finds intersection point on a line and scales it instead of offsetting, producing an output that's not a line.
Offset function finds false intersection point on a line and scales it instead of offsetting, producing an output that's not a line.
Feb 11, 2021
Hm, yes, I think a value of 2e-12 for the threshold for the divisor value does work in ray_intersects_ray. Not sure if there is a good way to choose this constant as it's a combination of the expected precision of the input values and the required precision of the output. The minimum that will fix this case is roughly 3e-14, so this gives a 100x margin for error.
In this case, we wind up with a double-whammy of loss of precision where the intersection point is calculated as very far out, so the scaling ends up being very small, which results in the control points not lining up very well.
This seems to be where the problem lies. The rays here should be identical, and yet it's finding an intersection.
Here's the local variables right after this call in offset. From what I can tell of the inputs this curve SHOULD get moved not offset because it has parallel normals on a line that shouldn't intersect. Instead it gets passed to scaling where it gets turned into what visually looks like a line, but has tiny offsets to it's control points.
This is the bezier returned by offset. This was pretty hard to debug because visually without zooming in this looks like a line with colocated handles, but it's not and only by a few units.
The text was updated successfully, but these errors were encountered: