Can polygon change if its centroid and area are constant? [closed]

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.

• Do you consider $N$-gons (with $N$ fixed) which, besides, are regular (all sides are equal) ? Commented Jun 12, 2021 at 19:14
• 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.
– plop
Commented Jun 12, 2021 at 19:14
• 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… Commented Jun 12, 2021 at 19:15
• @JeanMarie i want to see if 2 irregular or regular polygons fully overlap each other without tracing every line and point Commented Jun 12, 2021 at 19:16
• @PrudiiArca by equal i mean completely align when rendered together on same coordinate grid Commented Jun 12, 2021 at 19:17