Module 4
Module 4
In a 2-D coordinate system the X axis generally points from left to right, and the
Y axis generally points from bottom to top. ( Although some windowing
systems will have their Y coordinates going from top to bottom. )
When we add the third coordinate, Z, we have a choice as to whether the Z-axis
points into the screen or out of the screen:
What is Window?
Window is a world coordinate area selected for display. So, the Window
defines what is to be viewed . First of all, we have to decide which portion of the
real world, we want to display.
Sometimes we are interested in some portion of the object and not in full object.
So we will decide on an imaginary box. This box will enclose desired or interested
area of the object. Such an imaginary box is called a window.
View-Port
Basically, the window is an area in object space. It encloses the object. After the
user selects this, space is mapped on the whole area of the viewport. Almost all
2D and 3D graphics packages provide means of defining viewport size on the
screen. It is possible to determine many viewports on different areas of display
and view the same object in a different angle in each viewport.
One is the World Coordinate system. While other is the Device Coordinate
First, we construct the scene in world coordinate using the output primitives and
attributes.
Once the viewing frame is established, are then transform description in world
coordinates to viewing coordinates.
At the final step, all parts of the picture that (i.e., outside the viewport are dipped,
and the contents are transferred to device coordinates).
As the windows are made smaller, we zoom in on some part of a scene to view
details that are not shown with larger windows.
Viewing Pipeline: Viewing Pipeline defines sequence of operations for
Windowing Transformations.
• The coordinates in which we create individual objects (models) are model (or
object) coordinates.
• When we assemble several objects into a scene, we can describe them
by world coordinates.
• After transformation into the coordinate system of the camera (viewer), then
they become viewing coordinates.
• Also, Their projection onto a common plane (window) yields device-
independent normalized coordinates.
• Finally, after mapping those normalized coordinates to a specific device, we
get device coordinates.
Viewing coordinate Reference Frame
Viewports are defined within the unit square called normalized coordinates.
Normalized coordinates are useful for separating viewing and other
transformations from specific output device requirements so that the graphics
package is largely device-independent.
Applications of View-Port
Panning Effect
Panning Effect is actually moving a fixed size window across various objects in
a scene.
Window to viewport Transformation
Viewport Transformation
You have to map a point at the position wx, wy in the window into the position
vx, vy in the viewport.
Window to Viewport Mapping
In order to maintain the same relative placement of the point in the viewport as
in window, we require