It is a formal mechanism for displaying viewsof a picture on an output device. A graphicspackage allows the user to specifya) Which part of the defined picture is to be displayed.b) Where the part is to be placed on the display device.Much like what we see in real life through asmall window or the view finder of a camera.
Objects are placed into the scene by modeling transformation to a master coordinate system, referred to as world coordinate system (WCS).A WCS area selected for display is called window. The window defines what is to be viewed. Window is a rectangle finite region whose edges are parallel to the WCS.Sometimes an additional coordinate systemcalled a viewing coordinate system isintroduced to show the effect of moving view.
Window World Coordinate SystemAn image representing a view often becomespart of a larger image, like a photo on analbum page. Since album pages vary &monitor size differs from one system toanother, so we want to introduce a device
independent tool to describe the display area,called normalized device coordinate system(NDCS) in which virtual display device’s areais (1 x 1)square & lower left corner is at origin(0,0) of the coordinate system.The area on a display device to which a window is mapped is called a viewport. The viewport defines where the view is to be displayed. The rectangle viewport with its edges parallel to the axes of the NDCS
1 Viewport Workstation Window 0,0 Normalized device 1 Coordinate SystemThe process to convert object coordinate inWCS to NDCS is called window to viewportmapping or normalized transformation.
The process that maps NDCS to discretedevice/image coordinate is calledworkstation transformation. Workstation Viewport Device/Image co-ordinate System
Which is a 2nd window to viewport mappingwith a workstation window in NDCS &workstation viewport in device coordinatesystem. These two coordinate mappingOpn. refers to as viewing transformation.
Window to Viewport TransformationOnce object description have been transferred to the viewing reference frame, we choose the window extents in viewing coordinate & select the viewport limit in normalized coordinates. Object description are then transferred to normalized device coordinateThis can be done by using the transformation that maintain the same relative placement of object in normalized space as they had in viewing coordinates.
For eg.- if a coordinate position is at center of the viewing window, it will be displayed at the center of the viewport. (xw,yw) (xv,yv)ywmax yvmaxywmin yvmin xwmin xwmax xvmin xvmax WCS NDCS
The objective of window to viewport mapping is to convert the world coordinate (wx,wy) of an arbitrary point to its corresponding normalized device coordinate (vx,vy). In order to maintain the same relative placement of point in the viewport as in the window, we require wx – wxmin = vx – vxmin --(1) wxmax – wxmin vxmax - vxmin
wy – wymin = vy – vymin --(2) wymax – wymin vymax – vyminSolving these expressions for the viewport position vx & vy we have vx = vxmax – vxmin (wx – wxmin) + vx min wxmax – wxmin vx = Sx (wx – wxmin) + vx min Sx = vxmax – vxmin wxmax – wxmin
From (2) vy = vymax – vymin (wy – wymin) + vy min wymax – wymin vy = Sy (wy – wymin) + vy min Sy = vymax – vymin wymax – wyminSince the eight coordinate values that definethe window & the viewport are just constant,we can express these two formulas forcomputing (vx,vy) from (wx,wy) in terms oftranslate-scale-translate transformation N.
vx wx vy = N . wy 1 1Where N = 1 0 vxmin sx 0 0 1 0 -wxmin 0 1 vymin 0 sy 0 0 1 -wymin 0 0 1 0 0 1 0 0 1Put the value of sx & sy.
Ques-1 Find the normalization transformation that maps a window whose lower left corner is at (1,1) & upper right corner is at (3,5) onto(i) Viewport that is entire normalized device screen.(ii) A viewport that has lower left corner at (0,0) & upper right corner at (1/2,1/2).Solution: (i) wxmin = 1 wymin = 1 wxmax = 3 wymax = 5
Ques-2 Find the normalized transformation that maps a window whose lower left corner is at (2,2) & upper right corner is at (3,4) onto(a) A viewport that is the entire normalized device screen and(b) A viewport that has lowerleft corner at (0,0) and upper left corner (3/2,3/2).
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.