Files
test/source
MattiasF 29b27bb19b Curves: Numerically robust curve tangents
Current approach for computing the curve tangent approximations using
the average of the sum of the normalized segment direction vectors
suffers from catastrophic cancellation as the angle between the segments
approach 0°, with increasingly large error in resulting tangent.

Improving current behavior by conditionally computing the tangent using
the cross product to rotate the difference around the orthogonal axis
show a significant improvement for small angles. For segments in an axis
aligned plane, additional errors from computing the cross product is
avoided as terms cancel out. When the rotation axis is not axis aligned,
the method still shows a constant improvement for angles smaller
than ~45°.

Changes improves behavior for cases such as #145558.

For more information see https://projects.blender.org/blender/blender/pulls/146332.

Pull Request: https://projects.blender.org/blender/blender/pulls/146332
2025-09-29 16:45:12 +02:00
..