Skip to content

Latest commit

 

History

History
10 lines (8 loc) · 505 Bytes

File metadata and controls

10 lines (8 loc) · 505 Bytes

Sutherland-Hodgman Polygon Clipping

An implementation of the Sutherland–Hodgman algorithm used for clipping polygons in C

Input

The user must provide the following inputs:

  • Top left and bottom right co-ordinates of the clipping window
  • Co-ordinates of the vertices of the polygon

Output

The portion of the polygon remaining after performing left, top, right and bottom clipping using the clipping window.