centroid - Maple Help

geometry

 centroid
 compute the centroid of a triangle or a set or list of points on a plane

 Calling Sequence centroid(G, g)

Parameters

 G - the name of the centroid g - triangle, set of points, or list of points

Description

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

Examples

 > $\mathrm{with}\left(\mathrm{geometry}\right):$
 > $\mathrm{ps}≔\left[\mathrm{point}\left(A,0,0\right),\mathrm{point}\left(B,2,0\right),\mathrm{point}\left(C,1,3\right),\mathrm{point}\left(F,1,6\right)\right]$
 ${\mathrm{ps}}{≔}\left[{A}{,}{B}{,}{C}{,}{F}\right]$ (1)
 > $\mathrm{centroid}\left(G,\mathrm{ps}\right)$
 ${G}$ (2)
 > $\mathrm{form}\left(G\right)$
 ${\mathrm{point2d}}$ (3)
 > $\mathrm{coordinates}\left(G\right)$
 $\left[{1}{,}\frac{{9}}{{4}}\right]$ (4)
 > $\mathrm{detail}\left(G\right)$
 $\begin{array}{ll}{\text{name of the object}}& {G}\\ {\text{form of the object}}& {\mathrm{point2d}}\\ {\text{coordinates of the point}}& \left[{1}{,}\frac{{9}}{{4}}\right]\end{array}$ (5)