CGAL 6.2 - Weights

Loading...
Searching...
No Matches
Functions
Tangent Weight
Reference Manual » Analytic 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_0}{d d_0 + D_0}\) and \(t_2 = \frac{2 A_2}{d d_2 + D_2}\) with notations shown in the figure below and dot products

\(D_0 = (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.

Figure 118.1 Notation used for the tangent weight.

Alternative Formulations

- This weight is equal to the Mean Value 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
  (d * d1 + D1) != 0 && (d * d2 + D2) != 0 && d != 0

## Functions
template<typename FT >
FT | CGAL::Weights::half_tangent_weight (const FT tan05, const FT d)
| computes the half value of the tangent weight.
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.
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.
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`
template<typename Kernel >
Kernel::FT | CGAL::Weights::tangent_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 tangent weight in 2D at `q` using the points `p0`, `p1`, and `p2`
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`
template<typename Kernel >
Kernel::FT | CGAL::Weights::tangent_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 tangent weight in 3D at `q` using the points `p0`, `p1`, and `p2`

## Function Documentation

## ◆ half_tangent_weight() [1/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

  FT | a model of `FieldNumberType`

Parameters

  d | the distance value
  l | the distance value
  A | the area value
  D | the dot product value

Precondition
  (d * l + D) != 0 && d != 0

See also
  `tangent_weight()`

## ◆ half_tangent_weight() [2/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

  FT | a model of `FieldNumberType`

Parameters

  tan05 | the half angle tangent value
  d | the distance value

Precondition
  d != 0

See also
  `tangent_half_angle()`
  `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

  FT | a model of `FieldNumberType`

Parameters

  d | the distance value
  l | the distance value
  A | the area value
  D | the dot product value

Precondition
  (d * l + D) != 0

See also
  `half_tangent_weight()`

## ◆ tangent_weight() [1/4]

template<typename Kernel >

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

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

Template Parameters

  Kernel | a model of `Kernel`

## ◆ tangent_weight() [2/4]

template<typename Kernel >

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

computes the tangent weight in 3D at `q` using the points `p0`, `p1`, and `p2`

Template Parameters

  Kernel | a model of `Kernel`

## ◆ tangent_weight() [3/4]

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
| ) |  |

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

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

Template Parameters

  GeomTraits | a model of `AnalyticWeightTraits_2`

Examples
  Weights/weights.cpp.

## ◆ tangent_weight() [4/4]

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
| ) |  |

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

computes the tangent weight in 3D at `q` using the points `p0`, `p1`, and `p2`

Template Parameters

  GeomTraits | a model of `AnalyticWeightTraits_3`