Contradiction between PBDBodies.pdf and PBD.js
BX80646G3258 opened this issue · 0 comments
BX80646G3258 commented
Line 2 of Algorithm 3 (LimitAngle) in PBDBodies.pdf states
if n <dot> n < 0 then phi <- 2Pi - phi
However, in lines 243 - 244 of PBD.js the 2Pi
is replaced with Pi
if (a.dot(b) < 0.0) phi = Math.PI - phi;
Using the algorithm in PBDBodies.pdf causes strange behavior when joint limits are set to values over 0.5 Pi.
If this part of the algorithm is meant to distinguish between the two solutions of the inverse sine function, then I believe the implementation in PBD.js is correct, and Algorithm 3 in PBDBodies.pdf contains an error.