Advertisement

欧拉角四元数与矩阵转换

阅读量:

欧拉角四元数与矩阵转换

  • 一、欧拉角到矩阵
  • 二、四元数到矩阵

一、欧拉角到矩阵

A rotates around the Z axis, B rotates around the Y axis, and C rotates around the X axis. The elements of the rotation matrix can be computed by using.
R = \begin{bmatrix} cosBcosA & sinCsinBcosA−cosCsinA & cosCsinBcosA+sinCsinA & 0\\ cosBsinA & sinCsinBsinA+cosCcosA & cosCsinBsinA−sinCcosA & 0\\ −sinB & sinCcosB & cosCcosB & 0\\ 0 & 0 & 0 & 1 \end{bmatrix}

二、四元数到矩阵

q =(a,b,c,w)^T , ||q||=1 The corresponding rotation matrix and translation vector are defined by
R = 2\begin{bmatrix} \frac{1}{2}-b^2-c^2 & ab-cw & ac+bw & 0\\ ab+cw & \frac{1}{2}-a^2-c^2 & bc -aw & 0\\ ac-bw & ac+aw & \frac{1}{2}-a^2-b^2 & 0\\ 0 & 0 & 0 & 1 \end{bmatrix}

全部评论 (0)

还没有任何评论哟~