Computer Graphics
A normalized matrix that maps a 3D window specified by coordinates (1, 1, 1) and (4, 5, 6) on to a viewport specified by coordinates (2, 4, 2) and (8, 10, 8) is
1. \(\begin{bmatrix} 2 & 0 & 0 & 0 \\ 0 & \frac{3}{2} & 0 & \frac{5}{2} \\ 0 & 0 & \frac{6}{5} & \frac{4}{5} \\ 0 & 0 & 0 & 1 \end{bmatrix}\) ✓ Correct
2. \(\begin{bmatrix} 2 & 0 & 0 & 0 \\ 0 & 3 & 0 & 5 \\ 0 & 0 & 6 & 4 \\ 0 & 0 & 0 & 1 \end{bmatrix}\)
3. \(\begin{bmatrix} 2 & 1 & 0 & 1 \\ 1 & 3 & 4 & 5 \\ 0 & 0 & 2 & 4 \\ 0 & 1 & 0 & 0 \end{bmatrix}\)
4. \(\begin{bmatrix} 1 & 0 & 0 & 1 \\ 2 & 3 & 0 & 5 \\ 1 & 0 & 4 & 5 \\ 0 & 0 & 0 & 1 \end{bmatrix}\)
Show Solution
Solution
The correct answer is [ 2 0 0 0; 0 3/2 0 5/2; 0 0 6/5 4/5; 0 0 0 1 ] .
Key Points
Window → Viewport transformation in 3D uses scaling followed by translation.
General transformation: Xv = Sx·Xw + Tx, Yv = Sy·Yw + Ty, Zv = Sz·Zw + Tz.
Scaling: S = (Viewport range)/(Window range).
Step-by-Step Solution
Step 1: Window limits
Wmin = (1,1,1), Wmax = (4,5,6)
Step 2: Viewport limits
Vmin = (2,4,2), Vmax = (8,10,8)
Step 3: Compute scaling
Sx = (8−2)/(4−1) = 6/3 = 2
Sy = (10−4)/(5−1) = 6/4 = 3/2
Sz = (8−2)/(6−1) = 6/5
Step 4: Compute translation
Tx = xvmin − Sx·xwmin = 2 − 2(1) = 0
Ty = yvmin − Sy·ywmin = 4 − (3/2)(1) = 5/2
Tz = zvmin − Sz·zwmin = 2 − (6/5)(1) = 4/5
Step 5: Final normalized matrix
\(\begin{bmatrix} 2 & 0 & 0 & 0 \\ 0 & \frac{3}{2} & 0 & \frac{5}{2} \\ 0 & 0 & \frac{6}{5} & \frac{4}{5} \\ 0 & 0 & 0 & 1 \end{bmatrix}\)
Additional Information
Scaling adjusts size; translation shifts position.
Homogeneous matrices combine both operations efficiently.
📄 All “Computer Graphics” questions across papers