Interpolating between rotation matrices

落爺英雄遲暮 提交于 2019-11-26 19:06:39
Ali

Use quaternions (SLERP). Neither rotation matrices nor Euler angles are appropriate for interpolation.

See 45:05 here (David Sachs, Google Tech Talk).

My personal opinion is that using quaternions for this type of thing makes more sense. That said, you can do it without using quaternions.

The thing to notice is that the "difference" matrix, that is, the matrix which takes "orientation" A into "orientation" B can be calculated by T = A.tranpose() * B (considering you are multiplying on the right). Once you have the rotation matrix T, you can convert to Axis-Angle representation (see for instance http://en.wikipedia.org/wiki/Axis-angle_representation).

Finally, since you know a rotation axis which takes A to B, you can linearly interpolate the angles from zero to the angle previously calculated from T.

This is equivalent to using SLERP.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!