Graphics Reference
In-Depth Information
￿ Amatrix: Amatrix that articulates the node data; this is the matrix that is changed in order to animate
(articulate) the linkage.
￿
arcPtr: A pointer to a sibling arc (another child of this arc's parent node); this is NULL if there are no
more siblings.
Each node has associated with it the following:
￿ dataPtr: Data (possibly shared by other nodes) that represent the geometry of this segment of the figure.
￿ Tmatrix: A matrix to transform the node data into position to be articulated (e.g., put the point of
rotation at the origin).
￿ ArcPtr: A pointer to a single child arc.
The code in Figure 5.13 uses Push() and Pop() calls that operate on a matrix stack in order to save
and restore the transformation matrix.
There is a root arc that holds the global transformation for the figure and points to the root node of
the figure. The hierarchy is traversed by passing a pointer to the root arc and a matrix initialized as the
identity matrix to the traversal routine:
traverse(rootArcPtr,I) ; 'I' is identity matrix
To animate the linkage, the parameters at the joints (rotation angles in our case) are manipulated.
These parameters are used to construct the changeable transformation matrix associated with the tree arc.
A completely specified set of linkage parameters, which results in positioning the hierarchical figure,
are calleda pose. Apose is specifiedbya vector (the posevector ) consistingof one parameter for eachDOF.
In a simple animation, a user may determine a key position interactively or by specifying numeric
values and then interpolate the joint values between key positions. Specifying all of the joint parameter
values for key positions is called forward kinematics and is an easy way to animate the figure. Unfor-
tunately, getting an end effector to a specific desired position by specifying joint values can be tedious
for the user. Often, it is a trial-and-error process. To avoid the difficulties in having to specify all of the
joint values, IK is sometimes used, in which the desired position and orientation of the end effector are
given and the internal joint values are calculated automatically.
5.3 Inverse kinematics
In IK, the desired position and possibly orientation of the end effector are given by the user along with
the initial pose vector. From this, the joint values required to attain that configuration are calculated,
giving the final pose vector. The problem can have zero, one, or more solutions. If there are so many
constraints on the configuration that no solution exists, the system is called overconstrained . If there are
relatively few constraints on the system and there are many solutions to the problem posed, then it is
underconstrained . The reachable workspace is that volume which the end effector can reach. The
dexterous workspace is the volume that the end effector can reach in any orientation.
Once the joint values are calculated, the figure can be animated by interpolating from the initial
pose vector values to the final pose vector values calculated by IK. However, for large differences
between initial and final pose vectors, this does not provide precise control over the path that the
end effector follows. Alternatively, a series of intermediate end effector positions (and possibly
Search WWH ::




Custom Search