geometry
centroid
compute the centroid of a triangle or a set or list of points on a plane
Calling Sequence
Parameters
Description
Examples
centroid(G, g)
G
-
the name of the centroid
g
triangle, set of points, or list of points
If g is a triangle, the centroid is the point of intersections of medians.
For a detailed description of the centroid G, use the routine detail (i.e., detail(G))
Note that the routine only works if the vertices of the triangle are known.
The command with(geometry,centroid) allows the use of the abbreviated form of this command.
with⁡geometry:
ps≔point⁡A,0,0,point⁡B,2,0,point⁡C,1,3,point⁡F,1,6
ps≔A,B,C,F
centroid⁡G,ps
form⁡G
point2d
coordinates⁡G
1,94
detail⁡G
name of the objectGform of the objectpoint2dcoordinates of the point1,94
See Also
geometry[midpoint]
geometry[OnSegment]
geometry[point]
geometry[triangle]
Download Help Document