An instance DT of type Delaunay_d< R, Lifted_R > is the nearest and furthest site Delaunay triangulation of a set S of points in some -dimensional space. We call S the underlying point set and or dim the dimension of the underlying space. We use dcur to denote the affine dimension of S. The data type supports incremental construction of Delaunay triangulations and various kind of query operations (in particular, nearest and furthest neighbor queries and range queries with spheres and simplices).
A Delaunay triangulation is a simplicial complex. All simplices in the Delaunay triangulation have dimension dcur. In the nearest site Delaunay triangulation the circumsphere of any simplex in the triangulation contains no point of in its interior. In the furthest site Delaunay triangulation the circumsphere of any simplex contains no point of in its exterior. If the points in are co-circular then any triangulation of is a nearest as well as a furthest site Delaunay triangulation of . If the points in are not co-circular then no simplex can be a simplex of both triangulations. Accordingly, we view DT as either one or two collection(s) of simplices. If the points in are co-circular there is just one collection: the set of simplices of some triangulation. If the points in are not co-circular there are two collections. One collection consists of the simplices of a nearest site Delaunay triangulation and the other collection consists of the simplices of a furthest site Delaunay triangulation.
For each simplex of maximal dimension there is a handle of type Simplex_handle and for each vertex of the triangulation there is a handle of type Vertex_handle. Each simplex has 1 + dcur vertices indexed from to dcur. For any simplex and any index , DT.vertex_of(s,i) returns the -th vertex of . There may or may not be a simplex opposite to the vertex of with index . The function DT.opposite_simplex(s,i) returns if it exists and returns Simplex_handle() otherwise. If exists then and share dcur vertices, namely all but the vertex with index of and the vertex with index DT.index_of_vertex_in_opposite_simplex(s,i) of . Assume that exists and let . Then s = DT.opposite_simplex(t,j) and i = DT.index_of_vertex_in_opposite_simplex(t,j). In general, a vertex belongs to many simplices.
Any simplex of DT belongs either to the nearest or to the furthest site Delaunay triangulation or both. The test DT.simplex_of_nearest(dt_simplex s) returns true if s belongs to the nearest site triangulation and the test DT.simplex_of_furthest(dt_simplex s) returns true if s belongs to the furthest site triangulation.
| |
handles to the simplices of the complex.
| |
| |
handles to vertices of the complex.
| |
| |
the point type
| |
| |
the sphere type
| |
| |
interface flags
|
To use these types you can typedef them into the global scope after instantiation of the class. We use Vertex_handle instead of Delaunay_d< R, Lifted_R >::Vertex_handle from now on. Similarly we use Simplex_handle.
| |
the iterator for points.
| |
| |
the iterator for vertices.
| |
| |
the iterator for simplices.
|
| |||
creates an instance DT of type Delaunay_d. The
dimension of the underlying space is and S is initialized to the
empty point set. The traits class R specifies the models of
all types and the implementations of all geometric primitives used by
the Delaunay class. The traits class Lifted_R specifies the models of
all types and the implementations of all geometric primitives used by
the base class of Delaunay_d< R, Lifted_R >. The second template parameter defaults to
the first: Delaunay_d<R> = Delaunay_d<R, Lifted_R = R >.
|
The data type Delaunay_d offers neither copy constructor nor assignment operator.
R is a model of the concept DelaunayTraits_d . Lifted_R is a model of the concept DelaunayLiftedTraits_d .
All operations below that take a point x as an argument have the common precondition that .
|
| returns the dimension of ambient space | ||
|
| |||
returns the affine dimension of the current point set, i.e., is is empty, if consists of a single point, if all points of lie on a common line, etcetera. | ||||
|
| |||
returns true if s is a simplex of the nearest site triangulation. | ||||
|
| |||
returns true if s is a simplex of the furthest site triangulation. | ||||
|
| |||
returns the vertex associated with the -th node of . Precondition: . | ||||
|
| |||
returns the point associated with vertex . | ||||
|
| |||
returns the point associated with the -th vertex of . Precondition: . | ||||
|
| |||
returns the simplex opposite to the -th vertex of
(Simplex_handle() if there is no such simplex). Precondition: . | ||||
|
| |||
returns the index of the vertex opposite to the -th vertex
of . Precondition: . | ||||
|
| |||
returns a simplex of the nearest site triangulation incident to . | ||||
|
| |||
returns the index of in DT.simplex(v). | ||||
|
| |||
returns true if x is contained in the closure of simplex s. | ||||
|
| decides whether DT is empty. | ||
|
| reinitializes DT to the empty Delaunay triangulation. | ||
|
| |||
inserts point into DT and returns the corresponding Vertex_handle. More precisely, if there is already a vertex v in DT positioned at (i.e., associated_point(v) is equal to x) then associated_point(v) is changed to x (i.e., associated_point(v) is made identical to x) and if there is no such vertex then a new vertex with associated_point(v) = x is added to DT. In either case, is returned. | ||||
|
| |||
returns a simplex of the nearest site triangulation containing x in its closure (returns Simplex_handle() if x lies outside the convex hull of ). | ||||
|
| |||
if DT contains a vertex with associated_point(v) = x the result is otherwise the result is Vertex_handle(). | ||||
|
| |||
computes a vertex of DT that is closest to ,
i.e., min. | ||||
| ||||
| ||||
returns the list of all vertices contained in the closure of sphere . | ||||
| ||||
| ||||
returns the list of all vertices contained in the closure of
the simplex whose corners are given by A. Precondition: A must consist of affinely independent points in base space. | ||||
| ||||
| ||||
returns a list of all simplices of either the nearest or the furthest site Delaunay triangulation of S. | ||||
| ||||
| ||||
returns a list of all vertices of either the nearest or the furthest site Delaunay triangulation of S. | ||||
|
| returns . | ||
| ||||
| returns the start iterator for points in DT. | |||
| ||||
| returns the past the end iterator for points in DT. | |||
|
| |||
returns the start iterator for simplices of DT. | ||||
|
| |||
returns the past the end iterator for simplices of DT. |
The data type is derived from Convex_hull_d via the lifting map. For a point in -dimensional space let lift(x) be its lifting to the unit paraboloid of revolution. There is an intimate relationship between the Delaunay triangulation of a point set and the convex hull of lift(S): The nearest site Delaunay triangulation is the projection of the lower hull and the furthest site Delaunay triangulation is the upper hull. For implementation details we refer the reader to the implementation report available from the CGAL server.
The space requirement is the same as for convex hulls. The time requirement for an insert is the time to insert the lifted point into the convex hull of the lifted points.
The abstract data type Delaunay_d has a default instantiation by means of the -dimensional geometric kernel.
#include <CGAL/Homogeneous_d.h> #include <CGAL/leda_integer.h> #include <CGAL/Delaunay_d.h> typedef leda_integer RT; typedef CGAL::Homogeneous_d<RT> Kernel; typedef CGAL::Delaunay_d<Kernel> Delaunay_d; typedef Delaunay_d::Point_d Point; typedef Delaunay_d::Simplex_handle Simplex_handle; typedef Delaunay_d::Vertex_handle Vertex_handle; int main() { Delaunay_d T(2); Vertex_handle v1 = T.insert(Point_d(2,11)); ... }
Delaunay_d< R, Lifted_R > requires the following types from the kernel traits Lifted_R:
RT Point_d Vector_d Ray_d Hyperplane_dand uses the following function objects from the kernel traits:
Construct_hyperplane_d Construct_vector_d Vector_to_point_d / Point_to_vector_d Orientation_d Orthogonal_vector_d Oriented_side_d / Has_on_positive_side_d Affinely_independent_d Contained_in_simplex_d Contained_in_affine_hull_d Intersect_d Lift_to_paraboloid_d / Project_along_d_axis_d Component_accessor_dDelaunay_d< R, Lifted_R > requires the following types from the kernel traits R:
FT Point_d Sphere_dand uses the following function objects from the kernel traits R:
Construct_sphere_d Squared_distance_d Point_of_sphere_d Affinely_independent_d Contained_in_simplex_d
| ||||
| ||||
| ||||
draws the underlying simplicial complex D into window W. Precondition: dim == 2. | ||||
| ||||
| ||||
| ||||
constructs a LEDA graph representation of the nearest
(kind = NEAREST or the furthest (kind = FURTHEST) site
Delaunay triangulation. Precondition: dim() == 2. |