Viewing transformation
-
Upload
udayan-gupta -
Category
Technology
-
view
721 -
download
2
Transcript of Viewing transformation
8/7/2011
Good for mapping objects from one coordinate system
to another
This is what we do with windows and viewports
8/7/2011 2
Model of objectsworld coordinates: km, mm, etc.
hierarchical models:
human = torso + arm + arm + head + leg + leg
arm = upperarm + lowerarm + hand …
Viewingzoom in, move drawing, etc.
8/7/2011
8/7/2011
Viewport:
Area on screen to be used for drawing.
Unit: pixels (screen coordinates)
Note: y-axis often points down
Window:
Virtual area to be used by application
Unit: km, mm,… (world coordinates)
(0,0)
(800,600)
(200,200)
(600,400)
(-2,-1)
(2,1)
8/7/2011
8/7/2011
8/7/2011
Determine a matrix M, such that the window (wx1, wx2, wy1, wy2) is mapped on the viewport (vx1, vx2, vy1, vy2):
A = T(-wx1, -wy1)
B = S(1/(wx2-wx1), 1/(wy2-wy1)) A
C = S(vx2-vx1 ,vy2-vy1)B
M = T(vx1, vy1) C
8/7/2011
8/7/2011
8/7/2011
8/7/2011
8/7/2011
),(minmin yx
),(maxmax vu
),(minmin vu
),(maxmax yx
8/7/2011
8/7/2011
yyvv
xxuu
yx
vu
xx
y
x
y
x
minmax
minmax
minmax
minmax
min
min
min
min
,where
1100
10
01
100
00
00
100
10
01
,
8/7/2011
8/7/2011
8/7/2011
8/7/2011
8/7/2011
8/7/2011
8/7/2011
8/7/2011
8/7/2011
8/7/2011