0.はじめに
大学で線形代数の講義を受講している者です。
ざっくりと計算方法を個人的な備忘録としてまとめております。
関連学習
【線形代数】ベクトル
【線形代数】行列
【線形代数】連立方程式
【線形代数】線形空間・線形写像
【線形代数】座標
【線形代数】固有値・固有ベクトル
座標
ここでは平面座標、同時座標、空間の3つの観点から計算式を考える
1.平面
平面移動
\begin{pmatrix}
x'\\
y'\\
\end{pmatrix}\,\,\, =
\begin{pmatrix}
x\\
y\\
\end{pmatrix}
+
\begin{pmatrix}
t_x\\
t_y\\
\end{pmatrix}
拡大縮小
\begin{pmatrix}
x'\\
y'\\
\end{pmatrix}\,\,\, =
\begin{pmatrix}
S_x & 0\\
0 & S_y\\
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
\end{pmatrix}
回転
反時計回りにΘ度回転させた時の座標(x',y')
時計回りの場合はΘをマイナスに変えて計算する
\begin{pmatrix}
x'\\
y'\\
\end{pmatrix}\,\,\, =
\begin{pmatrix}
\cos\Theta & -\sin\Theta\\
\sin\Theta & \cos\Theta\\
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
\end{pmatrix}
対称移動
直線y = axに対する対称移動
\begin{pmatrix}
x'\\
y'\\
\end{pmatrix}\,\,\, =
\frac{1}{a^2+1}
\begin{pmatrix}
1-a^2 & 2a\\
2a & a^2-1\\
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
\end{pmatrix}
軸ごとの対称移動
x軸に対する対称移動
\begin{pmatrix}
x'\\
y'\\
\end{pmatrix}\,\,\, =
\begin{pmatrix}
1 & 0\\
0 & -1\\
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
\end{pmatrix}
y軸に対する対称移動
\begin{pmatrix}
x'\\
y'\\
\end{pmatrix}\,\,\, =
\begin{pmatrix}
-1 & 0\\
0 & 1\\
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
\end{pmatrix}
z軸に対する対称移動
\begin{pmatrix}
x'\\
y'\\
\end{pmatrix}\,\,\, =
\begin{pmatrix}
-1 & 0\\
0 & -1\\
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
\end{pmatrix}
逆変換
\begin{pmatrix}
x\\
y\\
\end{pmatrix}\,\,\, =A^⁻¹
\begin{pmatrix}
x'\\
y'\\
\end{pmatrix}
合成変換
平面座標の応用
点Pを直線lの対称移動をしたい場合、3つの工程に分けて考える
2.同時座標
平面上の座標を列ベクトルとして表すもの
同時座標を用いることで平面上の座標移動を一次変換方式で表すことが可能
公式は平面座標に次元が増えたものなので比較的理解しやすい
平行移動
\begin{pmatrix}
x'\\
y'\\
1
\end{pmatrix}\,\,\, =
\begin{pmatrix}
1 & 0 & t_x\\
0 & 1 & t_y\\
0 & 0 & 1\\
\end{pmatrix}
+
\begin{pmatrix}
x\\
y\\
1\\
\end{pmatrix}
拡大縮小
\begin{pmatrix}
x'\\
y'\\
1
\end{pmatrix}\,\,\, =
\begin{pmatrix}
S_x & 0 & 0\\
0 & S_y & 0\\
0 & 0 & 1\\
\end{pmatrix}
+
\begin{pmatrix}
x\\
y\\
1\\
\end{pmatrix}
回転
\begin{pmatrix}
x'\\
y'\\
1
\end{pmatrix}\,\,\, =
\begin{pmatrix}
\cos\Theta & -\sin\Theta & 0\\
\sin\Theta & \cos\Theta & 0\\
0 & 0 & 1\\
\end{pmatrix}
+
\begin{pmatrix}
x\\
y\\
1\\
\end{pmatrix}
対称移動
\begin{pmatrix}
x'\\
y'\\
1
\end{pmatrix}\,\,\, =
\begin{pmatrix}
\cos2\Theta & \sin2\Theta & 0\\
\sin2\Theta & -\cos2\Theta & 0\\
0 & 0 & 1\\
\end{pmatrix}
+
\begin{pmatrix}
x\\
y\\
1\\
\end{pmatrix}
直線y = axに対しての対称移動
\begin{pmatrix}
x'\\
y'\\
1
\end{pmatrix}\,\,\, =
\frac{1}{a^2+1}
\begin{pmatrix}
1-a^2 & 2a & 0\\
2a & a^2-1 & 0\\
0 & 0 & a^2+1\\
\end{pmatrix}
+
\begin{pmatrix}
x\\
y\\
1\\
\end{pmatrix}
3.空間上
平行移動
\begin{pmatrix}
x'\\
y'\\
z'
\end{pmatrix}\,\,\, =
\begin{pmatrix}
x\\
y\\
z\\
\end{pmatrix}\,\,\, +
\begin{pmatrix}
t_x\\
t_y\\
t_z\\
\end{pmatrix}
拡大縮小
\begin{pmatrix}
x'\\
y'\\
z'
\end{pmatrix}\,\,\, =
\begin{pmatrix}
S_x & 0 & 0\\
0 & S_y & 0\\
0 & 0 & S_z\\
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
z\\
\end{pmatrix}
回転
Θごとに値を変えて利用する
x軸回りの90°の回転移動の場合
\begin{pmatrix}
x'\\
y'\\
z
\end{pmatrix}\,\,\, =
\begin{pmatrix}
1 & 0 & 0\\
0 & \cos90° & -\sin90°\\
0 & \sin90° & \cos90°\\
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
z\\
\end{pmatrix}
y軸回りの45°の回転移動の場合
\begin{pmatrix}
x'\\
y'\\
z
\end{pmatrix}\,\,\, =
\begin{pmatrix}
\cos45° & 0 & \sin45°\\
0 & 1 & 0\\
-\sin45° & 0 & \cos45°\\
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
z\\
\end{pmatrix}
z軸回りの-90°の回転移動の場合
\begin{pmatrix}
x'\\
y'\\
z
\end{pmatrix}\,\,\, =
\begin{pmatrix}
\cos(-90°) & -\sin(-90°) & 0\\
\sin(-90°) & \cos(-90°) & 0\\
0 & 0 & 1\\
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
z\\
\end{pmatrix}
対称移動
空間上の点の座標を列ベクトルx,y,zで表す場合、それぞれの兵権に対しての対称移動は以下となる
xy平面に対しての対称移動
\begin{pmatrix}
x'\\
y'\\
z
\end{pmatrix}\,\,\, =
\begin{pmatrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 & -1\\
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
z\\
\end{pmatrix}
yz平面に対しての対称移動
\begin{pmatrix}
x'\\
y'\\
z
\end{pmatrix}\,\,\, =
\begin{pmatrix}
-1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 & 1\\
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
z\\
\end{pmatrix}
zx平面に対しての対称移動
\begin{pmatrix}
x'\\
y'\\
z
\end{pmatrix}\,\,\, =
\begin{pmatrix}
1 & 0 & 0\\
0 & -1 & 0\\
0 & 0 & 1\\
\end{pmatrix}
\begin{pmatrix}
x\\
y\\
z\\
\end{pmatrix}