CGAL 6.0 - Weights
Loading...
Searching...
No Matches

#include<CGAL/Weights/cotangent_weights.h>

This weight is computed as \(w = 2 (\cot\beta + \cot\gamma)\) with notations shown in the figure below.

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

Alternative formulations are explained in Implementation.

Figure 110.1 Notation used for the cotangent weight.


Alternative Formulations

Template Parameters
GeomTraitsa model of AnalyticWeightTraits_2 for 2D points; a model of AnalyticWeightTraits_3 for 3D points

Functions

template<typename FT >
FT CGAL::Weights::half_cotangent_weight (const FT cot)
 computes the half value of the cotangent weight.
 
template<typename GeomTraits >
GeomTraits::FT CGAL::Weights::cotangent_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 cotangent weight in 2D at q using the points p0, p1, and p2.
 
template<typename Kernel >
Kernel::FT CGAL::Weights::cotangent_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 cotangent weight in 2D at q using the points p0, p1, and p2.
 
template<typename GeomTraits >
GeomTraits::FT CGAL::Weights::cotangent_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 cotangent weight in 3D at q using the points p0, p1, and p2.
 
template<typename Kernel >
Kernel::FT CGAL::Weights::cotangent_weight (const CGAL::Point_3< Kernel > &p0, const CGAL::Point_3< Kernel > &p1, const CGAL::Point_3< Kernel > &p2, const CGAL::Point_3< Kernel > &q)
 computes the cotangent weight in 3D at q using the points p0, p1, and p2.
 

Function Documentation

◆ cotangent_weight() [1/4]

template<typename Kernel >
Kernel::FT CGAL::Weights::cotangent_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/cotangent_weights.h>

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

Template Parameters
Kernela model of Kernel

◆ cotangent_weight() [2/4]

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

#include <CGAL/Weights/cotangent_weights.h>

computes the cotangent weight in 3D at q using the points p0, p1, and p2.

Template Parameters
Kernela model of Kernel

◆ cotangent_weight() [3/4]

template<typename GeomTraits >
GeomTraits::FT CGAL::Weights::cotangent_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/cotangent_weights.h>

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

Template Parameters
GeomTraitsa model of AnalyticWeightTraits_2
Examples
Weights/weighted_laplacian.cpp.

◆ cotangent_weight() [4/4]

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

#include <CGAL/Weights/cotangent_weights.h>

computes the cotangent weight in 3D at q using the points p0, p1, and p2.

Template Parameters
GeomTraitsa model of AnalyticWeightTraits_3

◆ half_cotangent_weight()

template<typename FT >
FT CGAL::Weights::half_cotangent_weight ( const FT  cot)

#include <CGAL/Weights/cotangent_weights.h>

computes the half value of the cotangent weight.

This function constructs the half of the cotangent weight using the precomputed cotangent value. The returned value is \(2\textbf{cot}\).

Template Parameters
FTa model of FieldNumberType
Parameters
cotthe cotangent value
See also
cotangent_weight()