Page 138 - DCAP504_Computer Graphics
P. 138
Unit 9: Clipping I
The figure 9.1 depicts point clipping.
Figure 9.1: Point Clipping
In figure 9.1, the edges of the clip window can either be world co-ordinate window boundaries or
viewport boundaries. The points p(x, y) and p 2(x 2, y 2) are not clipped as they satisfy the above
inequalities. The points p 1(x 1, y 1) and p 3(x 3, y 3) that are outside the window are clipped and are not
displayed.
Point clipping is used less often compared to line clipping. Some applications prefer using point
clipping.
Scenes that have explosions use point clipping. This is because explosion
scenes involve particles (points) that spread in various regions of the scene.
9.3 Line Clipping
Line clipping mainly determines whether points lie within or outside a clipping window and whether a
line joining two points lies completely inside or outside the window. With reference to a window ABCD
as indicated in figure 9.2, there are three possibilities for the line to be visible.
Figure 9.2: Line Clipping
LOVELY PROFESSIONAL UNIVERSITY 131