KEMBAR78
CGL Practical 9 | PDF
0% found this document useful (0 votes)
45 views4 pages

CGL Practical 9

The document outlines the implementation of the Cohen Sutherland Hodgeman polygon clipping algorithm for clipping polygons with respect to a viewport and window using mouse and keyboard interfaces. It explains the theory behind polygon clipping, detailing the process of selecting visible portions of a polygon and the divide-and-conquer strategy used in the algorithm. The conclusion emphasizes the successful study and implementation of the algorithm.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views4 pages

CGL Practical 9

The document outlines the implementation of the Cohen Sutherland Hodgeman polygon clipping algorithm for clipping polygons with respect to a viewport and window using mouse and keyboard interfaces. It explains the theory behind polygon clipping, detailing the process of selecting visible portions of a polygon and the divide-and-conquer strategy used in the algorithm. The conclusion emphasizes the successful study and implementation of the algorithm.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Title: Implementation of Polygon Clipping Algorithm.

Problem Statement: Implement Cohen Sutherland Hodgeman polygon clipping method to


clip the polygon with respect to the viewport and window. Use mouse click, keyboard
interface.

Objective: Understanding the concept of Polygon clipping

Theory:

Polygon Clipping – Cohen Sutherland Hodgeman

The process of selecting ,enlarging and viewing the picture with different views is
called windowing .A process which divides each element of the picture into its visible and
invisible portions allowing the invisible portion to be discarded is called clipping Procedure
that identifies the portion of a picture that are either inside or outside. The region against
which an object is to be clipped is called clip window
A polygon can be clipped by processing its boundary as a whole against each window
edge. This is achieved by processing all polygon vertices against each clip rectangle boundary in turn.
Begging with the original set of polygon vertices, we could first clip the polygon against the left
rectangle boundary to procedure a new sequence of vertices. Sutherland and Hodgman's polygon-
clipping algorithm uses a divide-and-conquer strategy: It solves a series of simple and identical
problems that, when combined, solve the overall problem. The simple problem is to clip a polygon
against a single infinite clip edge. Four clip edges, each defining one boundary of the clip rectangle,
successively clip a polygon against a clip rectangle

Processing all polygon vertices against each clip rectangle boundary in turn

Pass each pair of adjacent polygon vertices to a window boundary clipper


There are four cases:
• Intermediate output vertex list
• Once all vertices have been processed for one clip window boundary,
it is generated.
• The output list of vertices is clipped against the next window boundary.
• It can be eliminated by a pipeline of clipping routine.
• Convex polygons are correctly clipped.
• If the clipped polygon is concave

Split the concave polygon


Example:
Conclusion: In This way we have studied and implemented Sutherland-Hodgeman Polygon
Clipping Algorithm.

You might also like