6 CSE455 2D Normalization and Viewing Transformation
6 CSE455 2D Normalization and Viewing Transformation
Computer Graphics
Autumn 2009
CS4815
Outline
Announcements
CS4815
Announcements
Extra lecture: 16.00, Thursday, Week07, Room CS-G25 Mid-term: 13.00, Friday, Week07 No lecture Mon. Week08 Today, 16th Oct. Hamiltons Day
CS4815
Outline
Announcements
CS4815
Coordinate Systems
Several coordinate systems used in graphics systems. World coordinates are the units of the scene to be modelled; we select a window of this world for viewing Viewing coordinates are where we wish to present the view on the output device; we can achieve zooming by mapping different sized clipping windows to a xed-size viewport; can have multiple viewports
CS4815
Coordinate Systems
Several coordinate systems used in graphics systems. World coordinates are the units of the scene to be modelled; we select a window of this world for viewing Viewing coordinates are where we wish to present the view on the output device; we can achieve zooming by mapping different sized clipping windows to a xed-size viewport; can have multiple viewports
Clipping Window Viewport (possibly different size)
Viewport Coordinates
World Coordinates
CS4815
Coordinate Systems
Several coordinate systems used in graphics systems. World coordinates are the units of the scene to be modelled; we select a window of this world for viewing Viewing coordinates are where we wish to present the view on the output device; we can achieve zooming by mapping different sized clipping windows to a xed-size viewport; can have multiple viewports
Clipping Window Viewport (different size)
Viewport Coordinates
World Coordinates
CS4815
The clipping window selects what; the viewport indicates where on output device Normalized coordinates are introduced to make viewing process independent of any output device (paper vs. mobile phone); clipping normally and more efciently done in these coordinates Device coordinates are specic to output device: printer page, screen display, etc. The Viewing Pipeline.
CS4815
The clipping window selects what; the viewport indicates where on output device Normalized coordinates are introduced to make viewing process independent of any output device (paper vs. mobile phone); clipping normally and more efciently done in these coordinates Device coordinates are specic to output device: printer page, screen display, etc. The Viewing Pipeline.
CS4815
The clipping window selects what; the viewport indicates where on output device Normalized coordinates are introduced to make viewing process independent of any output device (paper vs. mobile phone); clipping normally and more efciently done in these coordinates Device coordinates are specic to output device: printer page, screen display, etc. The Viewing Pipeline.
CS4815
CS4815
y (world)
Clipp in
g win dow
x (world)
CS4815
w)
x (vie
a
w)
x (world)
CS4815
Normalization Window
ny
cy c
x
Cx
nx
Nx
What is transformation that maps (x, y ) within, say, the clipping window to (x , y ) in, say, a normalised window? In order to maintain the same relative position x nx x cx = Nx nx Cx cx y ny y cy = Ny ny Cy cy
CS4815
CS4815
So we get a composite transformation, MC,N that combines a translation and a scaling MC,N = T S sx 0 = 0 sy 0 0
tx ty 1
CS4815