Center of gravity of a self intersecting irregular polygon I am trying to calculate the center of gravity of a polygon.
My problem is that I need to be able to calculate the center of gravity for both regular and irregular polygons and even self intersecting polygons.
Is that possible?
I've also read that: http://paulbourke.net/geometry/polyarea/ But this is restricted to non self intersecting polygons.
How can I do this? Can you point me to the right direction?
Sub-Question: Will it matter if the nodes are not in order? if for example you have a square shape and you name the top right point (X1Y1) and then the bottom right point (X3Y3)?
In other words if your shape is like 4-1-2-3 (naming the nodes from left to right top to bottom)
Note: Might be a stupid question but I'm not a maths student or anything!
Thanks

This doesn't work for irregular polygons such as the following: 
X        Y
3   0
3   50
0   50
0   56
3   80
28  80
28  0
3   0
