Page 102 - DCAP504_Computer Graphics
P. 102
Unit 7: 2-D Viewing
This proportionality has been discussed with the help of figure 7.5.
Figure 7.5: Mapping Proportionality
The proportionality depicted in the figure above must be equal in the following ratios.
xv − xv min = xw − xw min …………….. Eq.(7.1)
xv max − xv min xw max − xw min
Equation 7.1 indicates that mapping of object is equal in x axis of both the world coordinate and the
viewport coordinate.
yv − yv min = yw − yw min
yv max − yv min yw max − yw min ……………..Eq.(7.2)
Equation 7.2 indicates that mapping of object is equal in y axis of both the world coordinate and the
viewport coordinate.
After solving both equations 7.1 and 7.2 for the unknown viewport position (xv, yv), equations 7.3 and
7.4 become true:
xv = S x xw + t ……………………….Eq.(7.3)
x
yv = S y yw + t y ………………………Eq.(7.4)
LOVELY PROFESSIONAL UNIVERSITY 95