Function

CGAL::barycenter

Point_2<Kernel> barycenter ( Point_2<Kernel> p1, Kernel::FT w1, Point_2<Kernel> p2)
compute the barycenter of the points p1 and p2 with corresponding weights w1 and 1-w1.

Point_2<Kernel> barycenter ( Point_2<Kernel> p1, Kernel::FT w1, Point_2<Kernel> p2, Kernel::FT w2)
compute the barycenter of the points p1 and p2 with corresponding weights w1 and w2.
Precondition: w1+w2 != 0.

Point_2<Kernel>
barycenter ( Point_2<Kernel> p1,
Kernel::FT w1,
Point_2<Kernel> p2,
Kernel::FT w2,
Point_2<Kernel> p3)
compute the barycenter of the points p1, p2 and p3 with corresponding weights w1, w2 and 1-w1-w2.

Point_2<Kernel>
barycenter ( Point_2<Kernel> p1,
Kernel::FT w1,
Point_2<Kernel> p2,
Kernel::FT w2,
Point_2<Kernel> p3,
Kernel::FT w3)
compute the barycenter of the points p1, p2 and p3 with corresponding weights w1, w2 and w3.
Precondition: w1+w2+w3 != 0.

Point_2<Kernel>
barycenter ( Point_2<Kernel> p1,
Kernel::FT w1,
Point_2<Kernel> p2,
Kernel::FT w2,
Point_2<Kernel> p3,
Kernel::FT w3,
Point_2<Kernel> p4)
compute the barycenter of the points p1, p2, p3 and p4 with corresponding weights w1, w2, w3 and 1-w1-w2-w3.

Point_2<Kernel>
barycenter ( Point_2<Kernel> p1,
Kernel::FT w1,
Point_2<Kernel> p2,
Kernel::FT w2,
Point_2<Kernel> p3,
Kernel::FT w3,
Point_2<Kernel> p4,
Kernel::FT w4)
compute the barycenter of the points p1, p2, p3 and p4 with corresponding weights w1, w2, w3 and w4.
Precondition: w1+w2+w3+w4 != 0.

Point_3<Kernel> barycenter ( Point_3<Kernel> p1, Kernel::FT w1, Point_3<Kernel> p2)
compute the barycenter of the points p1 and p2 with corresponding weights w1 and 1-w1.

Point_3<Kernel> barycenter ( Point_3<Kernel> p1, Kernel::FT w1, Point_3<Kernel> p2, Kernel::FT w2)
compute the barycenter of the points p1 and p2 with corresponding weights w1 and w2.
Precondition: w1+w2 != 0.

Point_3<Kernel>
barycenter ( Point_3<Kernel> p1,
Kernel::FT w1,
Point_3<Kernel> p2,
Kernel::FT w2,
Point_3<Kernel> p3)
compute the barycenter of the points p1, p2 and p3 with corresponding weights w1, w2 and 1-w1-w2.

Point_3<Kernel>
barycenter ( Point_3<Kernel> p1,
Kernel::FT w1,
Point_3<Kernel> p2,
Kernel::FT w2,
Point_3<Kernel> p3,
Kernel::FT w3)
compute the barycenter of the points p1, p2 and p3 with corresponding weights w1, w2 and w3.
Precondition: w1+w2+w3 != 0.

Point_3<Kernel>
barycenter ( Point_3<Kernel> p1,
Kernel::FT w1,
Point_3<Kernel> p2,
Kernel::FT w2,
Point_3<Kernel> p3,
Kernel::FT w3,
Point_3<Kernel> p4)
compute the barycenter of the points p1, p2, p3 and p4 with corresponding weights w1, w2, w3 and 1-w1-w2-w3.

Point_3<Kernel>
barycenter ( Point_3<Kernel> p1,
Kernel::FT w1,
Point_3<Kernel> p2,
Kernel::FT w2,
Point_3<Kernel> p3,
Kernel::FT w3,
Point_3<Kernel> p4,
Kernel::FT w4)
compute the barycenter of the points p1, p2, p3 and p4 with corresponding weights w1, w2, w3 and w4.
Precondition: w1+w2+w3+w4 != 0.

See Also

CGAL::centroid