The document discusses window to viewport transformation and the use of homogeneous coordinates. A window defines the area of data to display, while a viewport defines where on the display device the window will appear. Window to viewport transformation maps the window coordinates to viewport coordinates using translation and resizing. Homogeneous coordinates represent points using an extra dimension, allowing rotation, scaling and other transformations to be represented using matrix multiplication.
2. What is window?
• A world-coordinate area
selected for display is called
a window.
• You can define the window
to be larger than, the same
size as, or smaller than the
actual range of data values,
depending on whether you
want to show all of the data
or only part of the data.
• Window defines what is to
be viewed.
What is viewport?
• An area on a display device
to which a window Is
mapped is called a viewport.
• The rectangular portion of
the interface window that
defines where the image will
actually appear.
• Viewport defines where the
window to be displayed.
3. If we are changing the position of window by keeping the
viewport location constant, then the different part of the object
is displayed at the same position on the display device.
If we change the location of viewport then we will see the same
part of the object drawn at different places on screen.
4. Window-to-Viewport
Transformation
• Window-to-Viewport transformation is the process of
mapping or transforming a two-dimensional, world-
coordinate scene to device coordinates.
• In particular, objects inside the world or clipping window
are mapped to the viewport.
• The clipping window is used to select the part of the scene
that is to be displayed. The viewport then positions the
scene on the output device.
5.
6. Steps for Window to
Viewport Transformation
• Step 1: Translate window towards origin. To shift
window towards origin, translation factor will become
negative (-tx,-ty).
• Step 2: Resize window to the size of view port.
• Step 3: Translate window (position of window must be
same as position of view port).
7.
8.
9.
10.
11.
12. Homogeneous Coordinates
• Being homogeneous means a uniform representation
of rotation, translation, scaling and other
transformations.
• Homogeneous coordinates are widely used in
computer graphics because they enable effective,
simple manipulations of transformations in a specific
way.
13. Why Homogeneous?
• We have to use 3×3 transformation matrix instead of 2×2
transformation matrix. To convert a 2×2 matrix to 3×3 matrix,
we have to add an extra dummy coordinate W.
• In this way, we can represent the point by 3 numbers instead of
2 numbers, which is called Homogenous Coordinate system.
• In this system, we can represent all the transformation
equations in matrix multiplication. Any Cartesian point P(X, Y)
can be converted to homogenous coordinates by P’ (Xh, Yh, h).