0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

2次元で座標を回転させる

Last updated at Posted at 2022-01-10

概論

座標(x,y)は、複素数で $x+jy$ で表すことできる。

$x+jy$ から $\theta$ [rad]回転させるには、 $e^{jθ}$ をかければよい。

$e^{jθ}=cosθ+jsinθ$ である。
また、

\begin{align}
&cosθ+jsinθ \equiv \;\; 
\end{align}
\begin{pmatrix}
cosθ & -sinθ   \\
sinθ & cosθ
\end{pmatrix}

である。

したがって、
複素数の場合は $(cosθ+ jsinθ)$ を、
行列の場合は

\begin{pmatrix}
cosθ & -sinθ   \\
sinθ & cosθ
\end{pmatrix}

を用いればよい。

※3次元の場合は、クォータニオン(四元数)や行列を使って回転させる。

虚数単位

$x^2+1=0$を解くと、$x=±\sqrt-1$となる。
この$\sqrt-1$を虚数単位として、jで表す。
$j^2 = -1$となる。

(-1)をかけることは反時計回りに180度回転である。
$j^2 = -1$であるから、jをかけることは反時計回りに90度回転である。
jを使うことで、2次元を扱うことができる。

1に当たる行列

5 × 1 = 5である。

行列の場合で考えると

\begin{pmatrix}
a & b \\
c & d 
\end{pmatrix}
\times
\begin{pmatrix}
1 & 0 \\
0 & 1 
\end{pmatrix}
=
\begin{pmatrix}
a & b \\
c & d 
\end{pmatrix}

である。

ゆえに、次の行列は1に相当する。

\begin{pmatrix}
1 & 0 \\
0 & 1 
\end{pmatrix}

-1に当たる行列

(-1)×1 = (-1)である

行列の場合で考えると

(-1)
\times
\begin{pmatrix}
1 & 0 \\
0 & 1 
\end{pmatrix}
=
\begin{pmatrix}
-1 & 0 \\
0 & -1 
\end{pmatrix}

である。

ゆえに、次の行列は(-1)に相当する。

\begin{pmatrix}
-1 & 0 \\
0 & -1 
\end{pmatrix}

jに当たる行列

$j×j = (-1)$である。

行列の場合で考えると


\begin{pmatrix}
0 & -1 \\
1 & 0 
\end{pmatrix}
\times
\begin{pmatrix}
0 & -1 \\
1 & 0 
\end{pmatrix}
=
\begin{pmatrix}
-1 & 0 \\
0 & -1 
\end{pmatrix}

である。

ゆえに、次の行列は$j$に相当する。

\begin{pmatrix}
0 & -1 \\
1 & 0 
\end{pmatrix}

複素数

複素数$x+jy$は、$x×1;+;y×j$である。

行列で考えると

x
\times
\begin{pmatrix}
1 & 0 \\
0 & 1 
\end{pmatrix}
+ \; y
\times
\begin{pmatrix}
0 & -1 \\
1 & 0 
\end{pmatrix}
=
\begin{pmatrix}
x & -y \\
y & x 
\end{pmatrix}

である。

ゆえに、次の行列は複素数$x+jy$に相当する。

\begin{pmatrix}
x & -y \\
y & x 
\end{pmatrix}

回転の例

例1

$2+j3$ を45度反時計回りに回転させる。

2+j3.jpg

<計算>
(1) 45度
180度がπ [rad]だから、45度は$\frac{4}{π}$ [rad]である。
(2) 回転させる
$(2+j3) \times ; e^{\frac{4}{π}}$
$=;(2+j3) \times (cos({\frac{4}{π}}) + jsin({\frac{4}{π}}))$
$\fallingdotseq -0.71 + j3.5$

45度回転.jpg

例2

$2+j3$ を60度反時計回りに回転させる。

<計算>
(1) 60度
180度がπ [rad]だから、60度は$\frac{3}{π}$ [rad]である。
(2) 回転させる
$(2+j3) \times ; e^{\frac{3}{π}}$
$=;(2+j3) \times (cos({\frac{3}{π}}) + jsin({\frac{3}{π}}))$
$\fallingdotseq -1.6 + j3.2$

60度回転.jpg

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?