HTML and CSS Reference
In-Depth Information
Chapter 14
Inverse Kinematics: Dragging and Reaching
What we'll cover in this chapter:
Reaching and dragging single segments
Dragging multiple segments
Reaching with multiple segments
Using the standard inverse kinematics method
In Chapter 13, we covered the basics of kinematics and the difference between inverse and forward
kinematics. The last chapter was about forward kinematics, and now you're ready for its close relative,
inverse kinematics: the movements for dragging and reaching.
As with the forward kinematics examples, the code in this chapter build systems from individual segments.
You begin with single segments, and then move on to multiple segments. First, you'll see the simplest
method for calculating the various angles and positions. This just approximates measurements using the
basic trigonometry you've already seen in action. Then, we briefly cover another method using the law of
cosines, which can be more accurate at the cost of being more complex—that familiar trade-off.
Reaching and Dragging Single Segments
When the free end of the system reaches for a target, the other end of the system, the base, might be
unmovable. So the free end might never be able to get all the way to the target if it is out of range. An
example of this is when you grab hold of something. Your fingers move toward the object, your wrist pivots
to put your fingers as close as possible, and your elbow, shoulder, and the rest of your body move in
whatever way they can, to give you as much reach as possible. Sometimes, the combination of all these
 
Search WWH ::




Custom Search