Computer Graphics Unit 5
Computer Graphics Unit 5
UNIT V
TOPICS COVERED:
2-D Viewing
TS
BCA414: COMPUTER GRAPHICS 2
UNIT V
2D Viewing Pipeline:
This involves a series of transformations performed, right from creation, till the object
is finally seen or displayed at a position or a viewing region on a display device like
monitor. Each transformation step performed converts data from one coordinate
system to the other.
TS
BCA414: COMPUTER GRAPHICS 3
UNIT V
TS
BCA414: COMPUTER GRAPHICS 4
UNIT V
TS
BCA414: COMPUTER GRAPHICS 5
UNIT V
TS
BCA414: COMPUTER GRAPHICS 6
UNIT V
“The viewport can be defined as an area on the screen which is used to display the
object.” The window is an area space for the object. Viewport surrounds the object.
We need the coordinate transformation to display the object on the screen. We can
define many viewports on a different area of the screen and also see the same object
from a different angle in the viewport.
TS
BCA414: COMPUTER GRAPHICS 7
UNIT V
TS
BCA414: COMPUTER GRAPHICS 8
UNIT V
TS
BCA414: COMPUTER GRAPHICS 9
UNIT V
TS
BCA414: COMPUTER GRAPHICS 10
UNIT V
For simplicity, both window and viewport are chosen to be rectangular in shape
whose boundaries are aligned with the coordinate axes. Because the dimensions of
window and viewport are different, we will be performing a scaling like operation.
If the window is bigger in size than the viewport, we perform a scale down
operation and vice-versa. As you can notice from the figure above, the boundaries
of the window and viewport are defined by four infinitely extending lines parallel
to the coordinate axes. The window boundaries are defined by the four lines,
xwmin, xwmax, ywmin, yWmax. Where xwmin, xwmax define the two vertical
boundaries, while, ywmin and ywmax define the two horizontal boundaries of the
window. Similarly the viewport boundaries are defined by four infinitely extending
lines, xvmin, xvmax, yvmin, yvmax.
Now for a point (xw,yw) in the window, we have to identify an equivalent point in
the viewport, say (xv,yv). i.e., for every point in the window, there is an equivalent
point in the viewport. The four corner vertices of the window have got their
equivalent vertex points in the viewport, which are nothing but the four corner
points of the viewport. For the point (xwmin, ywmin) in the window, the equivalent
point in the viewport is (xvmin, yvmin) and so on.
TS
BCA414: COMPUTER GRAPHICS 11
UNIT V
TS
BCA414: COMPUTER GRAPHICS 12
UNIT V
TS
BCA414: COMPUTER GRAPHICS 13
UNIT V
TS
BCA414: COMPUTER GRAPHICS 14
UNIT V
Clipping
TS
BCA414: COMPUTER GRAPHICS 15
UNIT V
TS
BCA414: COMPUTER GRAPHICS 16
UNIT V
TS
BCA414: COMPUTER GRAPHICS 17
UNIT V
TS
BCA414: COMPUTER GRAPHICS 18
UNIT V
TS
BCA414: COMPUTER GRAPHICS 19
UNIT V
TS
BCA414: COMPUTER GRAPHICS 20
UNIT V
TS
BCA414: COMPUTER GRAPHICS 21
UNIT V
TS
BCA414: COMPUTER GRAPHICS 22
UNIT V
TS
BCA414: COMPUTER GRAPHICS 23
UNIT V
TS