# given the coordinates of a polygon in order, divide it up into triangles (without drawing: algebraic solution needed)

Suppose you are given the coordinates of the vertices of an arbitrary polygon in the plane in the order they occur (it is not stated whether it is clockwise or anti-clockwise --counter-clockwise for Americans) <(x1,y1), (x2,y2)....(xn, yn)>, and one wishes to split this up into triangles (for example, to find the area), but purely algebraically (drawing it would be too easy). If the polygon is convex, then there is no problem. But the method must also be able to encompass concave polygons. How would one do it? I am not even sure how to tell if, at a given vertex, whether to take the acute or the obtuse angle as being inside the polygon. (Without drawing it, of course.)

• But there can be many polygons with given set of vertices. So some order is necessary. – ptashek Jan 22 '14 at 16:09
• Search up the shoelace theorem. Its proof by induction involves this. – Mayank Pandey Jan 22 '14 at 16:10
• Have you tried searching? For example Wikipedia describes many possible methods for this task. – dtldarek Jan 22 '14 at 16:18
• @ptashek. Thanks, but I mentioned in the question that the vertices were given in order. I guess my phrasing was a little fuzzy, sorry. – nomadreid Jan 23 '14 at 17:29
• @MayankPandey. Thanks. You answered the question. (Right after I found it elsewhere, but it can't be helped that the notifications were a little too slow. A case of Alexander Graham Bell against Elisha Gray. – nomadreid Jan 23 '14 at 17:33

## 1 Answer

A slightly better search gave me the answer in....(wait for it) ....Stack Exchange: https://stackoverflow.com/questions/1165647/how-to-determine-if-a-list-of-polygon-points-are-in-clockwise-order (answer #100 answers it as an aside). But the shoelace theorem mentioned above is apparently equivalent.