|
|
@@ -817,7 +817,9 @@ M^{(4\times4)}_{persp \rightarrow ortho}
|
|
|
\begin{pmatrix}
|
|
|
nx \\ ny \\ n^2 \\ n
|
|
|
\end{pmatrix}
|
|
|
-\\
|
|
|
+$$
|
|
|
+
|
|
|
+$$
|
|
|
设M^{(4\times4)}_{persp \rightarrow ortho}第三行为
|
|
|
\begin{pmatrix}
|
|
|
A & B & C & D
|
|
|
@@ -829,9 +831,13 @@ M^{(4\times4)}_{persp \rightarrow ortho}
|
|
|
\begin{pmatrix}
|
|
|
x \\ y \\ n \\ 1
|
|
|
\end{pmatrix} = n^2
|
|
|
-\\
|
|
|
+$$
|
|
|
+
|
|
|
+$$
|
|
|
得到A=0, B=0, C*n + B = n^2
|
|
|
-\\
|
|
|
+$$
|
|
|
+
|
|
|
+$$
|
|
|
M^{(4\times4)}_{persp \rightarrow ortho}
|
|
|
\begin{pmatrix}
|
|
|
0 \\ 0 \\ f \\ 1
|
|
|
@@ -842,9 +848,13 @@ M^{(4\times4)}_{persp \rightarrow ortho}
|
|
|
\begin{pmatrix}
|
|
|
0 \\ 0 \\ f^2 \\ f
|
|
|
\end{pmatrix}
|
|
|
-\\
|
|
|
+$$
|
|
|
+
|
|
|
+$$
|
|
|
带入前面推理(0, 0, C, D)式子中,得到 Cf + D = f^2
|
|
|
-\\
|
|
|
+$$
|
|
|
+
|
|
|
+$$
|
|
|
\begin{matrix}
|
|
|
Cn + D = n^2 \\
|
|
|
Cf + D = f^2
|
|
|
@@ -854,7 +864,9 @@ M^{(4\times4)}_{persp \rightarrow ortho}
|
|
|
C = n + f \\
|
|
|
D = -nf
|
|
|
\end{matrix}
|
|
|
-\\
|
|
|
+$$
|
|
|
+
|
|
|
+$$
|
|
|
M^{(4\times4)}_{persp \rightarrow ortho} =
|
|
|
\begin{pmatrix}
|
|
|
n & 0 & 0 & 0 \\
|