std-centroid-2d | ![]() |
STD-CENTROID-2D
returns a 2d point of the average of the given 2d pointlist, the list of mean values of each coordinate.
To return the midpoint of two points use STD-MIDPT
with two arguments instead.
This is the true "centroid" or "center of gravity" for an arbitrary shaped polygon, for convex polygons this is the same as STD-VECTOR-MEAN
.
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 2D point, a list of two numbers
None.
(std-require 'STDPOINT)
Defined in STDPOINT
Note: Before version 0.4001 it was in STDENT.
For a short time it was named GEOM-CENTROID2D