# Is there a generic function to find the area of any shape?

Given the coordinates of all points making up a two-dimensional shape and the order in which they are connected, is there any generic formula that will give the area of that shape?

EDIT: The list of points would be a list of all of the vertices.

-
There are generally infinitely many points in any shape with nonzero area. However, if you restrict yourself to polygons and your points are the corners of the polygon (given in order), then you can use the shoelace formula. – Henning Makholm Jan 29 '12 at 23:34
Given the (algorithm) tag, I have to wonder: are you talking about polygons in particular? Vector calculus gives an area formula given only a parametrization of the boundary, for example. – anon Jan 29 '12 at 23:34
I doubt there is any useful closed-form expression for this. If you partition it into convex parts, and then partition those into triangles, you can then add up the areas of the triangles, and the last part can be made into a closed-form expression. – Dan Brumleve Jan 29 '12 at 23:35
– Rahul Jan 29 '12 at 23:47