Page 154 - DCAP504_Computer Graphics
P. 154
Unit 10: Clipping II
The following steps are followed to obtain the sub-polygon:
1. The intersections of sides are calculated and placed in two lists:
For polygon M: M0, I1, I0, M1, I2, I3, M2, I4, M3, I5, I4
For polygon N: N0, N1, I0, I2, N2, N3, I5, I4, I3, I1
The list of entering points for M is I1, I2, and I4
2. Begin with the first point of entering list I1
(a) Take the next point on the list for M
The next point I0 is the exiting point for M
(b) You get the list N. Here, you take the next point I2
I2 is the exiting point for N and thus you enter list M
I3 is the exiting point for M and thus you enter list N
(c) Retrieve point for beginning I1
The first common area of polygon I1 I0 I2 I3 is obtained
3. Delete the entering points in this area I1 and I2
4. Take last point in entering list I4
You find M3 in M list and then you get I4
I5 is exiting point for M and thus you enter list N and find I4
The second common area of polygon I4 M3 I5
The entering list of points is now empty and you obtain all common areas
This algorithm gives false result if the polygons are crossed. This is because, with crossed polygons you
cannot decide whether a point is entering or existing the polygon. These common areas form the sub-
polygon, which is the final result of the clipping process.
10.2 Projection
Projection can be defined as a mapping of point P (A, B, C) to its image P’ (A’, B’, C’) on the projection
plane that represents the display surface. The mapping is ascertained by a projection line called the
projector that passes through P and intersects the view plane. The point of intersection is P’. The
outcome of projecting an object mainly depends on the spatial relationship among the projectors that
project the points on the object and the spatial relationship between the projectors and the view plane.
Figure 10.6 Projection
LOVELY PROFESSIONAL UNIVERSITY 147