# Perspective Transformation

$\M{P}=\begin{bmatrix} \frac{1}{r \tan\alpha/2} & 0 & 0 & 0 \\ 0 & \frac{1}{\tan\alpha/2} & 0 & 0 \\ \phantom{\frac{}{}}0 & 0 & \frac{n+f}{n-f} & \frac{2\,n\,f}{n-f} \\ \phantom{\frac{}{}}0 & 0 & -1 & 0 \\ \end{bmatrix}$
• $\alpha$ is the field of view
• $r$ is the aspect ratio
• $n$ is the near distance
• $f$ is the far distance