Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong code in SAC NormalParallelPlane #1754

Closed
nenadpol opened this issue Nov 7, 2016 · 2 comments
Closed

Wrong code in SAC NormalParallelPlane #1754

nenadpol opened this issue Nov 7, 2016 · 2 comments

Comments

@nenadpol
Copy link
Contributor

nenadpol commented Nov 7, 2016

Documentation for SAC MODEL NORMAL PEARALLEL PLANE is clear "... In
addition, the plane normal must lie parallel to an user-specified axis."

So computed plane normal and user defined axis should be parallel within
defined treshold .

Take a look at the code:


if (fabs (axis_.dot (coeff)) < cos_angle_)
return (false);


axis_.dot(coeff) is cosinus (angle between plane normal and user defined
axis).

cos_angle_ is cosinus ( defined treshold).

If axis_.dot(coeff) should be inside treshold then why is code returning
FALSE?

@Chungzuwalla
Copy link

Is it because cosine of the angle gets smaller as the angle gets larger? If angular threshold is 5° and coeff angle is 7°, return false, if coeff angle is 3°, don't return false.
7 > 5, cos(7°) < cos(5°).
3 < 5, cos(3°) > cos(5°).

@mvieth
Copy link
Member

mvieth commented Aug 21, 2019

@Chungzuwalla is correct. Can this issue be closed?

@taketwo taketwo closed this as completed Aug 22, 2019
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

No branches or pull requests

4 participants