Viewing Transformations5/18/2010
Good for mapping objects from one coordinate system to anotherThis is what we do with windows and viewports5/18/2010This isViewport Transformation2
Model of objectsworld coordinates: km, mm, etc.hierarchical models:human = torso + arm + arm + head + leg + legarm = upperarm + lowerarm + hand …Viewingzoom in, move drawing, etc.5/18/2010Why transformations?
5/18/2010Window and viewportViewport: Area on screen to be used for drawing.   Unit: pixels (screen coordinates)   Note: y-axis often points downWindow:Virtual area to be used by application   Unit: km, mm,… (world coordinates) (800,600)(600,400)(200,200)(0,0)(2,1)(-2,-1)
5/18/2010
5/18/2010
5/18/2010
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)) AC = S(vx2-vx1 ,vy2-vy1)BM = T(vx1, vy1) C5/18/2010Window/viewport transform
5/18/2010
5/18/2010
5/18/2010
5/18/2010Now Map Rectangles
5/18/2010
5/18/2010Transformation in x and y
5/18/2010
5/18/2010
5/18/2010
5/18/2010
5/18/2010
5/18/2010
5/18/2010
5/18/2010
5/18/2010
5/18/2010

Viewing transformation