CGAL 6.2 - Weights

Loading...
Searching...
No Matches
Functions
Discrete Harmonic Weight
Reference Manual » Analytic Weights

##

`#include<CGAL/Weights/discrete_harmonic_weights.h>`

This weight is computed as \(w = \frac{d_2^2 A_0 - d^2 B + d_0^2 A_2}{A_0 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 118.1 Notation used for the discrete harmonic weight.

Alternative Formulations

- This weight is equal to the Cotangent Weight.
- This weight is a special case of the Three Point Family Weight.

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::discrete_harmonic_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 discrete harmonic weight in 2D at `q` using the points `p0`, `p1`, and `p2`.
template<typename Kernel >
Kernel::FT | CGAL::Weights::discrete_harmonic_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 discrete harmonic weight in 2D at `q` using the points `p0`, `p1`, and `p2`.

## Function Documentation

## ◆ discrete_harmonic_weight() [1/2]

template<typename Kernel >

Kernel::FT CGAL::Weights::discrete_harmonic_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/discrete_harmonic_weights.h>`

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

Template Parameters

  Kernel | a model of `Kernel`

## ◆ discrete_harmonic_weight() [2/2]

template<typename GeomTraits >

GeomTraits::FT CGAL::Weights::discrete_harmonic_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/discrete_harmonic_weights.h>`

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

Template Parameters

  GeomTraits | a model of `AnalyticWeightTraits_2`