Polygo centre of gravity

How do you find his center of gravity at a given top of a multiangle?
In general, a multiangle may be unpopular. Consider that the mass is evenly distributed in areas limited to a multiangle.

To write the following functions:
 Calculation of the triangle weight at the top,
 TC triangle on top,
 to determine the location of the multiangle (this is on the CO),
 Two figures with known CTs and weights to determine weight and TC.