Docsity

Polygon Clipping - Computer Graphics - Lecture Slides, Slides of Computer Graphics

Partial preview of the text

Download Polygon Clipping - Computer Graphics - Lecture Slides and more Slides Computer Graphics in PDF only on Docsity!

Computer

Graphics

Lecture 15

CLIPPING II

Sutherland-Hodgeman

clipping algorithm

clips any polygon against a
convex clip polygon.

Weiler-Atherton

clipping algorithm

Weiler-Atherton clipping
algorithm clips any polygon
against any clip polygon. The
polygons may even have holes.

Polygon clipping - open polygons.

Polygon clipping - open polygons.

Four clip edges, each
defining one boundary of the
clip rectangle, successively
clip a polygon against a clip
rectangle.

Steps of Algorithm

Polygons can be clipped against each edge of the window one at a time. Vertices which are kept after clipping against one window edge are saved for clipping against the remaining edges.

Four Cases of Polygon

Clipping Against One

Edge

Case 2 : Exit visible region -
save the intersection point
Case 1 : Wholly inside visible
region save endpoint
Case 4 : Enter visible region -
save intersection and endpoint
Case 3 : Wholly outside visible
region - save nothing
Clip Left
Clip Right