Find the shape’s center of mass

Tap anywhere on the board to place your guess for the shape’s centroid. Drag to refine, then confirm. The puzzle scores you on the distance between your guess and the true centroid — the closer, the higher the score. Shapes with holes, concave notches, and long thin limbs are the ones where intuition breaks.

The math: the centroid formula

For a uniformly dense planar region, the centroid is the area-weighted average of all points inside the shape:

$$\bar{x} = \frac{1}{A}\iint_R x\,dA, \qquad \bar{y} = \frac{1}{A}\iint_R y\,dA$$

For a closed polygon with vertices $(x_i, y_i)$ and signed area $A$ there's a tidy closed form:

$$\bar{x} = \frac{1}{6A}\sum_{i=0}^{n-1} (x_i + x_{i+1})(x_i y_{i+1} - x_{i+1} y_i)$$

The curved shapes here are sampled into dense polylines before this math runs, so the same formula works in practice. But the qualitative facts are more useful while playing:

  • The centroid is invariant under translation and rotation.
  • It lies strictly inside any convex region.
  • For non-convex or holed shapes, the centroid can lie outside the shape entirely. The classic example is an annulus: the centroid sits exactly at the empty center.
  • Holes subtract mass — effectively they have negative area in the centroid sum.

Tips

  • Split the shape mentally into simple sub-regions (rectangles, lobes). Each has its own centroid; the whole-shape centroid is a weighted average of those, weighted by area.
  • A compact lobe pulls the centroid more than a long thin limb of the same area — but “more than the limb” doesn’t mean “toward the lobe entirely.”
  • Holes push the centroid away from the hole.
  • For crescent / C-shapes, the centroid often sits in the empty mouth, not in the solid body.

Related

  • Pole Balance — the centroid, but you place a 1D pivot.
  • Cut in half — any line through the centroid is a candidate bisector, but not every bisector passes through the centroid.
  • Inscribed Square — vertex placement, the Toeplitz problem.