Look up "Centroid" and "Center of Mass" on wikipedia.org. The centroid page has a set of expressions for calculating the centroid of a shape bounded by a polygon. For a more general treatment, it also discusses areas bounded by function, and by an area determined by a characteristic function. Possibly also of use is the "Center of Mass" page which discusses calculating the centre of mass (which is identical to the centroid in things with constant density).