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.
with⁡geom3d:
ps≔point⁡A,0,0,0,point⁡B,1,0,0,point⁡C,0,1,0,point⁡F,0,0,1:
gtetrahedron⁡ABCF,ps,triangle⁡BCF,B,C,F:
centroid⁡G1,ps:
coordinates⁡G1
14,14,14
centroid⁡G2,ABCF:
centroid⁡G3,BCF:
coordinates⁡G3
13,13,13
See Also
geom3d[coordinates]
geom3d[gtetrahedron]
Download Help Document