| Analytic Two-Bone IK in 2D - Solving for angle 1 |
|
|
| Monday, 29 December 2008 07:46 | |||||||||||
Page 7 of 8
Solving for θ1When we solved for
Personally, I prefer an algebraic derivation because it is more likely to work in all cases. With the geometric derivation, we need to be very careful that what we infer from our diagram remains true for all diagrams. It is possible that what looks true at first, might be false when the bones are bent at unexpected angles or when they are of unexpected lengths. If anyone has a purely algebraic break down of this step, I would be interested in learning it.
figure 4
In figure 4, the angles
So far things look pretty straight forward, but what happens if our previously solved value for
Because
Now that we know solving for
In figure 4, the magnitudes of
The magnitude of
Compute
Use the angle sum and difference identity for tangent to solve
Expand
Simplify by multiplying the numerator and denominator by
Our desired value for
In order to extract the proper angle, we can use the atan2 function. This will evaluate the principle value of
Separate the numerator and denominator into the coordinate values and evaluate for
In the case where |
|||||||||||
| Last Updated ( Sunday, 02 May 2010 06:32 ) | |||||||||||



