The barycenter is the center of mass of 2 or more points. euclid supports calculating the barycenter of up to 4 weighted points. If the weights are the same between the points the barycenter corresponds to the centroid (or midpoint in the case of two points).
barycenter(x, y, z = NULL, t = NULL)
|x, y, z, t||
vectors of weighted points.
A point vector
p <- weighted_point( x = c(4, 0, -3), y = c(2, -4, 7), w = c(20, 8, 13) ) bc <- barycenter(p, p, p) bc#> <2D points > #>  <x:1, y:2.41>euclid_plot(bc, pch = 16, col = "firebrick", cex = 3)