SLIDE 4 4
W indow to View port Mapping ( Our W ay)
L V R V L V Sx L W R W L W x . . . . . ) . ( − − = − −
B V T V B V Sy B W T W B W y . . . . . ) . ( − − = − −
Solve for S x, Sy in t er m s of x , y :
− − − − − − = L V L W L W R W L V R V x L W R W L V R V Sx . . . . . . . . . . − − − − − − = B V B W B W T W B V T V y B W T W B V T V Sy . . . . . . . . . .
W indow to View port Mapping ( Our W ay)
Solve, given t he form ulas:
− − − − − − = L V L W L W R W L V R V x L W R W L V R V Sx . . . . . . . . . . − − − − − − = B V B W B W T W B V T V y B W T W B V T V Sy . . . . . . . . . . ) 2 , , 4 , ( ) . , . , . , . ( = = T W B W R W L W W
What is ( S x, Sy) for point ( 3.4,1.2) in world coordinat es if:
) 240 , 80 , 380 , 60 ( ) . , . , . , . ( = = T V B V R V L V V
W indow to View port Mapping ( Our W ay)
Solution:
− − − − − − = L V L W L W R W L V R V x L W R W L V R V Sx . . . . . . . . . . − − − − − − = B V B W B W T W B V T V y B W T W B V T V Sy . . . . . . . . . . 332 60 80 = + = x Sx 176 80 80 = + = x Sy
Hence, point ( 3.4,1.2) in world = point ( 332,176) on screen
More W - t o-V Mapping
Zoom ing: in on a port ion of obj ect Tiling: W-t o-V in loop, adj acent viewports Flipping drawings
- Mapping different window and viewport aspect ratios
( W/ H)
Window Viewport I m portant: Please read on your own, section 3.2.2 on pg. 92 of Hill