I am working on a simple inverse kinematic delta robot controller with Processing. I am stuck at the rule of cosines. I have the length of the three sides and wish to get the angles. But float angle = acos((sq(humerus)+sq(ulna) - sq(radius))/(2 * humerus * ulna));
always returns NaN. Any ideas?
I am working on a simple inverse kinematic delta robot controller with Processing. I
Share
You’ll probably want to use the law of cosines if you know the sides:
In Java terms, to solve for the angle
C(opposite to side of lengthc) we would haveThere are a couple reasons why you could be getting
NaN:NaN.acos: