ISRO Scientist/Engineer CSE 2018Computer Graphics and Multimedia › Not yet assigned to a topic
ISRO Scientist/Engineer CSE 2018 PYQ: Perform window to viewport transformation for the point (20,15). Assume that $(X_{wmin}\ ,Y_{wmin} )$ is…
Perform window to viewport transformation for the point (20,15). Assume that $(X_{wmin}\ ,Y_{wmin} )$ is $(0,0)$ ; $(X_{wmax}\ ,Y_{wmax} )$ is $(100,100)$ ; $(X_{vmin}\ ,Y_{vmin} )$ is $(5,5)$ ; $(X_{vmax}\ ,Y_{vmax} )$ 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$Correct answer
- D$x=3,y=4$
Answer
(C) $x=8,y=7.25$
Approach
Use the standard window-to-viewport linear mapping. Each viewport coordinate is obtained by scaling the window coordinate relative to the window's min/max and then shifting by the viewport's min. Apply the same formula independently to x and y.
Reviewed by ISRO IQ Editorial Team.