0% found this document useful (0 votes)
135 views13 pages

Sutherland Hodgeman Algorithm-Polygon Clipping

This document discusses polygon clipping algorithms. It describes the Sutherland-Hodgeman algorithm which clips polygon edges by passing vertex pairs through a series of clippers representing the clipping boundaries. There are four cases depending on whether vertices are inside or outside the clipping region. The algorithm correctly clips convex polygons but can display extraneous lines for concave polygons. It also briefly mentions the Weiler-Atherton algorithm but provides no details.

Uploaded by

Varchasva Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
135 views13 pages

Sutherland Hodgeman Algorithm-Polygon Clipping

This document discusses polygon clipping algorithms. It describes the Sutherland-Hodgeman algorithm which clips polygon edges by passing vertex pairs through a series of clippers representing the clipping boundaries. There are four cases depending on whether vertices are inside or outside the clipping region. The algorithm correctly clips convex polygons but can display extraneous lines for concave polygons. It also briefly mentions the Weiler-Atherton algorithm but provides no details.

Uploaded by

Varchasva Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Polygon Clipping

.
Outline

• Polygon Clipping

• Polygon Clipping Algorithms


• Sutherland Hodgeman

• Weiler Atherton

• Summary
Polygon Fill Area Clipping
• Typically support only fill areas that are polygons, and convex
• Cannot directly apply a line clipping because the result would not be a
closed polyline
Polygon Fill Area Clipping
• Clip a polygon fill area by determining the new shape for the polygon
as each clipping-window edge is processed

Create a new vertex list at each clipping boundary, and then pass this
new vertex list to the next boundary clipper
Polygon Clipping Algo:Sutherland-Hodgeman
• Send the pair of endpoints for each successive polygon line segment
through the series of clippers (left, right, bottom, and top)
• Operating in parallel, as a clipper completes the processing of one
pair of vertices, the next pair of endpoints is processed
• There are four possible cases
1. The first edge endpoint is outside and the second endpoint is inside
2. Both endpoints are inside
3. The first endpoint is inside and the second endpoint is outside
4. Both endpoints are outside
Polygon Clipping Algo:Sutherland-Hodgeman
• Send the pair of endpoints for each successive polygon line segment
through the series of clippers (left, right, bottom, and top)
• Operating in parallel, as a clipper completes the processing of one
pair of vertices, the next pair of endpoints is processed
• There are four possible cases
1. The first edge endpoint is outside and the second endpoint is inside
2. Both endpoints are inside
3. The first endpoint is inside and the second endpoint is outside
4. Both endpoints are outside
Sutherland-Hodgeman Algorithm(Cont.….)
• Passing of vertices from one clipping stage to the next, the output
from each clipper can be formulated
1. If the first input vertex is outside and the second vertex is inside, the intersection
point with the border and the second vertex are sent to the next clipper
2. If both input vertices are inside, only the second vertex is sent to the next clipper
3. If the first vertex is inside and the second vertex is outside, the intersection point is
sent to the next clipper
4. If both input vertices are outside, no vertices are sen t
Sutherland-Hodgeman Algorithm(Cont.….)
Sutherland-Hodgeman Algorithm(Cont.….)
Sutherland-Hodgeman Algorithm(Cont.….)
Issues in Clipping
Summary
● It correctly clips convex polygons
● But display extraneous lines for concave polygons
Resources
• https://en.wikipedia.org/wiki/Sutherland-hodgeman-algorithm
• https:// www.tutorialandexample.com/polygon-clipping/
• https://iq.opengenus.org/sutherland-hodgeman-algorithm

You might also like