Q1. What is Polygon and also explain all Types of Polygon?Ans. A polygon is a closed planar path composed of a finite number of sequential line segments.
There are two types of polygon:
(1) Convex polygon, (ii) Concave polygon.
(i) Convex Polygon: The line connecting two interior points of the polygon lies completely inside the polygon. It is said to be convex polygon. A convex polygon has all its interior angle less than 180°.
Q2. What is Polygon Clipping? Sutherland Hodgeman polygon clipping algorithm?Ans. A polygon boundary processed with a line clipper may be displayed as a series of unconnected line segments, depending on the orientation of the polygon to the clipping window. For polygon clipping,
We require an algorithm that will generate one or more closed areas that are then scan converted for the appropriate area. The output of a polygon clipper should be a sequence of vertices that defines the clipped polygon boundaries.
Sutherland Hodgeman Polygon Clipping Algorithm:We can correctly clip a polygon by processing the polygon boundary as a while against each window edge. This could be accomplished by processing all polygon vertices against each clip rectangle boundary in turn.
There are four possible cases when processing vertices in sequence around the perimeter of a polygon:
1. If the first vertices passed to a window boundary and the second vertex is inside, both the intersection point of polygon edge with the window boundary and the second vertex are added to the output vertex list.
2. If both input vertices inside the window boundary, only the second vertex added to the output vertex list.
3. If the first vertex is inside the window boundary and the second vertex is outside the window boundary, only the edge intersection with the window boundary is added to output vertex first.
4. It both input vertices are outside the window boundary, nothing is added to the output list.
Next Topic : Clipping - Types of Clipping in Computer Graphics
Join us on Facebook, Instagram, and Twitter to get the latest study material. You can also ask us any questions.
Facebook = @allbcaweb
(click on it or search "allbcaweb" on Facebook)
Instagram = @allbcaweb
(click on it or search "allbcaweb" on Instagram)
Twitter = @allbcaweb
(click on it or search "allbcaweb" on Twitter)
Send us your query anytime about Polygon Clipping!
External Links:-1. Polygon Clipping - (click here)
2. Sutherland Hodgeman polygon clipping algorithm - (click here)