[vtkusers] Angle between two vectors
Laurent
l.paul at uclouvain.be
Fri Apr 15 10:25:28 EDT 2016
Dear users,
Sorry to dig up this post, but I'm troubled by the results I get.
I used to use the acos() method until I found out that the resulting values
were poor.
We fixed it using the atan2 method instead. Seems working much better!
David (Gobbi), could you elaborate a bit on the error when the angle
approaches 0?
I mean, I get huge differences between both methods. As an example, I get
atan2 Vs acos (in degres):
- 3.67 Vs 10.08
- 11.03 Vs 15.82
- 3.24 Vs 20.02
- 7.78 Vs 20.05
- ...
How to explain these differences?
I've checked if clamp values would give better results but the dot produces
values between -1 and +1.
I've checked multiple times if there was no mistake, and there's not.
I'm horrified!
Since I use the python/numpy distribution from paraview 4.1,
AngleBetweenVectors in not implmented and I had to reimplement the
calculation; That's why I jumped into it more deeply.
Thanks,
Laurent.
--
View this message in context: http://vtk.1045678.n5.nabble.com/Angle-between-two-vectors-tp5725202p5737716.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list