Perform window to viewport transformation for the point Assume that
2018
Perform window to viewport transformation for the point (20, 15). Assume that (Xwmin, Ywmin) is (0,0); (Xwmax, Ywmax) is (100,100); (Xvmin, Yvmin) is (5,5); (Xvmax, Yvmax) is (20,20). The value of x and y in the viewport is
- A.
x = 4 , y = 4
- B.
x = 3 , y = 3
- C.
x = 8 , y = 7.25
- D.
x = 3 , y = 4
Attempted by 10 students.
Show answer & explanation
Correct answer: C
Use the window-to-viewport transformation formulas. For x-coordinate: xv = 5 + (20 - 0) * ((20 - 5) / (100 - 0)) = 8. For y-coordinate: yv = 5 + (15 - 0) * ((20 - 5) / (100 - 0)) = 7.25. The resulting viewport coordinates are (8, 7.25).