some little improvements to the user manual.

This commit is contained in:
Samuel Hornus 2012-09-19 14:15:06 +00:00
parent 8907c117b7
commit 7bc1f17175
4 changed files with 93 additions and 87 deletions

View File

@ -244,6 +244,6 @@ _______________________________________________________DELAUNAY_TRIANGULATION
________________________________________________________REGULAR_TRIANGULATION
*) write Regular_triangulaion.h (!)
*) write Regular_triangulation.h (!)
*) write RegularTriangulationTraits.tex
*) write Regular_triangulation.tex

View File

@ -8,13 +8,15 @@ This package proposes data structure and algorithms to compute
triangulations of points in any dimensions.
The \ccc{Triangulation_data_structure} allows to store and manipulate the
combinatorial part of a triangulation while the geometric classes
\ccc{Triangulation} and \ccc{DelaunayTriangulation} allows to
\ccc{Triangulation} and \ccc{Delaunay_triangulation} allows to
compute a (Delaunay) triangulation of a set of points and to maintain
it under insertions (and deletions in the Delaunay case).
\section{Introduction\label{triangulation:intro}}
\subsubsection{Some definitions}
A {\em finite abstract simplicial complex} is built on a finite set of
vertices $V$ and consists of a collection $S$ of subsets of $V$ such that
@ -46,6 +48,8 @@ simplices (the empty set counts).
See the \ccAnchor{http://en.wikipedia.org/wiki/Simplicial_complex}{wikipedia
entry} for more about simplicial complexes.
\subsubsection{What's in this package?}
This \cgal\ package deals with pure finite simplicial complexes
without boundary, which
we will simply call in the sequel {\em triangulations}. It provides three main classes
@ -114,9 +118,9 @@ $\sigma'$ is a proper sub-face of $\sigma$ or \emph{vice versa}.
In this section, we describe the concept \ccc{TriangulationDataStructure} for
which \cgal\ provides one model class:
\ccc{CGAL::Triangulation_data_structure<Dimensionality, TriangulationDSVertex,
TriangulationDSFullCell>}. For simplicity, we use the abbreviation \tds.
TriangulationDSFullCell>}.% For simplicity, we use the abbreviation \tds.
A \tds\ can represent an abstract pure complex,
A \tds\ can represent an abstract pure complex
such that any facet is incident to exactly two full cells.
A \tds\ has a property called the {\em maximal dimension} which is a
@ -126,8 +130,8 @@ and can then be queried using the method \ccc{tds.maximal_dimension()}.
A \tds\ also knows the {\em current dimension} of its full cells,
which can be queried with \ccc{tds.current_dimension()}. In the sequel, let
us denote the maximal dimension with \ad\ and the current dimension with \cd.
It always holds that $-2\leq\cd\leq\ad$ and $0<\ad$.
The special meaning of negative values for $d$ will be explain below.
The inequalities $-2\leq\cd\leq\ad$ and $0<\ad$ always hold.
The special meaning of negative values for $d$ is explained below.
%\note{I remove some comments about 3D vs dD which are not exact. %
%in T3D package in degenerate dimension \ccc{Cell} is actually used with the %
@ -167,36 +171,31 @@ always exactly $\cd+1$ neighbors.
Two full cells $\sigma$ and $\sigma'$ sharing a facet are called
{\em neighbors}.
\newcommand{\cgalTriangulationCurrentDimension}{%
\item[$\cd=-2$] This corresponds to the non-existence of any object in
the \tds.
\item[$\cd=-1$] This corresponds to a single vertex and a single full cell. In a
geometric triangulation, this vertex corresponds to the vertex at infinity.
\item[$\cd=0$] This corresponds to two vertices (geometrically, the finite vertex and
the infinite vertex), each corresponding to a full cell;
the two full cells being neighbors of each other. This is the unique
triangulation of the $0$-sphere.
\item[$0<\cd\le\ad$] This corresponds to a standard triangulation of
the sphere $\sphere^\cd$.}
Possible values of $\cd$ (the \emph{current dimension} of the triangulation) include
\begin{ccTexOnly}
\begin{list}{}{\leftmargin=20mm\labelsep=3mm\labelwidth=17mm}
\item[$\cd=-2$] This corresponds to the non-existence of any object in
the \tds.
\item[$\cd=-1$] This corresponds to a single vertex and a single full cell. In a
geometric triangulation, this vertex corresponds to the vertex at infinity.
\item[$\cd=0$] This corresponds to two vertices (geometrically, the finite vertex and
the infinite vertex), each corresponding to a full cell;
the two full cells being neighbors of each other. This is the unique
triangulation of the $0$-sphere.
\item[$0<\cd\le\ad$] This corresponds to a standard triangulation of
the sphere $\sphere^\cd$.
\end{list}
\end{ccTexOnly}
\begin{ccHtmlOnly}
\begin{itemize}
\item[$\cd=-2$] This corresponds to the non-existence of any object in
the \tds.
\item[$\cd=-1$] This corresponds to a single vertex and a single full cell. In a
geometric triangulation, this vertex corresponds to the vertex at infinity.
\item[$\cd=0$] This corresponds to two vertices (geometrically, the finite vertex and
the infinite vertex), each corresponding to a full cell;
the two full cells being neighbors of each other. This is the unique
triangulation of the $0$-sphere.
\item[$0<\cd\le\ad$] This corresponds to a standard triangulation of
the sphere $\sphere^\cd$.
%\begin{ccTexOnly}
% \begin{list}{}{\leftmargin=20mm\labelsep=3mm\labelwidth=17mm}
% \cgalTriangulationCurrentDimension
% \end{list}
%\end{ccTexOnly}
%\begin{ccHtmlOnly}
\begin{quotation}
\noindent\begin{itemize}
\cgalTriangulationCurrentDimension
\end{itemize}
\end{ccHtmlOnly}
\end{quotation}
%\end{ccHtmlOnly}
% - - - - - - - - - - - - - - - - - - - - - - - - - - - - T D S IMPLEMENTATION
@ -221,7 +220,7 @@ neighbors. Its vertices and neighbors are indexed from $0$ to \cd. The indices
of its neighbors have the following meaning: the $i$-th neighbor of $\sigma$
is the unique neighbor of $\sigma$ that does not contain the $i$-th vertex of
$\sigma$; in other words, it is the neighbor of $\sigma$ {\em opposite} to
the $i$-th vertex of $\sigma$.
the $i$-th vertex of $\sigma$ (Figure~\ref{triangulation:fig:full-cell}).
\begin{figure}[htbp]
\begin{ccTexOnly}
@ -319,7 +318,7 @@ manual documentation of the methods that are called (see here:
\ccIncludeExampleCode{Triangulation/triangulation_data_structure_static.cpp}
In previous example, the maximal dimension is fixed at compile time.
It is also possible to fix it at run time as in the next example.
It is also possible to fix it at run time, as in the next example.
\ccIncludeExampleCode{Triangulation/triangulation_data_structure_dynamic.cpp}
@ -330,7 +329,7 @@ full cells adjacent to \ccc{c} are automatically subdivided to match the
subdivision of the full cell \ccc{c}. The barycentric subdivision of \ccc{c} is
obtained by enumerating all the faces of \ccc{c} in order of decreasing
dimension, from the dimension of~\ccc{c} to dimension~1, and inserting a new
vertex in each face. For the enumeration, we use a combinatorial enumerator,
vertex in each face. For the enumeration, we use a combination enumerator,
which is not documented, but provided in \cgal.
@ -370,7 +369,7 @@ contraction of faces, the traversal of various elements of the triangulation
as well as the localization of a query point inside the triangulation.
Infinite full cells outside the convex hull are each incident to
a finite facet on the convex hull of the triangulation and to a unique special
a finite facet on the convex hull of the triangulation and to a unique
{\em vertex at infinity}.
%\note{In every infinite full cell, the vertex at infinity always has index $0$.}
%\note{SH: the above note this should go in the documentation of the
@ -386,7 +385,8 @@ the oriented hyperplane defined by the full cell's finite facet.
\subsection{Implementation}
The class \ccc{CGAL::Triangulation<TriangulationTraits, TriangulationDataStructure>} stores a model \tds
The class \ccc{CGAL::Triangulation<TriangulationTraits,
TriangulationDataStructure>} stores a model
of the concept \ccc{TriangulationDataStructure} which is instantiated with a
vertex type that stores a point, and a full cell type that allows the retrieval
of the point of its vertices.
@ -439,13 +439,15 @@ typedef Triangulation::Full_cell_iterator Full_cell_iterator;
typedef Triangulation::Facet Facet;
for( Full_cell_iterator cit = t.full_cells_begin();
cit != t.full_cells_end(); ++cit ) {
cit != t.full_cells_end(); ++cit )
{
if( ! t.is_infinite(cit) )
continue;
Facet ft(cit, cit->index(t.infinite_vertex()));
++i;// |ft| is a facet of the convex hull
}
std::cout << "There are " << i << " facets on the convex hull."<< std::endl;}
std::cout << "There are " << i << " facets on the convex hull."<< std::endl;
}
\end{ccExampleCode}%
\textbf{Remark}: the code example above is not self contained, it can
be cut and paste at STEP 2 of {\tt triangulation.cpp} program above.
@ -466,11 +468,13 @@ std::back_insert_iterator<Full_cells> out(infinite_full_cells);
t.incident_full_cells(t.infinite_vertex(), out);
for( Full_cells::iterator sit = infinite_full_cells.begin();
sit != infinite_full_cells.end(); ++sit ) {
sit != infinite_full_cells.end(); ++sit )
{
Facet ft(*sit, (*sit)->index(t.infinite_vertex()));
++i // |ft| is a facet of the convex hull
}
std::cout << "There are " << i << " facets on the convex hull."<< std::endl;}
std::cout << "There are " << i << " facets on the convex hull."<< std::endl;
}
\end{ccExampleCode}
\textbf{Remark}: the code example above is not self contained, it can
be cut and paste at STEP 2 of {\tt triangulation.cpp} program above.
@ -494,8 +498,8 @@ of the triangulation.
The {\em circumscribing ball} of a full cell is the ball
having all vertices of the full cell on its boundary.
In case of degeneracies (co-spherical points) the triangulation is not
uniquely defined,
note however that the \cgal\ implementation computes a unique
uniquely defined;
Note however that the \cgal\ implementation computes a unique
triangulation even in these cases.
%The {\em circumscribing sphere} of a face \ccc{c} is the smallest sphere
%touching all vertices of the face. A triangulation of the convex
@ -513,7 +517,8 @@ conflict with \ccc{p} form the {\em conflict zone}. That conflict zone is
augmented with the infinite full cells whose finite facet does not lie
anymore on the convex hull of the triangulation (with \ccc{p} added). The full cells
in the conflict zone are removed, leaving a hole that contains \ccc{p}. That
hole is then re-triangulated in a ``star shape'' centered at \ccc{p}.
hole is ``star shaped'' around \ccc{p} and thus is easily re-triangulated using
\ccc{p} as a center vertex.
Delaunay triangulations also support vertex removal.
@ -522,10 +527,10 @@ Delaunay triangulations also support vertex removal.
\subsection{Implementation}
The class \ccc{CGAL::Delaunay_triangulation<DelaunayTriangulationTraits, TriangulationDataStructure>} derives from
\ccc{CGAL::Triangulation<DelaunayTriangulationTraits, TriangulationDataStructure>}. It thus stores a model \tds of
\ccc{CGAL::Triangulation<DelaunayTriangulationTraits, TriangulationDataStructure>}. It thus stores a model of
the concept \ccc{TriangulationDataStructure} which is instantiated with a vertex
type that stores a geometric point, and a full cell type that allows the
retrieval of the points of its vertices.
type that stores a geometric point and allows its retrieval.% and a full cell type that allows the
%retrieval of the points of its vertices.
The template parameter \ccc{DelaunayTriangulationTraits} must be a model of the concept
\ccc{DelaunayTriangulationTraits} which provides the geometric \ccc{Point} type as
@ -556,7 +561,7 @@ retaining an efficient update of the Delaunay triangulation.
The current implementation locate points by walking in the
triangulation, and sort the points with spatial sort to insert a
set of points. Thus the theoretical complexity are
$O(n\log n)$ for inserting $n$ random points and $O(n^{\frac{1}{\cd}}$
$O(n\log n)$ for inserting $n$ random points and $O(n^{\frac{1}{\cd}})$
for inserting one point in a triangulation of $n$ random points.
The actual timing are the following:

View File

@ -48,7 +48,7 @@ is opposite to the vertex with the same index.
\ccRefConceptPage{TriangulationDataStructure}
The above concept is also abbreviated as \ccc{TriangulationDataStructure}. It defines three types,
The above concept defines three types,
\ccc{Vertex}, \ccc{Full_cell} and \ccc{Face}, that must respectively fulfill the
following concepts:
@ -65,8 +65,8 @@ following concepts:
\ccRefConceptPage{TriangulationVertex}\\
\ccRefConceptPage{TriangulationFullCell}
The above concepts are also abbreviated respectively as \ccc{TriangulationTraits},
\ccc{DelaunayTriangulationTraits},
The latter two concepts are also abbreviated respectively as %\ccc{TriangulationTraits},
%\ccc{DelaunayTriangulationTraits},
%\ccc{RTTraits},
\ccc{TrVertex} and \ccc{TrFullCell}.

View File

@ -17,7 +17,8 @@ int main()
for( int i = 1; i <= 5; ++i )
V[i] = S.insert_increase_dimension(V[0]);
// the 6 first vertex have created a triangulation of the sphere in dim 5
// the first 6 vertices have created a triangulation
// of the 4-dimensional sphere
assert( 4 == S.current_dimension() );
assert( 6 == S.number_of_vertices() );
assert( 6 == S.number_of_full_cells() );