回転行列

提供: miniwiki
移動先:案内検索

線型代数において、回転行列(かいてんぎょうれつ、: rotation matrix)とは、ユークリッド空間内における原点中心の回転変換の表現行列のことである。

二次元や三次元では、幾何学物理学コンピュータグラフィックスの分野での計算に非常によく使われている。大半の応用で扱うのは2次元や3次元の回転だが、一般の次元でも回転行列を定義することができる。

n 次元空間における回転行列は、実数を成分とする正方行列であって、行列式が 1 の n直交行列として特徴づけられる:

[math]{}^t\!R =R^{-1} ,\;\det R=1.[/math]

n 次元の回転行列の全体は特殊直交群(あるいは回転群)と呼ばれるをなす。

2次元の回転行列

ユークリッド空間の2次元空間では、原点中心の θ 回転(反時計回りを正とする)の回転行列は、以下の形で表すことができる。

[math]R(\theta )=\begin{bmatrix} \cos \theta &-\sin \theta \\ \sin \theta &\cos \theta \\ \end{bmatrix}[/math]

なぜならば、原点中心に θ 回転して点 (x, y) が (x ', y ') に写るとすると、図形的考察または三角関数加法定理より、x ', y ' は以下のように表されることが分かる。

[math]x'=x\cos \theta -y\sin \theta[/math]
[math]y'=x\sin \theta +y\cos \theta[/math]

このことを行列の積で表すと、

[math] \begin{bmatrix} x' \\ y' \end{bmatrix} = \begin{bmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \\ \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} [/math]

となるからである。

逆の回転は、回転角が −θ になるだけなので、

[math] R(-\theta )=\begin{bmatrix} \cos (-\theta) & -\sin (-\theta) \\ \sin (-\theta) & \cos (-\theta) \\ \end{bmatrix} = \begin{bmatrix} \cos \theta & \sin \theta \\ -\sin \theta & \cos \theta \\ \end{bmatrix}[/math]

となる。

3次元の回転行列

各軸周りの回転

3次元空間でのx軸、y軸、z軸周りの回転を表す回転行列は、それぞれ次の通りである:

[math] R_x (\theta )=\begin{bmatrix} 1 &0 &0 \\ 0 &\cos \theta &-\sin \theta \\ 0 &\sin \theta &\cos \theta \\ \end{bmatrix} [/math]
[math] R_y (\theta )=\begin{bmatrix} \cos \theta &0 &\sin \theta \\ 0 & 1 & 0 \\ -\sin \theta &0 &\cos \theta \\ \end{bmatrix} [/math]
[math] R_z (\theta )=\begin{bmatrix} \cos \theta &-\sin \theta &0 \\ \sin \theta &\cos \theta &0 \\ 0 &0 &1 \end{bmatrix} [/math]

ここで回転の方向は、[math]R_x[/math]y軸をz軸に向ける方向、[math]R_y[/math]z軸をx軸に向ける方向、[math]R_z[/math]x軸をy軸に向ける方向である。

一般の回転

他の回転行列も、これら3つの各軸周りの回転行列 [math]R_x,R_y,R_z[/math] の積によって得ることができる。 例えば、次の積

[math]R_z (\gamma ) R_x (\beta ) R_y (\alpha )[/math]

は、yxz系で表したときのオイラー角α, β, γ であるような回転を表す。

任意の軸周りの回転

任意の単位軸周りの回転行列はロドリゲスの回転公式で表すことができる。 単位ベクトル[math]\mathbf{n}=(n_x,n_y,n_z)[/math]を軸に回転する行列は

[math] R_\mathbf{n} (\theta )=\begin{bmatrix} \cos\theta + n_{x}^{2} \left( 1- \cos\theta \right) & n_{x}n_{y} \left( 1- \cos\theta \right) - n_{z} \sin\theta & n_{x}n_{z} \left( 1- \cos\theta \right) + n_{y} \sin\theta \\ n_{y}n_{x} \left( 1- \cos\theta \right) + n_{z} \sin\theta &\cos\theta + n_{y}^{2} \left( 1- \cos\theta \right) &n_{y}n_{z} \left( 1- \cos\theta \right) - n_{x} \sin\theta \\ n_{z}n_{x} \left( 1- \cos\theta \right) - n_{y}\sin\theta & n_{z}n_{y} \left( 1- \cos\theta \right) + n_{x}\sin\theta &\cos\theta + n_{z}^{2}\left( 1- \cos\theta \right) \\ \end{bmatrix} [/math]

となる。

関連項目

外部リンク