CGAL 5.5.2 - Weights

#include <CGAL/Weights/mean_value_weights.h>

This weight is computed as \(w = \pm 2 \sqrt{\frac{2 (d_0 d_2 - D)}{(d d_0 + D_0)(d d_2 + D_2)}}\) with notations shown in the figure below and dot products

\(D_0 = (p_0 - q) \cdot (p_1 - q)\), \(D_2 = (p_1 - q) \cdot (p_2 - q)\), and \(D = (p_0 - q) \cdot (p_2 - q)\).

The \(\pm\) sign is a sign of the weight that depends on the configuration.

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.

mean_value.svg
Figure 105.1 Notation used for the mean value weight.

Alternative Formulations

Template Parameters
GeomTraitsa model of AnalyticWeightTraits_2 for 2D points; a model of AnalyticWeightTraits_3 for 3D points
Precondition
(d * d1 + D1) != 0 && (d * d2 + D2) != 0

Functions

template<typename GeomTraits >
GeomTraits::FT CGAL::Weights::mean_value_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 mean value weight in 2D at q using the points p0, p1, and p2. More...
 
template<typename Kernel >
Kernel::FT CGAL::Weights::mean_value_weight (const CGAL::Point_2< Kernel > &p0, const CGAL::Point_2< Kernel > &p1, const CGAL::Point_2< Kernel > &p2, const CGAL::Point_2< Kernel > &q)
 computes the mean value weight in 2D at q using the points p0, p1, and p2. More...
 

Function Documentation

◆ mean_value_weight() [1/2]

template<typename GeomTraits >
GeomTraits::FT CGAL::Weights::mean_value_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 
)

#include <CGAL/Weights/mean_value_weights.h>

computes the mean value weight in 2D at q using the points p0, p1, and p2.

Template Parameters
GeomTraitsa model of AnalyticWeightTraits_2

◆ mean_value_weight() [2/2]

template<typename Kernel >
Kernel::FT CGAL::Weights::mean_value_weight ( const CGAL::Point_2< Kernel > &  p0,
const CGAL::Point_2< Kernel > &  p1,
const CGAL::Point_2< Kernel > &  p2,
const CGAL::Point_2< Kernel > &  q 
)

#include <CGAL/Weights/mean_value_weights.h>

computes the mean value weight in 2D at q using the points p0, p1, and p2.

Template Parameters
Kernela model of Kernel