POLYLINECENTROID Compute 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
   [NxD] array of double, representing a set of N points in a
   D-dimensional space.

   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'.

   Example
   poly = [0 0;10 0;10 10;20 10];
   polylineCentroid(poly)
   ans = 
       [10 5]

   See also:
   polygons2d, centroid, polygonCentroid, polylineLength

   ---------
   author : David Legland 
   INRA - TPV URPOI - BIA IMASTE
   created the 22/05/2006.

Package: matgeom