Hierarchical Kinematic Modeling
Hierarchical Kinematic Modeling
Hierarchical modeling is the enforcement of connectivity (or relative placement) constraints among objects organized in a tree-like structure. Usually these objects are connected end-to-end to form multi-body jointed chains.
Such hierarchies are useful for modeling animals and human figures in which the joints of the limbs are manipulated to produce a figure with moving appendages. Such a figure is often referred to as articulated. The movement of an appendage by changing the configuration of a joint is referred to as articulation. The connectivity of
the figure is built into the structure of the model, thus relieving the animator from the responsibility of making
sure that the objects making up the limbs stay attached to one another. Object hierarchies are also useful for models in which the objects have relative positions but are not actually connected. For example, planetary systems
can be modeled hierarchically.
Much of the material concerning the animation of hierarchies comes to computer graphics from the field of
robotics (e.g., see the book by Craig [ref Craig]). The robotics literature discusses the modeling of manipulators
which are considered to be a sequence of objects connected in a chain by joints. The rigid objects forming the
connections between the joints are called links. The free end of the chain of joints is called the end effector. The
local coordinate system associated with each joint is referred to as the frame.
Robotics is concerned with all types of joints in which two objects move relative to one another. Graphics, on the
other hand, is concerned primarily with revolute joints in which one object rotates about a fixed point of the other
object. The objects are usually considered to be pinned together at this point, and the object further down the
chain rotates while the other one remains fixed - at least as far as this joint is concerned. The other type of joint
which sometimes finds use in computer animation is the prismatic joint in which one link translates relative to
another. See Figure 107.
a) Revolute joint.
FIGURE 107.
b) Prismatic joint.
Typical Joints used in computer animation
The joints of Figure 107 allow motion in one direction and are said to have one degree of freedom. Structures in
which more than one degree of freedom is coincident, complex joints, include the ball and socket joint and the
planar joints. Planar joints are those in which one object slides on the planar surface of another. Typically, when
a joint has more than one (n>1) degree of freedom, such as a ball and socket joint, it is modeled as a set of n one-
V3: Computer Animation: Algorithms and Techniques
157
degree-of-freedom joints connected by n-1 links of zero length (see Figure 108).
b1) planar joint
a1) ball and socket joint
T2
θ3
T1
θ1
θ2
zero length linkage
zero length linkages
a2) ball and socket joint modeled as
3 one-degree joints with zero-length links
FIGURE 108.
b2) planar joint modeled as 2 one-degree
prismatic joints with zero-length links
Modeling complex joints
Representing Hierarchical Models
Human figures and animals are conveniently modeled has hierarchical linkages. Such linkages can be represented by
a tree structure of nodes connected by arcs1. The highest node of the tree is the root node and corresponds to the root
object of the hierarchy whose position is known in the global coordinate system. The position of all other nodes of the
hierarchy will be located relative to the root node. A node from which no arcs extend downward is referred to as a leaf
node. Something “higher up in the hierarchy” refers to a node which is closer to the root node. When discussing two
1. The robotics literature refers to the objects between the joints as links. In order to avoid overloading the term links, arcs will be
used to refer to the connections between nodes in a tree.
158
V3: Computer Animation: Algorithms and Techniques
Hierarchical Kinematic Modeling
nodes of the tree connected by an arc, the one higher up the hierarchy is referred to as the parent node, and the
one farther down the hierarchy is referred to as the child node.
The mapping between the hierarchy and tree structure relates a node of the tree to information about the object
part (the link) and relates an arc of the tree to the transformation to apply to all of the nodes below it in the hierarchy (the joint). Relating a tree arc to a figure joint may seem counter-intuitive, but it is convenient because a
node of the tree can have several arcs emanating from it, just like an object part may have several joints attached
to it. When discussing a hierarchical model presented by a specific tree structure, the terms node, object part, and
link are used interchangeably since they all refer to the geometry to be articulated. Similarly, the terms joint and
arc are used interchangeably.
In the tree structure, there is a root arc which represents a global transformation to apply to the root node (and,
therefore, indirectly to all of the nodes of the tree). Changing this transformation will rigidly reposition the entire
structure in the global coordinate system. See Figure 109.
root node
root
Link
a) articulated figure
FIGURE 109.
b) abstract hierarchical
representation
root arc
Joint
c) tree structure
Example tree structure representing a hierarchical structure.
A node of the tree structure contains the information necessary to define the object part in a position ready to be
articulated. In the case of rotational joints, this means that the point of rotation on the object part coincides with
the origin. The object data may be defined in such a position or there may be a transformation matrix contained
in the node which, when applied to the object data, positions it so. In either case, all of the information necessary
to prepare the data for articulation is contained at the node. A transformation is associated with an arc leading to
a node which rotates and translates the object into its position of attachment relative to the object part one posi-
V3: Computer Animation: Algorithms and Techniques
159
tion up in the hierarchy as well as the variable transformation which is responsible for the actual joint articulation.
See Figure 110.
Arci
Nodei - contains:
Nodei
* a transformation to be applied to
object data to position it so
its point of rotation is at
origin (optional)
* object data
FIGURE 110.
Arci - contains:
* constant transformation of Linki to
its neutral position on Nodei-1
* variable transformation responsible
for articulating Nodei
Arc, Link definition.
A Simple Example
Consider the simple, two-dimensional, three link example of Figure 111. For this example, there is assumed to be no
transformation at any of the nodes; the data is defined in a position ready for articulation. Link 0, the root object, is
transformed to its orientation and position in global space by T0. Because all of the other parts of the hierarchy will be
defined relative to this part, this transformation affects the entire assemblage of parts and thus will transform the position and orientation of the entire structure. This transformation can be changed over time in order to animate the posi-
160
V3: Computer Animation: Algorithms and Techniques
Hierarchical Kinematic Modeling
tion and orientation of the rigid structure. Link 1 is defined relative to the untransformed root object by
transformation T1. Similarly, Link 1.1 is defined relative to the untransformed Link 1 by transformation T1.1.
T0
root object (Link 0) transformed (translated and scale)
to some known location
in global space by T0
original definition of root object
(Link 0)
T1
Link 1 transformed to its
position relative to
untransformed Link 0
by T1
original definition of Link 1
T1.1
Link 1.1 transformed by T1.1 to its
position relative to
untransformed Link 1
original definition of Link 1.1
FIGURE 111.
Example hierarchical model.
These relationships can be represented in a tree structure by associating the links with nodes and transformations
with arcs. See Figure 112. In this example, the articulation transformations are not yet included in the model.
FIGURE 112.
Example tree structure.
An arc in the tree representation contains a transformation that applies to the object represented by the node to
which the arc immediately connects. This transformation is also applied to the rest of the linkage farther down
V3: Computer Animation: Algorithms and Techniques
161
T0 (global position and orientation)
data for Link 0 (the root)
T1 (transform of Link 1 relative to Link 0)
data for Link 1
T1.1 (transform of Link 1.1 relative to Link 1)
data for Link 1.1
the hierarchy. The vertices of a particular object can be transformed to their final positions by concatenating the transformations higher up the tree and applying the composite transformation matrix to the vertices.
A vertex of the root object, Link 0, is located in the world coordinate system by applying the rigid transformation
which affects the entire structure. It is simply EQ 65.
V 0′ = T 0 ⋅ V 0
(EQ 65)
A vertex of the Link 1 object is located in the world coordinate system by transforming it first to its location relative
to Link 0 and then relocating it (conceptually along with Link 0) to world space by EQ 66.
V 1′ = T 0 ⋅ T 1 ⋅ V 1
(EQ 66)
A vertex of the Link 1.1 object is similarly located in world space by EQ 67. Notice that, as the tree is traversed further down one of its branches, a newly encountered arc transformation is concatenated with the transformations previously encountered.
V 1.1 ′ = T 0 ⋅ T 1 ⋅ T 1.1 ⋅ V 1.1
(EQ 67)
As previously discussed, in order to construct the static position of the assembly, each arc of the tree has an associated
transformation which rotates and translates the object associated with the child node relative to the object associated
162
V3: Computer Animation: Algorithms and Techniques
Hierarchical Kinematic Modeling
with the parent node. In order to easily animate the a revolute joint, there is also a parameterized transformation
that controls the rotation at the specified joint. See Figure 113.
Link 1.1
P0
θ1.1
Link 1
θ1
T0
FIGURE 113.
Changeable rotations at the joints.
In the tree representation which implements a revolute joint, the rotation transformation is associated with the arc
which precedes the node representing the object part to be rotated. See Figure 114. The rotational transformation
is applied to the object data before the arc’s constant transformation. If a transformation were present at the node
V3: Computer Animation: Algorithms and Techniques
163
(for preparing the data for articulation), then the rotational transformation is applied to the object data between the
arc’s constant arc transformation and the node transformation.
T0
data for Link0 (the root)
T1
R1(θ1)
data for Link1
T1.1
R1.1(θ1.1)
data for Link 1.1
FIGURE 114.
Hierarchy showing joint rotations.
To locate a vertex of Link 1 in world space, it is first transformed by the joint rotation matrix. Once that is done, then
it goes through the rest of the transformations up the hierarchy. See EQ 68.
V 1 ′ = T 0 ⋅ T 1 ⋅ R 1(θ 1) ⋅ V 1
(EQ 68)
A vertex of Link 1.1 is transformed similarly by compositing all of the transformations up the hierarchy to the root. as
in EQ 69.
V′ 1.1 = T 0 ⋅ T 1 ⋅ R 1(θ 1) ⋅ T 1.1 ⋅ R 1.1(θ 1.1) ⋅ V 1.1
164
V3: Computer Animation: Algorithms and Techniques
(EQ 69)
Hierarchical Kinematic Modeling
In the case of multiple appendages, the tree structure would reflect the bifurcations (or multiple branches if more
than two). Adding another arm to our simple example looks like Figure 115.
Link 1.1
θ1.1
P0
Link 1
θ1
θ2
T0
θ2.1
FIGURE 115.
Hierarchy with two appendages.
The corresponding tree structure would have two arcs emanating from the root node as in Figure 116.
T0
data for Link 0 (the root)
R2(θ2)
T2
data for Link 2
Τ2.1
R2.1(θ2.1)
data for Link 2.1
FIGURE 116.
T1
R1(θ1)
data for Link 1
T1.1
R1.1(θ1.1)
data for Link 1.1
Tree structure corresponding to hierarchy with two appendages.
Branching in the tree occurs whenever multiple appendages emanate from the same object. For example, in a
simplified human figure, the root hip area of Figure 109 might branch into the torso and two legs. If prismatic
joints are used, the strategy is the same, the only difference being that the rotation transformation of the joint
(arc) is replaced by a translation.
V3: Computer Animation: Algorithms and Techniques
165
Forward Kinematics
Evaluation of a hierarchy by traversing the corresponding tree produces the figure in a position that reflects the setting
of the joint parameters. Traversal follows a depth first pattern from root to leaf node. The traversal then backtracks
back up the tree until an unexplored downward arc is encountered. The downward arc is than traversed followed by
backtracking up to find the next unexplored arc. This traversal continues until all nodes and arcs have been visited.
Whenever an arc is followed down the tree hierarchy, its transformations are concatenated to the transformations of
its parent node. Whenever an arc is traversed back up the tree to a node, the transformation of that node must be
restored before traversal continues downward.
A stack of transformations is a conceptually simple way to implement the saving and restoring of transformations as
arcs are followed down and then back up the tree. Immediately before an arc is traversed downward, the current composite matrix is pushed onto the stack. The arc transformation is then concatenated with the current transformation by
premultiplying it with the composite matrix. Whenever an arc is traversed upward, the top of the stack is popped off
of the stack and becomes the current composite transformation. (If node transformations are present, which prepare
the data for transformation, they must not be included in a matrix which gets pushed onto the stack.)
/* the node structure */
typedef struct node {
object
*
struct arc *
*/
int
} node_struct;
/* the arc structure */
typedef struct arc {
trans_mat
trans_mat
node_struct
} arc_struct;
obj;
arc_array;
/* pointer to object data structure */
/* array of arcs emanating downward from node
num_arc;
/* number of arcs in array */
rot;
m;
*nptr;
/* joint rotation matrix */
/* orientation and position matrix */
/* pointer to node below arc */
/* the highest structure of the tree is the root arc holding the global transforms */
/* the high level routine simply calls for the (recursive) evaluation of the root node */
eval_tree(struct arc rootArc)
{
eval_node(rootArc->m,rootArc->node);
/* recursively evaluate the root node */
}
/* the recursive evaluation routine */
eval_node(trans_mat m,node_struct node);
{
trans_mat
temp_m;
concat_tm(node->m,m,&temp_m);
transf_obj(obj,temp_m,&temp_obj);
display_obj(temp_obj);
/* temporary transformation */
/* concatenate current and node transform */
/* transform object */
/* display transformed object */
/* loop over each arc emanating from node and recursively evaluate
166
V3: Computer Animation: Algorithms and Techniques
Hierarchical Kinematic Modeling
/* the attached node */
for (l=0; l<node->num_arc; l++) {
premul_tm(node->arc_array[l]->m,temp_m);
premul_tm(node->arc_array[l]->rot,temp_m);
eval_node(temp_m,node->arc_array[l]->node);
}
}
To animate the linkage, the rotation parameters at the joints (the changeable rotation matrices associated with the
tree arcs and parameterized by joint angle) are manipulated. A completely specified set of rotation parameters,
which results in positioning the hierarchical figure, is called a pose. A pose is specified by a vector (the pose vector) consisting of one angle for each joint.
In a simple animation, a key position may be interactively determined by the user, followed by interpolation of
joint rotations between key positions. Positioning a figure by specifying all of the joint angles is call forward
kinematics. Unfortunately, getting the figure to a final desired position by specifying joint angles can be tedious
for the user. Often times, it is usually a trial and error process. In order to avoid the hassles with having to specify
all of the joint angles, inverse kinematics (IK) is sometimes used in which the desired position and orientation of
the end effector is given and the internal joint angles are calculated automatically.
Denavit-Hartenberg Notation
In setting up complex hierarchies and in applying sophisticated procedures such as inverse kinematics, it’s convenient to be able to define points in the local coordinate system (frame) associated with a joint and to have a welldefined method for converting the coordinates of a point from one frame to another. A common use for this is to
convert points defined in the frame of a joint to the global coordinate system for display purposes. In the example
above a transformation matrix is associated with each arc to represent the transformation of a point from the local
coordinate space of a child node to the local coordinate space of the parent node. The inverse of the transformation matrix can be used to transform a point from the parent’s frame to the child’s frame. In the three-dimensional
case, arbitrary 4x3 transformation matrices could be used, but these are not very concise specifications and are
not very intuitive for the user.
The Denavit-Hartenberg (DH) notation is a particular way of describing the relationship of one frame to the next.
This convention is commonly used in robotics and often adopted for use in computer animation. Each frame is
described relative to an adjacent frame by four parameters. The parameters describe the position and orientation
of a child frame in relation to its parent’s frame.
For revolute joints, the z-axis of the joint’s frame corresponds to the axis of rotation (prismatic joints will be discussed below). The link associated with the joint extends down the x-axis of the frame. First consider a simple
configuration in which the joints and the axes of rotation are coplanar. The distance down the x-axis from one
V3: Computer Animation: Algorithms and Techniques
167
joint to the next is the link length, ai. The joint angle, θi, is specified by the rotation of the joint’s x-axis about it’s zaxis relative to the previous frame’s x-axis direction. See Figure 117.
yi
zi
yi+1
zi+1
xi+1
Linki+1
θi+1
xi
Linki
ai
Jointi
Jointi+1
FIGURE 117.
Denavit-Hartenberg parameters for planar joints.
Non-planar configurations can be represented by including the two other DH parameters. For this general case, the x
axis of the ith joint is defined as the line segment which is perpendicular to the z axes of the ith and i+1st frames. The
link twist parameter, αι, describes the rotation of the next frame’s z-axis about this perpendicular relative to the z-
168
V3: Computer Animation: Algorithms and Techniques
Hierarchical Kinematic Modeling
axis of the previous frame. The link offset parameter, di, specifies the distance along the z-axis (rotated by αι) of
the frame between the two x-axes on either side of that joint. See Figure 118.
Link i+1
αι
y
z
Link i
di+1
x
z
yi
x
θi+1
ai
Joint i+1
Joint i
FIGURE 118.
Denavit-Hartenberg Parameters
Notice that the parameters associated with the ith joint do not all relate the ith frame to the i+1st frame. The link
length and link twist relate the ith and i+1st frames; the link offset and joint rotation relate the i-1st frame and ith
frames. See Table 1.
name
symbol
description
link offset
di
the distance from xi-1 to xi along zi
joint angle
θι
the angle between xi-1 and xi about zi
link length
ai
the distance from zi to zi+1 along xi
link twist
αι
the angle between zi and zi+1 about xi
TABLE 1. Denavit-Hartenberg
joint parameters for joint i.
The parameters can be paired off to define two screw transformations each of which consists of a translation and
rotation relative to a single axis. The offset (di) and angle (θι) are the translation and rotation of this joint relative
to the previous joint with respect to the previous joint’s z-axis. The length (ai) and twist (αι) are the translation
and rotation of the next joint with respect to this joint’s x-axis. The transformation of the i+1st joint’s frame from
the ith frame can be constructed from a series of transformations each of which corresponds to one of the DH
V3: Computer Animation: Algorithms and Techniques
169
parameters. For example, the transformation of a point, Vi+1, whose coordinates are given in the coordinate system of
joint i+1, into a specification of the same point in the coordinate system of joint i, Vi, is given by EQ 70.
V i = T X (a i)R X (α i)T Z (d i + 1)R Z (θ i + 1)V i + 1
cos ( θ i + 1 ) – sin ( θ i + 1 ) 0 0
sin ( θ i + 1 ) cos ( θ i + 1 ) 0 0
R Z (θ i + 1) =
0
0
0
0
1 0
0 1
1 0 0 0
0 1 0 0
T Z (d i + 1) =
0 0 1 di + 1
.
0 0 0
R X (α i) =
(EQ 70)
1
1
0
0
0
0 cos ( α i ) – sin ( α i ) 0
0 sin ( α i ) cos ( α i ) 0
0
0
0
1
1 0 0 ai
T X (a i) = 0 1 0 0
0 0 1 0
0 0 0 1
V i = Mi
cos ( θ i + 1 )
Mi
i+1
=
i+1
Vi + 1
– sin ( θ i + 1 )
0
ai
cos ( α i ) ⋅ sin ( θ i + 1 ) cos ( α i ) ⋅ cos ( θ i + 1 ) – sin ( α i ) – d i + 1 ⋅ sin ( α i )
sin ( α i ) ⋅ sin ( θ i + 1 ) sin ( α i ) ⋅ cos ( θ i + 1 ) cos ( α i ) d i + 1 ⋅ cos ( α i )
0
0
0
1
In EQ 70, T and R represent translation and rotation transformation matrices respectively; the parameter specifies the
amount of rotation or translation and the subscript specifies the axis involved. The matrix M maps a point defined in
the i+1st frame into a point in the ith frame. By forming the M matrix and its inverse associated with each pair of
joints, points can be converted from one frame to another, up and down the hierarchy.
170
V3: Computer Animation: Algorithms and Techniques
Hierarchical Kinematic Modeling
A Simple Example
Consider the simple three-joint manipulator of Figure 119. The DH parameters are given in Table 2.
LB
θC
C
A
θΑ
LA
FIGURE 119.
B
θΒ
LC
Simple Manipulator Using Three Revolute Joints
V3: Computer Animation: Algorithms and Techniques
171
Joint \ Parameter
Link Displacement
Joint Angle
Link Length
Link Twist
A
0
θΑ
0
0
B
0
θΒ
LA
0
C
0
θC
LB
0
TABLE 2. Parameters
for three revolute joint armature
Including a Ball-and-Socket Joint
Some human joints are conveniently modeled using a ball and socket joint. Consider an armature with a hinge joint
followed by a ball-and-socket joint followed by another hinge joint as shown in Figure 120.
LB
A
LA
B
θC
C
θΑ
LC
θΒ1
θB2
θB3
FIGURE 120.
172
Incorporating a Ball-and-Socket Joint
V3: Computer Animation: Algorithms and Techniques
Hierarchical Kinematic Modeling
Denavit and Hartenberg notation can represent the ball and socket joint by three single DOF joints with zero
length links between them. See Figure 121.
y Joint A
Joint B
Ball-and-Socket
z
y
z
x
z
y
x
z
Joint C
x
LA
z
x
x
y
Zero Length Links
x
y
LB
FIGURE 121.
Coordinate axes induced by the DV representation of a ball-and-socket joint.
Notice that, in the default configuration of joint angles set to zero, the DH model of the ball-and-socket joint is in
a gimbal lock position (incrementally changing two of the parameters results in rotation about the same axis).
The first and third DOFs of that joint are aligned; the z-axes of these joints are colinear because the links between
them are zero length and the two link twist parameters relating them are ninety degrees which results in a total of
one hundred eighty degrees. As a consequence, the representation of the ball-and-socket joint is usually initialized with the middle of the three joint angles set to ninety degrees. See Table 3.
Joint \ Parameter
Link Displacement
Joint Angle
Link Length
Link Twist
A
0
θΑ
0
0
B1
0
θΒ1
LA
90
B2
0
90+θΒ2
0
90
B3
0
θΒ3
0
0
C
0
θC
LB
0
TABLE 3. Joint
parameters for ball-and-socket joint.
Constructing the frame description
Because each frame’s displacement and joint angle are defined relative to the previous frame, a Frame 0 is
defined so that the Frame 1 displacement and angle can be defined relative to it. Frame 0 is typically defined so
that it coincides to Frame 1 with zero displacement and zero joint angle. Similarly, because the link of the last
V3: Computer Animation: Algorithms and Techniques
173
frame does not connect to anything, the x-axis of the last frame is chosen so that it coincides with the x-axis of the
previous frame when the joint angle is zero; the origin of the nth frame is chosen as the intersection of the x-axis of
the previous frame and the joint axis when the displacement is zero.
For intermediate joints, the following procedure can be used to construct their frames.
1.
2.
3.
For each joint, identify the axis of rotation for revolute joints and the axis of displacement for prismatic
joints. Refer to this axis as the z-axis of the joint’s frame.
For each adjacent pair of joints, the ith and i+1st for i from 0 to n-1, construct the common perpendicular
between the z-axes or, if they intersect, the perpendicular to the plane that contains them. Refer to the
intersection of the perpendicular and the ith frame’s z-axis (or the point of intersection of the two axes)
as the origin of the ith frame. Refer to the perpendicular as the x-axis of the ith frame. See Figure 122.
Construct the y-axis of each frame to be consistent with the right-hand rule (assuming right-hand space).
zi-1
zi-1
zi
zi
xi
xi
FIGURE 122.
origin
Determining the origin and x-axis of the ith frame
Inverse Kinematics
In inverse kinematics, the position and possibly the orientation of the end effector are given by the user and the joint
angles required to attain that configuration are calculated. The problem can have zero, one, or more solutions. If there
are too many constraints on the configuration so that no solution exists, the system is called over constrained. If there
are relatively few constraints on the system and there exist many solutions to the problem posed, then it is under constrained. The reachable workspace is that volume which the end effector can reach. The dextrous workspace is that
volume which the end effector can reach in any orientation.
If the mechanism is simple enough, then the joint angles (the pose vector) required to produce the final, desired configuration can be analytically calculated. Given an initial pose vector and the final pose vector, intermediate configurations can be formed by interpolation of the values in the pose vectors thus animating the mechanism from its initial
configuration to the final one. However, if the mechanism is too complicated for analytic solutions, then an incremental approach can be used which employs a matrix of values which relate changes in the joint angles to changes in end
effector position (the Jacobian). The end effector is iteratively nudged until the final configuration is attained within a
given tolerance.
174
V3: Computer Animation: Algorithms and Techniques
Hierarchical Kinematic Modeling
Solving a simple system by analysis
For sufficiently simple mechanisms, the joint angles of a final desired position can be analytically determined by
inspecting the geometry of the linkage. Consider a simple two-link arm in two-dimensional space. Link lengths
are L1 and L2 for the first and second link respectively. Assuming a fixed position for the base of the arm at the
first joint, any position beyond |L1-L2| units from the base of the link and within L1+ L2 of the base can be
reached. See Figure 123.
L1
θ2
θ1
L2
b) reachable workspace
a) configuration
FIGURE 123.
Simple linkage.
Assume for now (without loss of generality) that the base is at the origin. In a simple inverse kinematics problem,
the user gives the (X,Y) coordinate of the desired position for the end effector. The joint angles, θ1 and θ2, can
be solved for by computing the distance from the base to the goal and using the law of cosines to compute the
interior angles. Once the interior angles are computed, the rotation angles for the two links can be computed. See
V3: Computer Animation: Algorithms and Techniques
175
Figure 124. Of course the first step is to make sure that position of the goal is within the reach of the end effector, that
2
2
is, L1 – L2 ≤ X + Y ≤ L 1 + L2 .
L2
L1
180-θ2
(X,Y)
2
θ1
(0,0)
X +Y
θT
2
Y
X
X
cos ( θ T ) = ----------------------2
2
X +Y
X
θ T = acos -----------------------
X 2 + Y 2
2
2
2
2
L2 – L1 – ( X + Y )
cos ( θ 1 – θ T ) = – -----------------------------------------------------2
2
2 ⋅ L1 ⋅ X + Y
(law of cosines)
L2 2 – L1 2 – ( X 2 + Y 2 )
θ 1 = acos ------------------------------------------------------ + θ T
2 ⋅ L1 ⋅ X 2 + Y 2
2
2
2
2
( X + Y ) – L1 – L2
cos ( 180 – θ 2 ) = -----------------------------------------------------2 ⋅ L1 ⋅ L2
2
2
2
(law of cosines)
2
( X + Y ) – L1 – L2
θ 2 = – acos ------------------------------------------------------
2 ⋅ L1 ⋅ L2
FIGURE 124.
Equations used in solving simple inverse kinematic problem.
In this simple scenario, there are only two solutions that will give the correct answer; the configurations are symmetric with respect to the line from (0,0) to (X,Y). This is reflected in the equation of Figure 124 because the arc cosine
is two-valued in both plus and minus theta (Θ). However, for more complicated armatures, there may be infinitely
many solutions that will give the desired end effector location.
The joint angles for relatively simple linkages can be solved by algebraic manipulation of the equations describing
the relationship of the end effector to the base frame. Most linkages used in robotic applications are designed to be
simple enough for this analysis. However, for many cases which arise in computer animation, analytic solutions are
not tractable. In such cases, iterative numeric solutions must be relied on.
176
V3: Computer Animation: Algorithms and Techniques
© Copyright 2026 Paperzz