The class Regular_triangulation_2<Traits,Tds> is designed to maintain the regular triangulation of a set of weighted points.
Let be a set of weighted points where each is a point and each is a scalar called the weight of point . Alternatively, each weighted point can be regarded as a two dimensional sphere with center and radius .
The power diagram of the set is a planar partition such that each cell corresponds to sphere of and is the locus of points whose power with respect to is less than its power with respect to any other sphere in . The dual of this diagram is a triangulation whose domain covers the convex hull of the set of center points and whose vertices are a subset of . Such a triangulation is called a regular triangulation. The three points and of form a triangle in the regular triangulation of iff there is a point of the plane whose powers with respect to , and are equal and less than the power of with respect to any other sphere in .
Let us defined the power product of two weighted points and as:
is simply the power of point with respect to the sphere , and two weighted points are said to be orthogonal if their power product is null. The power circle of three weighted points , and is defined as the unique circle orthogonal to , and .
The regular triangulation of the sets satisfies the following regular property (which just reduces to the Delaunay property when all the weights are null): a triangle of the regular triangulation of is such that the power product of any weighted point of with the power circle of , is is positive or null. We call power test of the weighted point with respect to the face , the predicates testing the sign of the power product of with respect to the power circle of , is . This power product is given by the following determinant
A pair of neighboring faces and is said to be locally regular (with respect to the weights in ) if the power test of with respect to is positive. A classical result of computational geometry establishes that a triangulation of the convex hull of such that any pair of neighboring faces is regular with respect to , is a regular triangulation of .
Alternatively, the regular triangulation of the weighted points set can be obtained as the projection on the two dimensional plane of the convex hull of the set of three dimensional points .
The vertices of the regular triangulation of a set of weighted points form only a subset of the set of center points of . Therefore the insertion of a weighted point in a regular triangulation does not necessarily imply the creation of a new vertex. If the new inserted point does not appear as a vertex in the regular triangulation, it is said to be hidden.
Hidden points are stored in special vertices called hidden vertices. A hidden point is considered as hidden by the facet of the triangulation where its point component is located : in fact, the hidden point can appear as vertex of the triangulation only if this facet is removed. Each face of a regular triangulation stores the list of hidden vertices whose points are located in the facet. When a facet is removed, points hidden by this facet are reinserted in the triangulation.
#include <CGAL/Regular_triangulation_2.h>
The Tds parameter has to be instantiated by a model of TriangulationDataStructure_2. The face base of a regular triangulation has to be a model of the concept RegularTriangulationFaceBase_2. while the vertex base class has to be a model of RegularTriangulationVertexBase_2. CGAL provides a default instantiation for the Tds parameter by the class CGAL::Triangulation_data_structure_2 < CGAL::Reugular_triangulation_vertex_base_2<Traits>, CGAL::Regular_Triangulation_face_base_2<Traits> >.
| ||
|
||
| ||
|
||
| ||
|
||
| ||
|
||
| ||
|
| |
An iterator that allows to enumerate the
vertices that are not hidden.
| |
| |
An iterator that allows to enumerate the
finite vertices that are not hidden.
| |
| |
An iterator that allows to enumerate the
hidden vertices.
|
| |
Introduces an empty regular triangulation rt.
| |
| |
Copy constructor.
|
|
| |||
inserts weighted point p in the regular triangulation. If the point p does not appear as a vertex of the triangulation, the returned vertex is a hidden vertex. If given the parameter f is used as an hint for the place to start the location process of point p. | ||||
|
| |||
insert a weighted point p whose bare-point is assumed to be located in lt,loc,li. | ||||
|
| |||
Equivalent to insert(p). | ||||
| ||||
|
| |||
inserts the weighted points in the range
first, last.
Returns the number of created vertices. Precondition: The value_type of first and last is Weighted_point. | ||||
|
| |||
removes the vertex from the triangulation. |
| ||||
| ||||
| ||||
OutputItFaces is an output iterator with Face_handle as value type. OutputItBoundaryEdges stands for an output iterator with Edge as value type. OutputItHiddenVertices is an output iterator with Vertex_handle as value type. This member function outputs in the container pointed to by fit the faces which are in conflict with point p i. e. the faces whose power circles have negative power wrt. p. It outputs in the container pointed to by eit the boundary of the zone in conflict with p. It inserts the vertices that would be hidden by p into the container pointed to by vit. The boundary edges of the conflict zone are ouput in counter-clockwise order and each edge is described through its incident face which is not in conflict with p. The function returns in a CGAL::Triple the resulting output iterators. | ||||
| ||||
| ||||
| ||||
same as above except that only the faces in conflict with p and the boundary edges of the conflict zone are output via the corresponding output iterators. The function returns in a std::pair the resulting output iterators. | ||||
| ||||
| ||||
| ||||
same as above except that only the faces in conflict with p and the vertices that would be hidden by p are output via the corresponding output iterators. The function returns in a std::pair the resulting output iterators. | ||||
| ||||
| ||||
| ||||
same as above except that only the the vertices that would be hidden by p and the boundary of the zone in conflict with p are output via the corresponding output iterators. The boundary edges of the conflict zone are ouput in counterclockwise order and each edge is described through the incident face which is not in conflict with p. The function returns in a std::pair the resulting output iterators. | ||||
| ||||
|
| |||
same as above except that only the faces in conflict with p are output. The function returns the resulting output iterator. | ||||
| ||||
| ||||
| ||||
same as above except that only the boundary edges of the conflict zone are ouput in counterclockwise order where each edge is described through the incident face which is not in conflict with p. The function returns the resulting output iterator. | ||||
| ||||
| ||||
| ||||
same as above except that only the vertices that would be hidden by p are output. The function returns the resulting output iterator. |
|
| |
returns the center of the circle orthogonal to the three weighted
points corresponding to the vertices of face f. Precondition: f is not infinite | ||
|
| |
same as weighted_circumcenter | ||
|
| If both incident faces are finite, returns a segment whose endpoints are the duals of each incident face. If only one incident face is finite, returns a ray whose endpoint is the dual of the finite incident face and supported by the line which is the bisector of the edge's endpoints. If both incident faces are infinite, returns the line which is the bisector of the edge's endpoints otherwise. |
|
| |
Idem | ||
|
| |
Idem | ||
| ||
|
| |
output the dual power diagram to stream ps. |
|
| |
Returns the power test of p with respect to the power circle associated with f |
advanced |
|
| |
Tests the validity of the triangulation as a Triangulation_2 and additionally test the regularity of the triangulation. This method is useful to debug regular triangulation algorithms implemented by the user. |
advanced |