POLYGONSYMMETRYAXIS Try to identify symmetry axis of polygon. LINE = polygonSymmetryAxis(POLY) Returns a line that minimize difference between the polygon POLY and its reflection with the line. The difference metric between the two polygons is the sum of distances between each vertex of original polygon to the reflected polygon. Example % identify symmetry axis of an ellipse elli = [50 50 40 20 30]; poly = ellipseToPolygon(elli, 100); line = polygonSymmetryAxis(poly); figure; hold on; drawEllipse(elli); axis equal; axis ([0 100 0 100]); drawLine(line); See also transforms2d, transformPoint, distancePointPolygon
Package: matgeom