REMOVEMULTIPLEVERTICES Remove multiple vertices of a polygon or polyline.
POLY2 = removeMultipleVertices(POLY, EPS)
Remove adjacent vertices that are closer than the distance EPS to each
other and merge them to a unique vertex.
POLY2 = removeMultipleVertices(POLY, EPS, CLOSED)
If CLOSED is true, also check if first and last vertices need to be
merged. If not specified, CLOSED is false.
Example
poly = [10 10; 20 10;20 10;20 20;10 20; 10 10];
poly2 = removeMultipleVertices(poly, true);
size(poly2, 1)
ans =
4
See also
polygons2d, mergeClosePoints
Package: matgeom