Previous Up Next

25.3.6  Finding the barycenter of a set of points in space

See Section 24.5.10 for barycenters of objects in the plane.

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

If the sum of the weights is zero, then this command returns an error.

Examples

BC:=barycenter([point(1,4,0),1],[point(1,-2,0),1])

or:

BC:=barycenter([[point(1,4,0),1],[point(1,-2,0),1]])

then:

coordinates(BC)
     

1,1,0
          

Previous Up Next