Skip to content

polygonLength

David Legland edited this page Feb 28, 2022 · 1 revision

Compute the perimeter of a polygon.

Usage

L = polygonLength(POLY);

Computes the boundary length of the input polygon POLY. POLY is given by a N-by-2 array of vertices.

Example

  % Perimeter of a circle approximation
  poly = circleToPolygon([0 0 1], 200);
  polygonLength(poly)

Result: ans = 6.2829

See also

polygons2d, polygonCentroid, polygonArea, drawPolygon, polylineLength

Clone this wiki locally