std-vector-mean | ![]() |
STD-VECTOR-MEAN
returns a point of the average of the given pointlist, the list of mean values of each coordinate. It returns a point with the same dimension as the points in the pointlist (if 2D, 3D or more).
STD-VECTOR-MEAN-3D
is optimized to work with 3D points, this always returns a 3D point.
To return the midpoint use STD-MIDPT
with two points or STD-HALFPT
with one point instead.
This is NOT the centroid nor the center of gravity for an arbitrary shaped polygon, it is only for convex polygons! See STD-CENTROID-2D
instead.
pts: a list of points. Each point must be any list of two or three numbers. If the third number, the z-value is omitted, 0.0 is used instead.
A list of numbers:
STD-VECTOR-MEAN
returns a point in the same dimension as the given pointlist.
STD-VECTOR-MEAN-3D
returns a 3D point
None.
(std-require 'STDPOINT)
Defined in STDPOINT
Note: before version 0.4001 it was in STDENT.
For a short time they were named GEOM-VECTOR-MEAN
and GEOM-VECTOR-MEAN3D