Advanced maths

Concave polygon triangulation calculator from vertices

Triangulate a simple concave polygon into indexed nonoverlapping triangles, with internal diagonals and exact rational area conservation.

Your numbers

3–100 decimal vertices; simple boundary without holes. Either direction and a repeated closing point are accepted.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

A concave polygon cannot generally be triangulated by connecting one chosen vertex to every other vertex, because some such segments can leave the polygon. This calculator uses ear clipping: it removes a convex corner only after checking that the candidate triangle contains no other working boundary vertex. The retained triangle indices refer to the original input rows. The output also lists shared internal diagonals and checks rational area conservation exactly for the entered decimal coordinates. It returns one valid construction, not a count of possible triangulations.

THE FORMULAA simple n-corner polygon admits n−2 triangles; polygon area equals the sum of its triangle areas, with collinear subdivisions removed explicitly.

A worked example

The L-shaped boundary (0,0),(4,0),(4,1),(1,1),(1,4),(0,4) has six corners and area seven. A valid triangulation has four triangles whose areas sum to seven, together with three internal diagonals. A fan drawn from the wrong corner can cross the missing upper-right region and is not valid merely because it produces four triangle triples. If an extra vertex (2,0) is inserted on the first straight edge, the page lists that subdivision as removed before applying the six-corner triangle count.

Good to know

Simple ordered polygon without holes, 3–100 bounded decimal vertices. Nonadjacent edges may not cross or touch, and adjacent edges may not retrace. Straight boundary subdivisions are removed and listed using original row labels. Exact rational area conservation is checked; ear predicates use the site’s high-precision decimal orientation. Returns one triangulation, not every triangulation, constrained Delaunay quality, optimal diagonal length or a mesh for multiple disconnected regions.

A valid ear must remain inside the current boundary

After orienting the working boundary counterclockwise, a candidate ear uses a strictly convex local turn. Checking other boundary vertices against the closed triangle prevents a diagonal from cutting across another part of the polygon. Removing a certified ear leaves a smaller simple polygon and records one nonoverlapping triangle. Repeating until three corners remain gives the construction; the final three vertices form its last triangle.

The algorithm does not invent extra Steiner vertices, so triangle corners retain their input-row identities. Collinear boundary subdivisions are a special bookkeeping case: they do not form positive-area ears and are removed from the working corner list. Their original row numbers remain in an explicit result list. The count n−2 applies to the resulting noncollinear boundary corners, not automatically to a raw input containing repeated closing points or straight-edge subdivisions.

A concave L-shaped boundary splits into four interior triangles6 corners4 trianglesArea sum: 7
The six-corner polygon (0,0),(4,0),(4,1),(1,1),(1,4),(0,4) has area seven. Three shown internal diagonals form four triangles, all inside the L; their exact areas sum to seven.

Conservation checks support the construction without replacing geometry

The exact shoelace area of the polygon is compared with the exact sum of its triangle areas. Matching areas is a useful certificate, but a random collection of overlapping triangles could also have a misleading total. The ear construction and boundary validation establish the geometric partition; area conservation independently checks the arithmetic and reconstruction. Shared triangle edges identify internal diagonals, while singly used edges describe the outer working boundary.

A self-crossing polygon has no single ordinary interior under the simple-polygon contract and is rejected rather than assigned an unstated winding rule. Holes also need extra constraints and cannot be represented by concatenating rings in one list. The Convex polygon triangulation count calculator counts combinatorial possibilities from a side count. This page instead constructs triangles for a supplied boundary, including concavity, and does not claim its particular triangulation is unique or optimized for element quality.

A few questions, answered

Why did the output remove an input row?

A collinear row can be a straight boundary subdivision rather than a geometric corner. The result lists it explicitly and preserves the original labels of all triangle vertices.

Can I enter a polygon with a hole?

No. This page accepts one simple boundary ring. Hole-aware triangulation requires a separate constrained representation and is not inferred from the coordinate list.

Find your calculator

Start typing to explore the library.