1
$\begingroup$

I'm trying to make some program for rendering polygons. I really don't want to iterate over all of the lines and endpoints to see if two polygons are different. I've heard that if polygons centroid and area are equal they are equal - is that true? I try to think of scenario where it is not, so far I don't think I can think of one.

$\endgroup$
7
  • $\begingroup$ Do you consider $N$-gons (with $N$ fixed) which, besides, are regular (all sides are equal) ? $\endgroup$
    – Jean Marie
    Commented Jun 12, 2021 at 19:14
  • $\begingroup$ If $p_1,p_2,p_3$ are three consecutive points, you can translate $p_2$ parallel to $p_1p_2$ and the area will not change. The centroid could move, but then if you translate the whole (modified) polygon until its centroid coincides with the centroid of the original one, you will have two polygons with the same area, same centroid and different shapes. $\endgroup$
    – plop
    Commented Jun 12, 2021 at 19:14
  • 1
    $\begingroup$ What do you mean with equal/different? As far as I can see, centroid and area can at best classify polygons up to isometry, since you can for example rotate a polygon around its centroid… $\endgroup$ Commented Jun 12, 2021 at 19:15
  • $\begingroup$ @JeanMarie i want to see if 2 irregular or regular polygons fully overlap each other without tracing every line and point $\endgroup$ Commented Jun 12, 2021 at 19:16
  • $\begingroup$ @PrudiiArca by equal i mean completely align when rendered together on same coordinate grid $\endgroup$ Commented Jun 12, 2021 at 19:17

1 Answer 1

1
$\begingroup$

The claim is false.

Consider a polygon, say a triangle with centroid on the origin. Rotating the triangle around the origin / its centroid does not change the centroid nor the area of the triangle. We can obtain infinitely many different (in the sense specified in the comments) polygons in this way.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .