CGAL 5.4.1 - Weights

#include <CGAL/Weights/tangent_weights.h>

This weight is computed as \(w = 2 \frac{t_1 + t_2}{d}\), where \(t_1 = \frac{2 A_1}{d d_1 + D_1}\) and \(t_2 = \frac{2 A_2}{d d_2 + D_2}\) with notations shown in the figure below and dot products

\(D_1 = (p_0 - q) \cdot (p_1 - q)\) and \(D_2 = (p_1 - q) \cdot (p_2 - q)\).

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

Alternative formulations are explained in Implementation.

tangent.svg
Figure 104.1 Notation used for the tangent 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 && d != 0

Functions

template<typename FT >
FT CGAL::Weights::tangent_half_angle (const FT d, const FT l, const FT A, const FT D)
 computes the tangent of the half angle. More...
 
template<typename FT >
FT CGAL::Weights::half_tangent_weight (const FT tan05, const FT d)
 computes the half value of the tangent weight. More...
 
template<typename FT >
FT CGAL::Weights::half_tangent_weight (const FT d, const FT l, const FT A, const FT D)
 computes the half value of the tangent weight. More...
 
template<typename GeomTraits >
GeomTraits::FT CGAL::Weights::tangent_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 tangent 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 GeomTraits >
GeomTraits::FT CGAL::Weights::tangent_weight (const typename GeomTraits::Point_3 &p0, const typename GeomTraits::Point_3 &p1, const typename GeomTraits::Point_3 &p2, const typename GeomTraits::Point_3 &q, const GeomTraits &traits)
 computes the tangent weight in 3D 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::tangent_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 tangent weight in 2D at q using the points p0, p1, and p2 which are parameterized by a Kernel K.
 
template<typename K >
K::FT CGAL::Weights::tangent_weight (const CGAL::Point_3< K > &p0, const CGAL::Point_3< K > &p1, const CGAL::Point_3< K > &p2, const CGAL::Point_3< K > &q)
 computes the tangent weight in 3D at q using the points p0, p1, and p2 which are parameterized by a Kernel K.
 

Function Documentation

◆ half_tangent_weight() [1/2]

template<typename FT >
FT CGAL::Weights::half_tangent_weight ( const FT  tan05,
const FT  d 
)

#include <CGAL/Weights/tangent_weights.h>

computes the half value of the tangent weight.

This function constructs the half of the tangent weight using the precomputed half angle tangent and distance values. The returned value is \(\frac{2\textbf{tan05}}{\textbf{d}}\).

Template Parameters
FTa model of FieldNumberType
Parameters
tan05the half angle tangent value
dthe distance value
Precondition
d != 0
See also
tangent_half_angle()
tangent_weight()

◆ half_tangent_weight() [2/2]

template<typename FT >
FT CGAL::Weights::half_tangent_weight ( const FT  d,
const FT  l,
const FT  A,
const FT  D 
)

#include <CGAL/Weights/tangent_weights.h>

computes the half value of the tangent weight.

This function constructs the half of the tangent weight using the precomputed distance, area, and dot product values. The returned value is \(\frac{2\textbf{t}}{\textbf{d}}\) where \(\textbf{t} = \frac{2\textbf{A}}{\textbf{d}\textbf{l} + \textbf{D}}\).

Template Parameters
FTa model of FieldNumberType
Parameters
dthe distance value
lthe distance value
Athe area value
Dthe dot product value
Precondition
(d * l + D) != 0 && d != 0
See also
tangent_weight()

◆ tangent_half_angle()

template<typename FT >
FT CGAL::Weights::tangent_half_angle ( const FT  d,
const FT  l,
const FT  A,
const FT  D 
)

#include <CGAL/Weights/tangent_weights.h>

computes the tangent of the half angle.

This function computes the tangent of the half angle using the precomputed distance, area, and dot product values. The returned value is \(\frac{2\textbf{A}}{\textbf{d}\textbf{l} + \textbf{D}}\).

Template Parameters
FTa model of FieldNumberType
Parameters
dthe distance value
lthe distance value
Athe area value
Dthe dot product value
Precondition
(d * l + D) != 0
See also
half_tangent_weight()