Overview
Ear clipping finds a convex vertex whose triangle contains no other polygon vertices, emits that triangle, and removes the vertex.
Triangulates a simple polygon by repeatedly removing valid ears.
Compact metadata for implementation and discovery.
Ear clipping finds a convex vertex whose triangle contains no other polygon vertices, emits that triangle, and removes the vertex.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n^2)
Average
O(n^2)
Worst
O(n^3)
Space
O(n)
is_convex(v) and no polygon vertex lies inside triangle(prev, v, next)Determines whether a vertex can be clipped safely.
Draw the input shapes, active tests, and generated geometric result.
Ear Clipping Triangulation should be used with the assumptions and tradeoffs of triangulation in mind.
What each reference supports for this entry.
Computational geometry textbook support for Ear Clipping Triangulation's geometric model, data structures, and robustness concerns.
Open sourceAlgorithm catalog support for Ear Clipping Triangulation's problem context, known alternatives, and practical selection tradeoffs.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Ear clipping triangulates polygons without optimizing Delaunay criteria.
Ear clipping checks whether candidate ears contain other polygon vertices.