一、欧拉角到矩阵
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 = [ c o s B c o s A s i n C s i n B c o s A − c o s C s i n A c o s C s i n B c o s A + s i n C s i n A 0 c o s B s i n A s i n C s i n B s i n A + c o s C c o s A c o s C s i n B s i n A − s i n C c o s A 0 − s i n B s i n C c o s B c o s C c o s B 0 0 0 0 1 ] 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}