\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.6 - 2D and Surface Function Interpolation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::regular_neighbor_coordinates_2()

The functions regular_neighbor_coordinates_2() compute natural neighbor coordinates, also called Sibson's coordinates, for weighted 2D points provided a two-dimensional regular triangulation and a (weighted) query point inside the convex hull of the vertices of the triangulation.

We call these coordinates regular neighbor coordinates.

Requirements

  1. Rt are equivalent to the class Regular_triangulation_2<Traits, Tds>.
  2. The traits class Traits of Rt is a model of the concept RegularTriangulationTraits_2. It provides the number type FT which is a model for FieldNumberType and it must meet the requirements for the traits class of the polygon_area_2() function. A model of this traits class is Regular_triangulation_euclidean_traits_2<K, Weight>.
  3. The value type of OutputIterator is equivalent to std::pair<Rt::Weighted_point, Rt::Geom_traits::FT>, i.e. a pair associating a point and its regular neighbor coordinate.

Implementation

This function computes the areas stolen from the Voronoi cells of points in rt by the insertion of p. The total area of the Voronoi cell of p is also computed and returned by the function. If p lies outside the convex hull, the coordinate values cannot be computed and the third value of the result triple is set to false.

See Also
CGAL::natural_neighbor_coordinates_2()

Functions

template<class Rt , class OutputIterator >
CGAL::Triple< OutputIterator,
typename Rt::Geom_traits::FT,
bool > 
CGAL::regular_neighbor_coordinates_2 (const Rt &rt, const typename Rt::Weighted_point &p, OutputIterator out, typename Rt::Face_handle start=typename Rt::Face_handle())
 computes the regular neighbor coordinates for p with respect to the weighted points in the two-dimensional regular triangulation rt. More...
 
template<class Rt , class OutputIterator , class EdgeIterator , class VertexIterator >
CGAL::Triple< OutputIterator,
typename Traits::FT, bool > 
CGAL::regular_neighbor_coordinates_2 (const Rt &rt, const typename Traits::Weighted_point &p, OutputIterator out, EdgeIterator hole_begin, EdgeIterator hole_end, VertexIterator hidden_vertices_begin, VertexIterator hidden_vertices_end)
 The same as above. More...
 
template<class Rt , class OutputIterator >
CGAL::Triple< OutputIterator,
typename Rt::Geom_traits::FT,
bool > 
CGAL::regular_neighbor_coordinates_2 (const Rt &rt, typename Rt::Vertex_handle vh, OutputIterator out)
 computes the regular neighbor coordinates of the point vh->point() with respect to the vertices of rt excluding vh->point(). More...
 

Function Documentation

template<class Rt , class OutputIterator >
CGAL::Triple<OutputIterator, typename Rt::Geom_traits::FT, bool > CGAL::regular_neighbor_coordinates_2 ( const Rt &  rt,
const typename Rt::Weighted_point &  p,
OutputIterator  out,
typename Rt::Face_handle  start = typename Rt::Face_handle() 
)

computes the regular neighbor coordinates for p with respect to the weighted points in the two-dimensional regular triangulation rt.

Template Parameters
Rtmust be a Regular_triangulation_2<Traits, Tds>.
OutputIteratormust have the value type std::pair<Rt::Weighted_point, Rt::Geom_traits::FT>. The sequence of point/coordinate pairs that is computed by the function is placed starting at out.

The function returns a triple with an iterator that is placed past-the-end of the resulting sequence of point/coordinate pairs, the normalization factor of the coordinates and a Boolean value which is set to true, iff the coordinate computation was successful, i.e., if p lies inside the convex hull of the points in rt.

#include <CGAL/regular_neighbor_coordinates_2.h>

Examples:
Interpolation/rn_coordinates_2.cpp.
template<class Rt , class OutputIterator , class EdgeIterator , class VertexIterator >
CGAL::Triple<OutputIterator, typename Traits::FT, bool > CGAL::regular_neighbor_coordinates_2 ( const Rt &  rt,
const typename Traits::Weighted_point &  p,
OutputIterator  out,
EdgeIterator  hole_begin,
EdgeIterator  hole_end,
VertexIterator  hidden_vertices_begin,
VertexIterator  hidden_vertices_end 
)

The same as above.

The iterator range [hole_begin, hole_end) determines the boundary edges of the conflict zone of p in the triangulation rt. rt.hidden_vertices_begin() and rt.hidden_vertices_end() determines the iterator range over the hidden vertices of the conflict zone of p inrt. It is the result of the function rt.get_boundary_of_conflicts(p,std::back_inserter(hole), std::back_inserter(hidden_vertices), start).

#include <CGAL/regular_neighbor_coordinates_2.h>

template<class Rt , class OutputIterator >
CGAL::Triple< OutputIterator, typename Rt::Geom_traits::FT, bool > CGAL::regular_neighbor_coordinates_2 ( const Rt &  rt,
typename Rt::Vertex_handle  vh,
OutputIterator  out 
)

computes the regular neighbor coordinates of the point vh->point() with respect to the vertices of rt excluding vh->point().

The same as above for the remaining parameters.

#include <CGAL/regular_neighbor_coordinates_2.h>