ぱたへね

はてなダイアリーはrustの色分けができないのでこっちに来た

ロール・ピッチ・ヨー

Z軸まわりの回転φ(ロール)、新しいY軸まわりの回転θ(ピッチ)、新しいX軸まわりの回転ψ(ヨー)の3段階の回転で実現できる。写真から作る3次元CGでは、最後の回転がZになっています。これだとオイラー角と同じなので、最後はXが正しい。

 R=R(Z,\phi )R(Y,\theta )R(X,\psi )=\begin{pmatrix} \cos \phi  & -\sin \phi  & 0 \\ \sin \phi  & \cos \phi  & 0 \\ 0 & 0 & 1 \end{pmatrix} \begin{pmatrix} \cos \theta  & 0 & \sin \theta  \\ 0 & 1 & 0 \\ -\sin \theta  & 0 & \cos \theta \end{pmatrix} \begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos \psi  & -\sin \psi  \\ 0 & \sin \psi  & \cos \psi \end{pmatrix}