「ゲームプログラミング/3Dグラフィック」の版間の差分

削除された内容 追加された内容
947 行
 
 
y軸を中心にした回転(公転)の場合、x軸成分とz軸成分とが移動するので、式は
:<math> \begin{pmatrix}
\cos \theta & - \sin \theta \\
\sin \theta & \cos \theta
\end{pmatrix}
 
\begin{pmatrix} x \\ z \end{pmatrix}
= x \begin{pmatrix} \cos \theta
\\ \sin \theta \end{pmatrix}
 
+
 
z \begin{pmatrix} - \sin \theta
\\ \cos \theta \end{pmatrix}
</math>
になる。
 
<syntaxhighlight lang="c">