Previous Up Next

26.5.10  Barycenter in the plane

See Section 27.3.6 for barycenters of objects in space.

The barycenter command returns and draws the barycenter of a set of weighted points.

Example

The following commands will draw the barycenter of the points (1,1) with weight 1, (1,−1) with weight 1 and (1,4) with weight 2.

A:=point(1/2+i); B:=point(1-i); C:=point(4/3+4*i); barycenter([A,1],[B,1],[C,2])

or with the alternative second line:

barycenter([[A,1],[B,1],[C,2]])

or:

barycenter([[A,B,C],[1,1,2]])

Previous Up Next