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.)
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.