Skip to content

Conversation

@davidxuang
Copy link

  • Handle cases where three points are strictly collinear (determined by cross product).
  • Eliminate floating error in candidate selection, so that there are no more precision problems when comparing angles to 0 or $\pi$.
    • Remove calls to dir.normalize().
    • Use cross product and cosine similarity over radian angles.

@wmeulemans
Copy link
Collaborator

I tested your code and the same errors that were in the original code upon which this branch is based. I did finally find the flaw and fixed it in the original code. I do like the idea of avoiding normalization/angles where possible, for the sake of efficiency and precision. However, this code also foregoes any form of precision handling, which could easily cause problems for downstream algorithms. One solution could be to parameterize the precision level (which is now fixed to DoubleUtil.EPS / the default), as to allow for "exact" computations as well?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants