Skip to content

Numerical instability issues with bezier curves #3

Description

@velipso

I've included a failure test case in the demo, here:

// this one fails due to numerical instability... it will detect an intersection between line

This will fail due to numerical instability.

I'm not sure exactly how to fix it... the solveCubic function is returning a T value very close to 1, but not exactly 1 (and not within striking distance of the epsilon value), so it ends up thinking there is an intersection between a curve and a line, but in reality they just share an endpoint.

I think the solveCubic function needs to take the epsilon value into account in a smarter way, or perhaps rewritten entirely.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions