Overview
Weiler-Atherton clipping can preserve separate output contours and holes by classifying entry and exit intersections.
Clips complex polygons by walking between subject and clipping polygon boundaries at intersections.
Compact metadata for implementation and discovery.
Weiler-Atherton clipping can preserve separate output contours and holes by classifying entry and exit intersections.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n m)
Average
O(n m)
Worst
O(n m)
Space
O(n + m + intersections)
Draw the input shapes, active tests, and generated geometric result.
Weiler-Atherton Polygon Clipping should be used with the assumptions and tradeoffs of polygon Clipping in mind.
What each reference supports for this entry.
Computational geometry textbook support for Weiler-Atherton Polygon Clipping's geometric model, data structures, and robustness concerns.
Open sourceAlgorithm catalog support for Weiler-Atherton Polygon Clipping's problem context, known alternatives, and practical selection tradeoffs.
Open sourceOriginal reference for clipping concave polygons with holes as part of polygon area sorting.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
It inserts intersection points between polygon and clipping boundaries.
Weiler-Atherton handles more general polygon clipping cases.