# Polygon Clipping | Polygon | Sutherland Hodgeman Algorithm

By:   Last Updated:

Computer Graphics and Multimedia Application: Q1.What is Polygon and Types of Polygon? Q2.What is Polygon Clipping? Sutherland Hodgeman polygon clipping algorithm? (Computer graphics and multimedia application All Notes)

## 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°.
(ii) Concave Polygon: The polygon that is not convex is called concave polygon, i.e. line joining any two interior points of the polygon is not completely inside the polygon as shown in the figure.

## 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

(click on it or search "allbcaweb" on Facebook)
Instagram = @allbcaweb
(click on it or search "allbcaweb" on Instagram)