CGAL 5.4 - Weights
Wachspress Weight
#include <CGAL/Weights/wachspress_weights.h>


This weight is computed as $$w = \frac{C}{A_1 A_2}$$ with notations shown in the figure below.

Here, q is a query point and the points p0, p1, and p2 are its neighbors.

This weight supports only planar configurations (see more in section about Coplanarity) while alternative formulations are explained in Implementation.

Figure 104.1 Notation used for the Wachspress weight.

Alternative Formulations

Template Parameters
 GeomTraits a model of AnalyticWeightTraits_2 for 2D points; a model of AnalyticWeightTraits_3 for 3D points
Precondition
A1 != 0 && A2 != 0

## Functions

template<typename GeomTraits >
GeomTraits::FT CGAL::Weights::wachspress_weight (const typename GeomTraits::Point_2 &p0, const typename GeomTraits::Point_2 &p1, const typename GeomTraits::Point_2 &p2, const typename GeomTraits::Point_2 &q, const GeomTraits &traits)
computes the Wachspress weight in 2D at q using the points p0, p1, and p2, given a traits class traits with geometric objects, predicates, and constructions.

template<typename K >
K::FT CGAL::Weights::wachspress_weight (const CGAL::Point_2< K > &p0, const CGAL::Point_2< K > &p1, const CGAL::Point_2< K > &p2, const CGAL::Point_2< K > &q)
computes the Wachspress weight in 2D at q using the points p0, p1, and p2 which are parameterized by a Kernel K.