8
432 Chapter 12: Animation
Theposewhenallthejointanglesassume
pref erred angles is particularly important. Let’s
call it the prefer red pose.
Weusethesolverplaneatthepreferredposeasthe
horizontal plane. Since the swivel angle is used to
control the start joint, the preferred angles a t the
start joint are not so intrinsic. It is a lso reasonable
to define the horizontal plane w ith the solver plane
that is derived by assigning zeroes to the star t joint
and preferred angles to the other joints.
TheEEaxisdefinesthemeridian. Thesphereis
now defined as shown in the following fi g ure:
1. EE axis
All the joints assume preferred angles. The Zero
Plane Map is to be defined on this sphere.
TheAPIfortheplug-insolvertodefineitsown
Zero Plane Map in fac t ta kes the EE axis and the
normal to the solver plane at the preferred pose:
virtual const IKSys::ZeroPlaneMap*
GetZeroPlaneMap(const Point3& a0,
const Point3& n0) const
where
a0
and
n0
are the EE axis and solver plane
at the preferred pose, respectively. Object of
ZeroPlaneMap is a function that assigns a plane
normal to each point on the sphere.
Defa ult Zero Pla ne M ap
When not provided by plug-in solvers, (the IK
Solver itself is implemented as a plug-in solver) the
IK system wil l provide a default one. This map is
defined by the following rules:
• A: For each point on the equator, the
intersection of the horizontal plane and the
sphere, the normal vector is defined as the
vertical vector , pointing to the same direction as
thenormalofthesolverplaneatthepreferred
pose.
• B: For any point on t he sphere other than the
north or south poles, there is a great circle that
passes the point and the north, south poles.
This circle hits the equator at two p oints. One
point is closer to the given point. The normal
vector at the given point is defined as derived
from moving tangentially the normal at the
closer point on the equator a long the great
circle to the point.
Deriving the default normal to the zero plane
Obviously, this method won’t extend to the north
or south poles. They are the singular points. When
the EE axis moves across the poles, the normal will
suddenly change direction: it flips from the users’
view point.