0% found this document useful (0 votes)
14 views9 pages

Window to viewport

Uploaded by

Mir 69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views9 pages

Window to viewport

Uploaded by

Mir 69
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 9

Prof.

Sonal Shroff
Comp Dept, TSEC
 A picture is stored in the computer’s memory
in a world coordinate system (WCS)
 When picture is displayed on a display

device, it is represented in device coordinate


system (DCS)
 Displaying an image involves mapping of

coordinates from WCS to DCS


 The viewing transformation achieves this

mapping of coordinates by the use of


coordinate transformation.

Prof. Sonal Shroff, TSEC 2


 Window – while modelling an image, we are
not interested in the entire world but a
portion of it. This portion of interest is
defined by a polygonal area specified in
world coordinates, called window.
 This window encloses the object for display.
 Viewport – the user may want to display an

image on different parts of the screen. So


an area is defined in normalized device
coordinates, called viewport

Prof. Sonal Shroff, TSEC 3


 This viewport is used to display the
windowed area of the real world.
 Changing viewport position allows viewing

objects at different locations on the display


device.
 Normalization provides device

independence.

Prof. Sonal Shroff, TSEC 4


 Steps in 2D viewing pipeline
 Construct a world coordinate using model

coordinate transformations
 Convert WC to VC
 Transform viewing coordinates to

normalized coordinates
 Map normalized coordinates to device

coordinates.

Prof. Sonal Shroff, TSEC 5


 The transformations used maintains the
same relative placement of a point in the
viewport, as it had in the window.
 Relative proportions are only maintained, if

the aspect ratio of the viewport is the same


as that of window.
 Window is defined by

◦ Xwmin , Ywmin , Xwmax , Ywmax


 Viewport is defined by
◦ Xvmin , Yvmin , Xvmax , Yvmax

Prof. Sonal Shroff, TSEC 6


Prof. Sonal Shroff, TSEC 7
Prof. Sonal Shroff, TSEC 8
 The transformations involved are

 Scaling transformation – this scales the


window to the size of viewport wrt a fixed
point (Xwmin , Ywmin )
 Translation – this translates the scaled
window to the location of the viewport

Prof. Sonal Shroff, TSEC 9

You might also like