I'm learning about inverse kinematics, and am trying to write a human skeleton simulation. I am having trouble deciding how to parameterize the rotation of a ball-and-socket joint.
Two methods that I can think of:
- The familiar axis-angle (or Euler angle) way. Can change the characteristics of the joint by changing the order of rotation. Can also just use rotation matrices.
- Using two quaternion rotations, one along the axis of the bone, and one to determine the orientation. I think this is more intuitive in terms of simulating the joint.
So which one should I use? As far as I can make out:
- The axis-angle method is prone to gimbal-lock, which I can visualize
- For the other method it is ambiguous as to which axes should be used when calculating the Jacobian entries - the
v
vector thing in this equation
(source: https://www.math.ucsd.edu/~sbuss/ResearchWeb/ikmethods/iksurvey.pdf, page 5)
I'm inclined to use the second method as I can get around the problem by using CCD instead of Jacobian pseudo-inverses. But I would just like to know which of these methods is used as standard (axis-angle or quaternions), and if so, what are the particular details I need to take into account if I were to adopt it.
Any advice would be helpful, but preferably professional, and in a non-esoteric language should you be kind enough to spare some code :-]