algorithmgeometrypolygoncomputational-geometrysymmetric

Check if a polygon is symmetric


Given a polygon (not necessary convex) in the Cartesian coordinate, i wonder if there are any way to check the symmetricalness of that polygon?

I can think of an O(N) solution: using rotating calipers to check if each pair of opposite edge is parallel and equal in size. However, i can't prove the correctness of that algorithm. Can you suggest any better solution?


Solution

  • This will prove that your polygon is symmetric indeed.

    Complexity : N, assuming you can access directly your vertices from their coordinates.