An Inverse Kinematics Algorithm for Posture Control in Real-Time Human Motion Synthesis