0
4.6kviews
Define window, viewport and hence explain how window to viewport coordinate transformation is performed.
1 Answer
0
77views

The World Coordinate System (WCS) is infinite in extent and the device display area is finite. Therefore, to perform a viewing transformation we select a finite world coordinate area for display called a Window. An area on a device to which a window is mapped is called a Viewport. The window defines what is to be viewed; the viewport defines where it is to be displayed, as shown in the figure (b).

enter image description here

Window to Viewport Co-ordinate Transformation:-

Once the window co-ordinates are transferred to viewing co-ordinates we choose the window extents in viewing co-ordinates and select the viewport limits in normalized co-ordinates. Object descriptions are then transferred to normalize device co-ordinates. In this transformation, the relative placement of the object in the normalized co-ordinates is same as in the viewing co-ordinates.

The figure (d) shows the mapping of object from window to viewport. A point at Position (Xw, Yw) in the window is mapped into Position (Xv, Yv) in the associated viewport. To maintain the same relative placement in the viewport as in the window we require that

enter image description here

enter image description here

The mapping of window to viewport also can be achieved by performing following transformations:

  1. By performing scaling transformation using a fixed-point position of (Xwmin, Ywmin) that scales the window area to the size of the viewport area.

  2. By translating the scaled window area to the position of the viewport area.

While performing these transformations scaling factors Sx and Sy are kept same to maintain the relative proportions of objects. The character strings are transformed in two ways; they are either transformed without any change or if they are formed with line segments, they are transformed as a sequence of Line transformations.

Please log in to add an answer.