# Center of Mass of a Polygon

Both the area and the various moments of a simple polygon can be written as simple functions of the coordinates of the vertices. These formulas can then be used to identify the center of mass of the polygon: . Move or add new locators and watch the center of mass move. Careful: if the polygon boundary intersects itself, the results are invalid!

### DETAILS

The formulas for the area and the first and second moments of a simple polygon (i.e., without holes or boundary intersections, but not necessarily convex) can be elegantly derived using Green's theorem, or can be built from first principles.
For example, the area is or and the first moment about the axis is or , where the vertices are listed in counterclockwise order around the polygon and .
For the calculations, the polygon is assumed to be cut from a thin sheet of some material of uniform density. For simplicity, the vertex positions are limited to the first quadrant and we use the absolute values of the formulas, meaning that the position of the center of mass will be correctly determined whether or not the vertices are ordered counterclockwise. You can freely add or delete vertices, but be sure that the boundary does not intersect itself. (If it does, the overlapping region is effectively a negative mass!)
The "crosshairs" options show dotted lines through the center of mass, either parallel to the and axes (allowing easy visualization of the center of mass coordinates) or with additional diagonal lines, highlighting the idea that the polygon can balance on any knife edge that passes under the center of mass.
Thumbnail: if the polygon is not convex, the center of mass may lie outside the area of the polygon: here on the line between the two arms
Snapshot 1: the center of mass of a triangular plate lies exactly 1/3 of the way from the base towards the opposite vertex—no matter which side is called the base
Snapshot 2: the center of mass of the map of Austria
Snapshot 3: a self-intersecting polygon, where the calculation of the center of mass basically treats one part of the area as having negative mass, effectively repelling the center of mass from its expected position
References:
S. F. Bockman, "Generalizing the Formula for Areas of Polygons to Moments," American Mathematical Monthly, 96(2), 1989 pp. 131–132.
P. Bourke, Calculating the Area and Centroid of a Polygon, 1988.
S. Wagon, Mathematica in Action, 2nd ed., New York: Springer, 1999.

### PERMANENT CITATION

 Share: Embed Interactive Demonstration New! Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details » Download Demonstration as CDF » Download Author Code »(preview ») Files require Wolfram CDF Player or Mathematica.

• Signed Area of a PolygonBruce Atwood (Beloit College) and Stan Wagon (Macalester College)
• Total Areas of Alternating Subtriangles in a Regular Polygon with 2n SidesJay Warendorff
• Estimating Perimeter and Area of Simple PolygonsChris Boucher
• The Excentral Triangle and a Related HexagonJay Warendorff
• Center of Mass of n PointsStephen Wolfram
• Mechanism for Constructing Regular PolygonsIzidor Hafner
• Isoperimetric Inequality for PolygonsChris Boucher
• Pick's TheoremEd Pegg Jr
• Monte Carlo Estimation of AreaMark D. Normand and Micha Peleg
• The Area of a Square in a SquareAbraham Gadalla