centroide
The centroide is the geometric center of a figure or region, and for a lamina with uniform density it coincides with the center of mass. It is the point where the shape would balance on a sharp pin, and it is also called the centroid or barycenter in many contexts.
For simple shapes, the centroide has straightforward locations. In a triangle, the centroid is the intersection
For a polygon with vertices (x1, y1), (x2, y2), ..., (xn, yn) taken in order, the area A
Cx = (1/(6A)) sum over i of (xi + xi+1)(xi yi+1 − xi+1 yi),
Cy = (1/(6A)) sum over i of (yi + yi+1)(xi yi+1 − xi+1 yi).
If the density ρ varies, the center of mass G is found from M = ∫∫ ρ dA, Mx = ∫∫ x