geom3d
centroid
compute the centroid of a given general tetrahedron or a given triangle or a list of points in space
Calling Sequence
Parameters
Description
Examples
centroid(G, g)
G
-
the name of the centroid
g
a tetrahedron or a triangle or a list of points
The routine computes the centroid of a given tetrahedron, a triangle, or a list of points.
For more details on the centroid G use coordinates.
The command with(geom3d,centroid) allows the use of the abbreviated form of this command.
withgeom3d:
ps≔pointA,0,0,0,pointB,1,0,0,pointC,0,1,0,pointF,0,0,1:
gtetrahedronABCF,ps,triangleBCF,B,C,F:
centroidG1,ps:
coordinatesG1
14,14,14
centroidG2,ABCF:
centroidG3,BCF:
coordinatesG3
13,13,13
See Also
geom3d[coordinates]
geom3d[gtetrahedron]
Download Help Document