There was an error while loading. Please reload this page.
Computes the centroid of a curve defined by a series of points.
PT = polylineCentroid(POINTS);
Computes center of mass of a polyline defined by POINTS. POINTS is a N-by-D array of double, representing a set of N points in a D-dimensional space.
POINTS
PT = polylineCentroid(PTX, PTY); PT = polylineCentroid(PTX, PTY, PTZ);
Specifies points as separate column vectors
PT = polylineCentroid(..., TYPE);
Specifies if the last point is connected to the first one. TYPE can be either 'closed' or 'open'.
TYPE
poly = [0 0;10 0;10 10;20 10]; polylineCentroid(poly)
Result:
ans = [10 5]
polygons2d, centroid, polygonCentroid, polylineLength
Home
geom2d
polygons2d
polynomialCurves2d
geom3d
meshes3d
graphs
Coding conventions
Contributors