# How can I really play Monkey in the Middle?May 24, 2007 9:49 AM   Subscribe

Are these ways of finding the centroid of a backyard equivalent?

I've often thought, when mowing the lawn, that if I start along the outside perimeter (ejecting grass outwardly, of course), spiralling inward, that the place where I stopped would be the centroid of my lawn. (This is, of course, ignoring the fact that I have to mow around obstacles.)

I believe the usual definition of the centroid is the point upon which my 2-D lawn would balance, weighting all of the points of the lawn according to their distance from the centroid.

So is the place where the lawnmower ends up the centroid of the lawn? (I'm assuming an infinitesimally small lawnmower.)
posted by landtuna to Science & Nature (13 answers total)

Best answer: i don't think so; picture a dogbone shaped yard, with one end larger than the other. the mower is going to end up somewhere in the large end of the dogbone, but the balance point is going to be somewhere on the skinny part, right?
posted by duckstab at 10:03 AM on May 24, 2007

No. Consider a lawn shaped like Oklahoma. The "lawnmower" method you describe wouldn't take the panhandle into account at all, as it would get cut off too early in the process.

For that matter, your lawnmower method need not result in a single, well-defined "center" at all. Consider a lawn shaped like a dumbell; the bar will get "cut off" before the lawnmower gets to the center of either end. This means that your lawnmower could equally well end up on either side, depending on how wide the lawnmower is, how wide the isthmus is, and where you start mowing.
posted by Johnny Assay at 10:07 AM on May 24, 2007

Picture a very concave lawn—say, with a large deck in the middle or something. It would be entirely possible for the centroid of the lawn to be a point outside the lawn!
posted by cerebus19 at 10:15 AM on May 24, 2007

Response by poster: Good points, all, but what, then, is the lawnmower method identifying? The point of the lawn that is most remote from any edge of the lawn?
posted by landtuna at 10:21 AM on May 24, 2007

If you want to find the centroid of an arbitrary area, here's an applet that will let you make an arbitrary polygon and then have it show where the centroid is. I suppose you could make a polygon in the same shape as your backyard and then make some careful measurements to determine the real-world centroid of your yard.

For simple convex polygons the centroid is about where you'd expect it to be, of course, but if your yard is oddly shaped then the location of the centroid might be somewhat surprising (c.f. cerebus19's answer).
posted by jedicus at 10:30 AM on May 24, 2007

You may be right for a convex polygon - the counterexample given of the dogbone yard is a concave polygon.
posted by GuyZero at 10:34 AM on May 24, 2007

Best answer: The lawnmower method identifies the location furthest from an edge.
posted by Tallguy at 10:42 AM on May 24, 2007

Best answer: This may be getting a bit complex and slightly off-topic, but perhaps it is worth noting that, in general, finding the shortest lawn-mowing path is, in general and also in the polygonal case, NP-hard. NP-hard, for those who don't know, is a term computer scientists use to describe problems that are very difficult to solve exactly, though often there are 'good-enough' approximate methods, such as those described in the linked paper.

What this may have to do with the question at hand (or, rather, with landtuna's followup question) is that for many lawns, spiraling inward (or 'contour-parallel mowing,' to use the paper's term) may not be the shortest lawn-mowing path. So, we can at least eliminate 'shortest path' from the list of things that spiraling inward may produce.
posted by jedicus at 10:42 AM on May 24, 2007

It's not the centroid for the reasons listed above; however, once clockwise and the next time CCW is a *great* way to make the normal, "all North-South or all East-West" passes look better.
posted by notsnot at 11:50 AM on May 24, 2007

Response by poster: Yeah - when I searched around, I was amazed at all the lawn mowing aesthetes out there on the web.
posted by landtuna at 12:01 PM on May 24, 2007

Another point to consider is that your method may end up giving different endpoints based on your starting position.
posted by number9dream at 6:51 PM on May 24, 2007

All very interesting, but it doesn't solve my problem: what is the optimal lawnmowing path such that no grass is ejected outside the boundary of the lawn? :)
posted by pivotal at 3:19 AM on May 25, 2007

Yet another point to consider: the spiral method may not mow the whole lawn! (In the barbell example, once the bar is cut off, you'll end up in one of the bulbous ends unable to cross over to the other.)

I'm not sure if you were interested in centroids per se, but here's how to find the centroid of any polygon:

* For a triangle, draw a line connecting a corner to the midpoint of the opposite edge. This is called a median. There are three medians (one from each corner), and they all meet at the centroid. Of course you only have to draw two of them to determine the intersection.

Why it works: The centroid of a triangle is an "affine invariant," which means that if you mark the triangle at its centroid and then stretch it uniformly in any one direction, the centroid of the stretched triangle will be exactly where the mark ends up. The intersection of the medians is also an affine invariant, because the medians themselves are invariant; i.e., if you mark them on the original triangle and then stretch, then the marked lines will remain straight and will continue to connect corners to midpoints.

However, you can obtain any triangle at all by starting with an equilateral triangle and stretching it in the right ways. In the equilateral triangle, it's obvious that the centroid is the same as the intersection of the medians. Thus, these two points remain the same as you stretch to obtain the triangle of your choice; so they are the same in all triangles.

* For a quadrilateral, draw in one of the diagonals. This divides the quad. into two triangles. Find their centroids A' and B'. Now erase the first diagonal and draw in the other diagonal, obtaining a different division into two triangles. Find their centroids C' and D'. Draw lines connecting A' to B' and connecting C' to D', making a cross. The intersection of the cross is the centroid of the original quad.

This method works for both convex and concave quadrilaterals, though in the concave case, one of the diagonals may lie outside the quadrilateral; you may have to think about what two triangles are being formed.

Why this works: The centroid of a figure is the balance point, so it must also be the intersection of all lines on which the figure could balance. Conversely, the figure will balance on any line through its centroid. The line through A' and B' is thus a balancing line for both triangles formed by the first subdivision of the quadrilateral. But if both areas of the quad. balance, then the whole figure must balance on that line as well. Similar reasoning applies to the line through C' and D'. Thus the centroid of the whole figure must lie on both of these lines, which is enough to pinpoint it uniquely.

* For a polygon with 5 or more sides, use a method similar to the above. For example, a pentagon can be divided into a triangle and a quad. in multiple ways. You now know how to find the centroids of those polygons, so you can again find two balancing lines for the pentagon; their intersection will be the centroid.
posted by aws17576 at 10:08 AM on May 25, 2007 [1 favorite]

« Older Help me with my professor problem   |   How can I be less misanthropic and get people to... Newer »