centroid - Maple Help

geom3d

 centroid
 compute the centroid of a given general tetrahedron or a given triangle or a list of points in space

 Calling Sequence centroid(G, g)

Parameters

 G - the name of the centroid g - a tetrahedron or a triangle or a list of points

Description

 • 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.

Examples

 > $\mathrm{with}\left(\mathrm{geom3d}\right):$
 > $\mathrm{ps}≔\left[\mathrm{point}\left(A,0,0,0\right),\mathrm{point}\left(B,1,0,0\right),\mathrm{point}\left(C,0,1,0\right),\mathrm{point}\left(F,0,0,1\right)\right]:$
 > $\mathrm{gtetrahedron}\left(\mathrm{ABCF},\mathrm{ps}\right),\mathrm{triangle}\left(\mathrm{BCF},\left[B,C,F\right]\right):$
 > $\mathrm{centroid}\left(\mathrm{G1},\mathrm{ps}\right):$
 > $\mathrm{coordinates}\left(\mathrm{G1}\right)$
 $\left[\frac{{1}}{{4}}{,}\frac{{1}}{{4}}{,}\frac{{1}}{{4}}\right]$ (1)
 > $\mathrm{centroid}\left(\mathrm{G2},\mathrm{ABCF}\right):$
 > $\mathrm{coordinates}\left(\mathrm{G1}\right)$
 $\left[\frac{{1}}{{4}}{,}\frac{{1}}{{4}}{,}\frac{{1}}{{4}}\right]$ (2)
 > $\mathrm{centroid}\left(\mathrm{G3},\mathrm{BCF}\right):$
 > $\mathrm{coordinates}\left(\mathrm{G3}\right)$
 $\left[\frac{{1}}{{3}}{,}\frac{{1}}{{3}}{,}\frac{{1}}{{3}}\right]$ (3)