# #StackBounty: #3d Building view transform matrices

### Bounty: 50

For a 3D scene in the World Coordinates, its View Reference Point (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 VRP is the origin, the line joining 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:

1 0 0 -5

0 1 0 2

0 0 1 -1

0 0 0 1

Using the unit vectors of the coordinate axes, the resulting rotation matrix is:

-0.6 -0.8 0 0

0 0 0 1

-0.8 0.6 0 0

0 0 0 1

Then the final matrix (the final answer for full marks) would be the rotation matrix multiplied by the translation matrix:

-0.6 -0.8 0 1.4

0 0 0 1

-0.8 0.6 0 5.2

0 0 0 1

Is my method and final answer correct?

Get this bounty!!!