For a 3D scene in the world coordinates, its View Reference Point $\mathrm{VRP}$ is at $(5,-2,1)$, and a viewer is looking towards point $A=(1,1,1)$. Construct a transform matrix which will map world coordinate points to a right-handed $(UVN)$ viewing space, so that $\mathrm{VRP}$ is the origin, the line joining $\mathrm{VRP}$ to $A$ is the positive $N$ axis, and the view-up Vector is $(0,0,1)$.
To my knowledge, the final answer should be a single transform matrix. To calculate the final matrix, I first find the matrix which translates the coordinate system to the to the origin in homogeneous matrix form:
Translation matrix:
$$ T= \begin{bmatrix} 1 &0 &0 &-5 \\ 0 &1 &0& 2 \\ 0 &0 &1 &-1 \\ 0 &0 &0 &1 \\ \end{bmatrix} $$
Using the unit vectors of the coordinate axes, the resulting rotation matrix is:
$$ R= \begin{bmatrix} -0.6 &-0.8 &0 &0 \\ 0 &0 &0 &1 \\ -0.8 &0.6 &0 &0 \\ 0 &0 &0 &1 \\ \end{bmatrix} $$ Then the final matrix (the final answer for full marks) would be the rotation matrix multiplied by the translation matrix:
$$ M= \begin{bmatrix} -0.6 &-0.8 &0 &1.4 \\ 0 &0 &0 &1 \\ -0.8 &0.6 &0 &5.2 \\ 0 &0 &0 &1 \\ \end{bmatrix} $$ Is my method and final answer correct?
Following the answer to this question, I have calculated the translation matrix:
$$ T= \begin{pmatrix} 1 & 0 & 0 & -5 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 1 & -1 \\ 0 & 0 & 0 & 1 \\ \end{pmatrix} $$
I have calculated the rotation matrix:
$$ R= \begin{pmatrix} -0.6 & -0.8 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ -0.8 & 0.6 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ \end{pmatrix} $$
But what would the final transformation matrix $M$ be? My lecture slides tell me it would be rotation matrix multiplied by translation matrix, with the last column multiplied by $-1$ except for the $1$. This would equal:
$$ M = R \times T = \begin{pmatrix} -0.6 & -0.8 & 0 & -1.4 \\ 0 & 0 & 1 & 1 \\ -0.8 & 0.6 & 0 & -5.2 \\ 0 & 0 & 0 & 1 \\ \end{pmatrix} $$
But the answer here just adds them together somehow. Which one is correct?