5
$\begingroup$

I wondered, is there a geometrical way to find the center of a pentagon or a hexagon? I'm not talking about equal sides, just polygons with 5 or 6 corners.

Like, with a triangle you can take the intersection of two medians to find the center. With a quadrilateral, the center is the intersection of the bimedians.

Is it possible to construct the center of pentagons and hexagons in a similar way?

Edit: Apparently is rather difficult, so I probably have to settle for a formula to calculate the centroid. I always learned that the $x$ and $y$ values of the centroid are just the mean values of the $x_i$ and $y_i$ values of the corners respectively, but Wikipedia says otherwise (Wiki):

$C_x = \dfrac{1}{6A} \displaystyle \sum_{i=0}^{n-1} (x_i+x_{i+1})(x_iy_{i+1}-x_{i+1}y_i)$

$C_y = \dfrac{1}{6A} \displaystyle \sum_{i=0}^{n-1} (y_i+y_{i+1})(x_iy_{i+1}-x_{i+1}y_i)$

Where $A = \dfrac{1}{2} \displaystyle \sum_{i=0}^{n-1} (x_iy_{i+1}-x_{i+1}y_i)$

I'm not entirely sure, but wouldn't those $(x_iy_{i+1}-x_{i+1}y_i)$ terms cancel out because you divide by the summation over the same interval? That would leave:

$C_x = \dfrac{1}{12} \displaystyle \sum_{i=0}^{n-1} (x_i+x_{i+1})$

which is rubbish, except for when your polygon has 6 corners -- and that's exactly the case on the source from Wikipedia, here.

Therefore I wonder, is my math correct and is this formula just a very elaborate way to calculate the centroid of a hexagon (and no other polygons), or is it just coincidence? If so, please explain the formula.

  • 0
    Convex polygons only?2011-11-27
  • 0
    Yep, only convex ones.2011-11-27
  • 0
    Have you seen [this](https://en.wikipedia.org/wiki/Centroid#Locating_the_centroid)?2011-11-27
  • 0
    Yes I had a look at it, but those methods are not really geometric. Perhaps it is possible to come up with a graphical explanation of the "Centroid of Polygon" part on that wiki-page?2011-11-27
  • 1
    ...can you define what you mean by "geometric"? Straightedge and compass?2011-11-27
  • 0
    Hmm I should have defined that, you're right. Purpose is to find the center using only a ruler and compass (and pencil!).2011-11-27
  • 8
    There's a marked difference between a ruler and a straightedge...2011-11-27
  • 2
    @J.M., pun intended? I didn't know the difference.2011-11-27
  • 1
    There might be a question of what "center" means. What's the center of a triangle? Google "triangle center" and you'll actually find an online encyclopedia listing dozens (maybe hundreds) of different kinds of "centers" of a triangle, with articles on their mathematical properties, and theorems proving that particular sets of four of them are concyclic, etc. etc. etc. For hexagons the story could be more complicated, I would think.2011-11-27
  • 0
    I mean the **centroid**, also known as *geocenter* or *barycenter*.2011-11-27
  • 0
    Hmm I made a stupid mistake, the $1/12$ should be $1/3$ of course. Furthermore, the formula returns valid results, I just don't understand how it works (and how it's different from simply averaging $x$ and $y$ values).2011-11-27

2 Answers 2

3

You can find the centroid of a pentagon by noticing that a pentagon can be decomposed into the union of a triangle and a quadrilateral in different ways, and that the centroid of the pentagon lies on the line connecting the centroid of the quadrilateral and the triangle. So to find the centroid of a convex pentagon choose two nonadjacent vertices draw a line connecting them, compute the centroids of the triangle and quadrilateral, and draw the line connecting them. Then choose two different nonadjacent vertices, and repeat the procedure. The centroid lies at the intersection of the the two lines through the centroids. Non convex pentagons are dealt with similarly, but some care is necessary to avoid getting a triangle or quadrilateral with a vertex inside.

The same technique applies to hexagons, but you decompose them into two quadrilaterals.

This, combined with a general divide and conquer method should be enough to deal with any size polygon.

  • 0
    Very interesting, that's exactly what I was looking for! But how can one prove that the centroid is on the line connecting the two centroids (from the triangle and quadrilateral)?2011-11-28
  • 1
    The centroid is the intersection of all the lines on which the polygon balances, and conversely, the polygon balances on any line through the centroid. So, as each piece would balance on the line through the two centroids the whole polygon does, and therefore as the whole polygon balances on that line, the centroid lies on that line.2011-11-28
  • 0
    Very intuitive, thanks for this explanation :)2011-11-28
4

Although I didn't check the formulas with which you are struggling, the logic behind them is as follows. Partition the polygon into triangles. This is especially easy for a convex polygon, as diagonals from one vertex to all other non-adjacent vertices triangulates. Compute the areas of the triangles. That's what the quadratic terms in your expressions represent. Compute the centroid of each triangle (by summing the coordinates of the three corners and dividing by 3). Form a weighted sum of (triangle area) $\times$ (triangle centroid). Finally, divide by the total area of the polygon.

C code for this computation (which works for nonconvex polygons as well) can be obtained at this link.

  • 0
    Thanks for your clarification! Am I correct in assuming that this formula results in the same centroid position as taking the mean $x$ and $y$ values of the corners, for *convex* polygons? In other words, the result is (or might be) only different when the polygon is **not** convex, right.2011-11-27
  • 2
    @Ailurus the mean of the $x$ and $y$ values is not in general the centroid of the convex polygon. To see this take a convex polygon and add a bunch of new vertices infinitesimally close to one of the original vertices. The mean of the vertices will move close to the pile of new points, but the centroid will remain in the same place. The centroid is the mean of _all_ the points in the polygon, not just the vertices.2011-11-28