Page 100 - DCAP504_Computer Graphics
P. 100
Unit 7: 2-D Viewing
Window
In figure 7.3, (a) symbolizes the clear rectangle within which the landscape is visible. This is known as
the Window. The image which is seen through a window is the restricted insight of the world and is
generally depicted in a rectangular format. The rectangular area is defined in length dimensions, with
reference to origin, to which the object space is corresponded. The object space refers to the space
occupied by the object in a 2-D or 3-D plane.
Consider a moving train. As the train moves, the eyes move with relation to the
train, and thus the view through the window also changes. The outside view is
seen more or less to the right or left or it is seen more or less to the top or
bottom depending on the shift of the view. Although the image remains
constant.
The diagrams and other manual graphics of draftsmen and artists are built in the real world object
spaces (space occupied by object in the real world), but the window need not be an opening to the real
world. It might be an artificial illustration like a drawing or a photograph of a real object, a graphical
depiction of an abstract concept, a scientific diagram, or a statistical chart. Therefore, a window is
defined as a view of an image or an object represented through computer graphics.
Viewport
A viewport is used to depict the image of any object in the window. The image can be of any solid
object or a portion of it. In figure 7.3, (b) depicts a viewport as a screen of a computer monitor. A user
can view the part of the image as viewed through a window. Viewport is defined as the part of the
screen in which the window scene is displayed. The viewport can also be defined as the representation
of a window in a two-dimensional medium.
7.2 Windows-to-Viewport Mapping
In the earlier section we discussed the concept of window and viewport. In this section we will learn the
mapping of an object from a window onto the viewport.
The process of transforming a two-dimensional world coordinate to device coordinate is known as
window to viewport mapping. The objects present in the world or clipping window are mapped to the
viewport. The interface window on the screen displays the viewport. To display a part of the scene, the
clipping window is selected and then the viewport positions the scene on the output device.
LOVELY PROFESSIONAL UNIVERSITY 93