edited by
5,473 views
2 votes
2 votes

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

  1. $x=4,y=4$
  2. $x=3,y=3$
  3. $x=8,y=7.25$
  4. $x=3,y=4$
edited by

1 Answer

4 votes
4 votes

The above question has the following answer:-

The answer is option C). This is how we arrive at the answer.

We are asked to find the coordinates of the view port. The information is given to fix the coordinates from that of the window to the view port..

Following information is given:-

$(X_{wmin},Y_{wmin})=(0,0)$

Point $(X_w,Y_w)=(20,15)$

$(X_{wmax},Y_{wmax})=(100,100)$

$(X_{vmin},Y_{vmin})=(5,5)$

$(X_{vmax},Y_{vmax})=(20,20).$

We have to find the value of $(X_v,Y_v).$

The following formula is used:-

$\frac{X_v-X_{vmin}}{X_{vmax}-X_{vmin}}=\frac{X_w-X_{wmin}}{X_{wmax}-X_{wmin}}$ (for $X_v$coordinate)

$\frac{Y_v-Y_{vmin}}{Y_{vmax}-Y_{vmin}}=\frac{Y_w-Y_{wmin}}{Y_{wmax}-Y_{wmin}}$(for $Y_v$ coordinate)

Now substitute the values in the equation and the answer evaluates to option c) which is $(X_v,Y_v)=(8,7.25)$

edited by
Answer:

Related questions

3 votes
3 votes
2 answers
2
Arjun asked Apr 22, 2018
3,768 views
The difference between a named pipe and a regular file in Unix is thatUnlike a regular file, named pipe is a special fileThe data in a pipe is transient, unlike the conte...
1 votes
1 votes
2 answers
4
Arjun asked Apr 22, 2018
5,239 views
The Functions Point (FP) metric isCalculated from user requirementCalculated from lines of codeCalculated from software complexity assessmentNone of the above