diff --git a/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/ConvexHullTraits_d.tex b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/ConvexHullTraits_d.tex new file mode 100644 index 00000000000..ef457915ea3 --- /dev/null +++ b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/ConvexHullTraits_d.tex @@ -0,0 +1,101 @@ +\begin{ccRefConcept}{ConvexHullTraits_d} + +\ccDefinition Requirements of the traits class to be used with the +class \ccc{Convex_hull_d}. + +\ccTypes +\ccAutoIndexingOff +\ccNestedType{Point_d}{the dD point type on which the convex hull algorithm +operates} +\ccGlue +\ccNestedType{Hyperplane_d}{a dD plane} +\ccGlue +\ccNestedType{Vector_d}{a dD vector} +\ccGlue +\ccNestedType{Ray_d}{a dD ray} +\ccGlue +\ccNestedType{RT}{an arithmetic ring type} + +\ccNestedType{Construct_vector_d}{Function object type that provides +\ccc{Vector_d operator()(int d, CGAL::Null_vector)}, which constructs +and returns the null vector.} + +\ccNestedType{Construct_hyperplane_d}{Function object type that +provides \ccc{Hyperplane_d operator()(ForwardIterator first, +ForwardIterator last, Point_d p, CGAL::Oriented_side side)}, which +constructs and returns a hyperplane passing through the points in +\ccc{tuple[first,last)} and oriented such that \ccc{p} is on the side +\ccc{side} of the returned hyperplane. When +\ccc{side==ON_ORIENTED_BOUNDARY} then any hyperplane containing the +tuple is returned.} + +\ccNestedType{Vector_to_point_d}{Function object type that provides +\ccc{Point_d operator()(Vector_d v)}, which constructs and +returns the point defined by $0+v$.} + +\ccNestedType{Point_to_vector_d}{Function object type that provides +\ccc{Vector_d operator()(Point_d v)}, which constructs and returns the +vector defined by $p-0$.} + +\ccNestedType{Orientation_d}{Function object type that provides +\ccc{Orientation operator()(ForwardIterator first, +ForwardIterator last)}, which determines the orientation of the +points \ccc{tuple[first,last)}.} + +\ccNestedType{Orthogonal_vector_d}{Function object type that provides +\ccc{Vector_d operator()(Hyperplane_d h)}, which constructs and +returns a vector orthogonal to \ccc{h} and pointing from the boundary +into its positive halfspace.} + +\ccNestedType{Oriented_side_d}{Predicate object type that provides +\ccc{Oriented_side operator()(Hyperplane_d h, Point_d p)}, which +determines the oriented side of \ccc{p} with respect to \ccc{h}.} + +\ccNestedType{Has_on_positive_side_d}{Predicate object type that +provides \ccc{bool operator()(Hyperplane_d h, Point_d p)}, which +return true iff \ccc{p} lies in the positive halfspace determined by +\ccc{h}.} + +\ccNestedType{Affinely_independent_d}{Predicate object type that provides +\ccc{bool operator()(ForwardIterator first, ForwardIterator last)}, which +determines if the points \ccc{tuple[first,last)} are affinely independent.} + +\ccNestedType{Contained_in_simplex_d}{Predicate object type that +provides \ccc{bool operator()(ForwardIterator first, ForwardIterator +last, Point_d p)}, which determines if \ccc{p} is contained in +the closed simplex defined by the points in \ccc{tuple[first,last)}.} + +\ccNestedType{Contained_in_affined_hull_d}{Predicate object type that +provides \ccc{bool operator()(ForwardIterator first, ForwardIterator +last, Point_d p)}, which determines if \ccc{p} is contained in +the affine hull of the points in \ccc{tuple[first,last)}.} + +\ccNestedType{Intersect_d}{Predicate object type that provides +\ccc{Object operator()(Ray_d r, Hyperplane_d h)}, which determines if +\ccc{r} and \ccc{h} intersect and returns the corresponding +polymorphic object.} + +\ccCreation +\ccCreationVariable{traits} + +A default constructor and copy constructor is required. + +\ccOperations + +For each of the above function and predicate object types, +\ccc{Func_obj_type}, a function must exist with the name +\ccc{func_obj_type_object} that creates an instance of the function or +predicate object type. For example: + +\ccMethod{Construct_vector_d construct_vector_d_object();}{} + +\ccAutoIndexingOn + +\ccHasModels +\ccRefIdfierPage{CGAL::Cartesian_d}\\ +\ccRefIdfierPage{CGAL::Homogeneous_d}\\ +\ccRefIdfierPage{CGAL::Convex_hull_d_traits_3} + +%\ccSeeAlso + +\end{ccRefConcept} diff --git a/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/Convex_hull_d.tex b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/Convex_hull_d.tex new file mode 100644 index 00000000000..0b933ba9cbb --- /dev/null +++ b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/Convex_hull_d.tex @@ -0,0 +1,344 @@ +% begin cgal manual page + +\begin{ccRefClass}{Convex_hull_d}\ccCreationVariable{C} + +\ccDefinition + +An instance \ccc{C} of type \ccc{Convex_hull_d} is the convex hull +of a multi-set \ccc{S} of points in $d$-dimensional space. We call +\ccc{S} the underlying point set and $d$ or \ccc{dim} the dimension of +the underlying space. We use \ccc{dcur} to denote the affine dimension +of \ccc{S}. The data type supports incremental construction of hulls. + +The closure of the hull is maintained as a simplicial complex, i.e., +as a collection of simplices. The intersection of any two is a face of +both\footnote{The empty set if a facet of every simplex.}. In the +sequel we reserve the word simplex for the simplices of dimension +\ccc{dcur}. For each simplex there is a handle of type +\ccc{Simplex_handlex} and for each vertex there is a handle of type +\ccc{Vertex_handle}. Each simplex has $1 + \ccc{dcur}$ vertices +indexed from $0$ to \ccc{dcur}; for a simplex $s$ and an index $i$, +\ccc{C.vertex(s,i)} returns the $i$-th vertex of $s$. For any simplex +$s$ and any index $i$ of $s$ there may or may not be a simplex $t$ +opposite to the $i$-th vertex of $s$. The function +\ccc{C.opposite_simplex(s,i)} returns $t$ if it exists and returns +\ccc{Simplex_handle()} (the undefined handle) otherwise. If $t$ exists +then $s$ and $t$ share \ccc{dcur} vertices, namely all but the vertex +with index $i$ of $s$ and the vertex with index +\ccc{C.index_of_vertex_in_opposite_simplex(s,i)} of $t$. Assume that +$t$ exists and let \ccc{j = +C.index_of_vertex_in_opposite_simplex(s,i)}. Then $s =$ +\ccc{C.opposite_simplex(t,j)} and $i =$ +\ccc{C.index_of_vertex_in_opposite_simplex(t,j)}. + +The boundary of the hull is also a simplicial complex. All simplices +in this complex have dimension $\ccc{dcur} - 1$. For each boundary +simplex there is a handle of type \ccc{Facet_handle}. Each facet has +\ccc{dcur} vertices indexed from $0$ to $\ccc{dcur} - 1$. If \ccc{dcur +> 1} then for each facet $f$ and each index $i$, $0 \le i < +\ccc{dcur}$, there is a facet $g$ opposite to the $i$-th vertex of +$f$. The function \ccc{C.opposite_facet(f,i)} returns $g$. Two +neighboring facets $f$ and $g$ share \ccc{dcur - 1} vertices, namely +all but the vertex with index $i$ of $f$ and the vertex with index +\ccc{C.index_of_vertex_in_opposite_facet(f,i)} of $g$. Let \ccc{j = +C.index_of_vertex_in_opposite_facet(f,i)}. Then \ccc{f = +C.opposite_facet(g,j)} and \ccc{i = +C.index_of_vertex_in_opposite_facet(g,j)}. + + +\ccSetOneOfTwoColumns{6cm} + +\ccTypes + +\ccNestedType{R}{the representation class.} + +\ccNestedType{Point_d}{the point type.} + +\ccNestedType{Hyperplane_d}{the hyperplane type.} + +\ccNestedType{Simplex_handle}{handle for simplices.} + +\ccNestedType{Facet_handle}{handle for facets.} + +\ccNestedType{Vertex_handle}{handle for vertices.} + +\ccNestedType{Simplex_iterator}{iterator for simplices.} + +\ccNestedType{Facet_iterator}{iterator for facets.} + +\ccNestedType{Vertex_iterator}{iterator for vertices.} + +\ccNestedType{Hull_vertex_iterator}{iterator for vertices that are +part of the convex hull.} + +Note that each iterator fits the handle concept, i.e. iterators can be +used as handles. Note also that all iterator and handle types come +also in a const flavor, e.g., \ccc{Vertex_const_iterator} is the +constant version of \ccc{Vertex_iterator}. Const correctness requires +to use the const version whenever the the convex hull object is +referenced as constant. The \ccc{Hull_vertex_iterator} is convertible +to \ccc{Vertex_iterator} and \ccc{Vertex_handle}. + +\ccNestedType{Point_const_iterator}{const iterator for all inserted +points.} + +\ccNestedType{Hull_point_const_iterator}{const iterator for all points +that are part of the convex hull.} + + +\ccSetOneOfTwoColumns{3cm} + +\ccCreation + +\ccConstructor{Convex_hull_d(int d, R Kernel = R())}{creates an +instance \ccc{C} of type \ccc{Convex_hull_d}. The dimension of the +underlying space is $d$ and \ccc{S} is initialized to the empty point +set. The traits class \ccc{R} specifies the models of all types and +the implementations of all geometric primitives used by the convex +hull class. The default model is one of the $d$-dimensional +representation classes (e.g., \ccc{Homogeneous_d}). } + +The data type \ccc{Convex_hull_d} offers neither copy constructor nor +assignment operator. + +\ccHeading{Requirements} + +\ccc{R} is a model of the concept \ccc{ConvexHullTraits_d} + \ccIndexMainItem[c]{ConvexHullTraits_d}. + +\ccSetTwoOfThreeColumns{3cm}{2cm} + +\ccOperations + +All operations below that take a point \ccc{x} as argument have the +common precondition that \ccc{x} is a point of ambient space. + + +\ccMethod{int dimension() ;}{returns the dimension of ambient space } + +\ccMethod{int current_dimension() ;}{% +returns the affine dimension \ccc{dcur} of $S$. } + +\ccMethod{Point_d associated_point(Vertex_handle v) ;}{% +returns the point associated with vertex $v$.} + +\ccMethod{Vertex_handle vertex_of_simplex(Simplex_handle s, int i) +;}{returns the vertex corresponding to the $i$-th vertex of $s$.\\ +\ccPrecond $0 \leq i \leq \ccc{dcur}$. } + +\ccMethod{Point_d point_of_simplex(Simplex_handle s,int i) ;}{same as +\ccc{C.associated_point(C.vertex_of_simplex(s,i))}. } + +\ccMethod{Simplex_handle opposite_simplex(Simplex_handle s,int i) +;}{returns the simplex opposite to the $i$-th vertex of $s$ +(\ccc{Simplex_handle()} if there is no such simplex). \ccPrecond $0 +\leq i \leq \ccc{dcur}$. } + +\ccMethod{int index_of_vertex_in_opposite_simplex(Simplex_handle s,int +i) ;}{returns the index of the vertex opposite to the $i$-th vertex of +$s$. \ccPrecond $0 \leq i \leq \ccc{dcur}$ and there is a simplex +opposite to the $i$-th vertex of $s$. } + +\ccMethod{Simplex_handle simplex(Vertex_handle v) ;}{returns a simplex +of which $v$ is a node. Note that this simplex is not unique. } + +\ccMethod{int index(Vertex_handle v) ;}{returns the index of $v$ in +\ccc{simplex(v)}. } + +\ccMethod{Vertex_handle vertex_of_facet(Facet_handle f, int i) +;}{returns the vertex corresponding to the $i$-th vertex of $f$. +\ccPrecond $0 \leq i < \ccc{dcur}$. } + +\ccMethod{Point_d point_of_facet(Facet_handle f, int i) ;}{same as +\ccc{C.associated_point(C.vertex_of_facet(f,i))}. } + +\ccMethod{Facet_handle opposite_facet(Facet_handle f, int i) +;}{returns the facet opposite to the $i$-th vertex of $f$ +(\ccc{Facet_handle()} if there is no such facet). \ccPrecond $0 \leq i +< \ccc{dcur}$ and \ccc{dcur > 1}. } + +\ccMethod{int index_of_vertex_in_opposite_facet(Facet_handle f, int i) +;}{returns the index of the vertex opposite to the $i$-th vertex of +$f$. \ccPrecond $0 \leq i < \ccc{dcur}$ and \ccc{dcur > 1}. } + +\ccMethod{Hyperplane_d hyperplane_supporting(Facet_handle f) +;}{returns a hyperplane supporting facet \ccc{f}. The hyperplane is +oriented such that the interior of \ccc{C} is on the negative side of +it. \ccPrecond \ccc{f} is a facet of \ccc{C} and \ccc{dcur > 1}. } + +\ccMethod{Vertex_handle insert(const Point_d& x);}{adds point \ccc{x} +to the underlying set of points. If $x$ is equal to (the point +associated with) a vertex of the current hull this vertex is returned +and its associated point is changed to $x$. If $x$ lies outside the +current hull, a new vertex \ccc{v} with associated point $x$ is added +to the hull and returned. In all other cases, i.e., if $x$ lies in the +interior of the hull or on the boundary but not on a vertex, the +current hull is not changed and \ccc{Vertex_handle()} is returned. If +\ccc{CGAL_CHECK_EXPENSIVE} is defined then the validity check +\ccc{is_valid(true)} is executed as a post condition. } + +\ccMethod{template void +insert(Forward_iterator first, Forward_iterator last) ;}{adds \ccc{S = +set [first,last)} to the underlying set of points. If any point +\ccc{S[i]} is equal to (the point associated with) a vertex of the +current hull its associated point is changed to \ccc{S[i]}. } + +\ccMethod{bool is_dimension_jump(const Point_d& x) ;}{returns true if +$x$ is not contained in the affine hull of \ccc{S}. } + +\ccMethod{std::list facets_visible_from(const Point_d& +x);}{returns the list of all facets that are visible from \ccc{x}.\\ +\ccPrecond \ccc{x} is contained in the affine hull of \ccc{S}. } + +\ccMethod{Bounded_side bounded_side(const Point_d& x);}{returns +\ccc{ON_BOUNDED_SIDE} (\ccc{ON_BOUNDARY},\ccc{ON_UNBOUNDED_SIDE}) if +\ccc{x} is contained in the interior (lies on the boundary, is +contained in the exterior) of \ccc{C}. \ccPrecond \ccc{x} is contained +in the affine hull of \ccc{S}. } + +\ccMethod{void clear(int d) ;}{reinitializes \ccc{C} to an empty hull +in $d$-dimensional space. } + +\ccMethod{int number_of_vertices() ;}{returns the number of vertices +of \ccc{C}. } + +\ccMethod{int number_of_facets() ;}{returns the number of facets of +\ccc{C}. } + +\ccMethod{int number_of_simplices() ;}{returns the number of bounded +simplices of \ccc{C}. } + +\ccMethod{void print_statistics() ;}{gives information about the size +of the current hull and the number of visibility tests performed. } + +\ccMethod{bool is_valid(bool throw_exceptions = false) ;}{checks the +validity of the data structure. If \ccc{throw_exceptions == thrue} +then the program throws the following exceptions to inform about the +problem.\\ \ccc{chull_has_center_on_wrong_side_of_hull_facet} the +hyperplane supporting a facet has the wrong orientation.\\ +\ccc{chull_has_local_non_convexity} a ridge is locally non convex.\\ +\ccc{chull_has_double_coverage} the hull has a winding number larger +than 1. } + +\ccSetTwoOfThreeColumns{3cm}{3cm} + +\ccHeading{Lists and Iterators} + +\ccMethod{Vertex_iterator vertices_begin() ;}{an iterator of \ccc{C} to +start the iteration over all vertices of the complex.} + +\ccMethod{Vertex_iterator vertices_end() ;}{the past the end iterator +for vertices.} + +\ccMethod{Simplex_iterator simplices_begin() ;}{an iterator of \ccc{C} +to start the iteration over all simplices of the complex.} + +\ccMethod{Simplex_iterator simplices_end() ;}{the past the end +iterator for simplices.} + +\ccMethod{Facet_iterator facets_begin() ;}{an iterator of \ccc{C} to +start the iteration over all facets of the complex.} + +\ccMethod{Facet_iterator facets_end() ;}{the past the end iterator for +facets.} + +\ccMethod{Hull_vertex_iterator hull_vertices_begin() ;}{an iterator to +start the iteration over all vertices of \ccc{C} that are part of the +convex hull.} + +\ccMethod{Hull_vertex_iterator hull_vertices_end() ;}{the past the end +iterator for hull vertices.} + + +\ccMethod{Point_const_iterator points_begin() ;}{returns the start +iterator for all points that have been inserted to construct \ccc{C}.} + +\ccMethod{Point_const_iterator points_end() ;}{returns the past the +end iterator for points.} + +\ccMethod{Hull_point_const_iterator hull_points_begin() ;}{returns an +iterator to start the iteration over all points in the convex hull +\ccc{C}. Included are points in the interior of facets.} + +\ccMethod{Hull_point_const_iterator hull_points_end() ;}{returns the +past the end iterator for points in the convex hull.} + +\ccMethod{template void visit_all_facets(const +Visitor& V) ;}{each facet of \ccc{C} is visited by the visitor object +\ccc{V}. \ccc{V} has to have a function call operator:\\ \ccc{void +operator()(Facet_handle) const} } + +\ccMethod{const std::list& all_points() ;}{returns a list of +all points that have been inserted to construct \ccc{C}.} + +\ccMethod{std::list all_vertices() ;}{returns a list of +all vertices of \ccc{C} (also interior ones). } + +\ccMethod{std::list all_simplices() ;}{returns a list +of all simplices in \ccc{C}. } + +\ccMethod{std::list all_facets() ;}{returns a list of +all facets of \ccc{C}.} + + +\ccHeading{Iteration Statements} + +{\bf forall\_ch\_vertices}($v,C$) $\{$ ``the vertices of $C$ are +successively assigned to $v$'' $\}$ + +{\bf forall\_ch\_simplices}($s,C$) $\{$ ``the simplices of $C$ are +successively assigned to $s$'' $\}$ + +{\bf forall\_ch\_facets}($f,C$) $\{$ ``the facets of $C$ are +successively assigned to $f$'' $\}$ + + +\ccImplementation + +The implementation of type \ccc{Convex_hull_d} is based on +\cite{cms:fourresults-93} and \cite{BMS:degeneracy-94}. The details +of the implementation can be found in the implementation document +available at the download site of this package. + +The time and space requirements are input dependent. Let $C_1$, $C_2$, +$C_3$, \ldots be the sequence of hulls constructed and for a point $x$ +let $k_i$ be the number of facets of $C_i$ that are visible from $x$ +and that are not already facets of $C_{i-1}$. Then the time for +inserting $x$ is $O(\ccc{dim} \sum_i k_i)$ and the number of new simplices +constructed during the insertion of $x$ is the number of facets of the +hull which were not already facets of the hull before the insertion. + +The data type \ccc{Convex_hull_d} is derived from +\ccc{Regular_complex_d}. The space requirement of regular complexes is +essentially $12(\ccc{dim} +2)$ bytes times the number of simplices +plus the space for the points. \ccc{Convex_hull_d} needs an additional +$8 + (4 + x)\ccc{dim}$ bytes per simplex where $x$ is the space +requirement of the underlying number type and an additional $12$ bytes +per point. The total is therefore $(16 + x)\ccc{dim} + 32$ bytes times +the number of simplices plus $28 + x \cdot \ccc{dim}$ bytes times the +number of points. + +\ccHeading{Low Dimensional Conversion Routine} +include \ccc{} + +\ccFunction{template +void convex_hull_d_to_polyhedron_3( const Convex_hull_d& C, Polyhedron_3& P) ;}{converts the convex hull \ccc{C} to polyedral surface stored in + \ccc{P}.\\ \ccPrecond \ccc{dim == 3} and \ccc{dcur == 3}. +} + +\ccHeading{Low Dimensional Output Routines} +include \ccc{} + +\ccFunction{template +void d2_show(const Convex_hull_d& C, CGAL::Window_stream& W);}{draws the convex hull \ccc{C} in window \ccc{W}.\\ +\ccPrecond \ccc{dim == 2}. +} + +\ccFunction{template +void d3_surface_map(const Convex_hull_d& C, GRAPH< typename Convex_hull_d::Point_d ,int>& G);}{constructs the representation of the surface of \ccc{C} as a +bidirected LEDA graph \ccc{G}.\\ \ccPrecond \ccc{dim == 3}. +} + +\end{ccRefClass} + + diff --git a/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/Convex_hull_d_traits_3.tex b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/Convex_hull_d_traits_3.tex new file mode 100644 index 00000000000..04a728c0a31 --- /dev/null +++ b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/Convex_hull_d_traits_3.tex @@ -0,0 +1,45 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: Convex_hull_traits_d.tex +% +------------------------------------------------------------------------+ +% | 17.05.2001 Michael Seel & Susan Hert +% | Package: Convex_hull_d +% | +% +------------------------------------------------------------------------+ + +\ccAutoIndexingOff +\begin{ccRefClass}{Convex_hull_d_traits_3} +\ccAutoIndexingOn +\ccIndexTraitsClassDefault[C]{Convex_hull_d} + +\ccDefinition + +The class \ccRefName\ serves as a traits class for the class +\ccc{Convex_hull_d}. This is a traits class that adapts any +low-dimensional standard kernel model, e.g. \ccc{Homogeneous} or +\ccc{Cartesian} for the fixed 3-dimensional usage of +\ccc{Convex_hull_d}. + + +\ccInclude{CGAL/Convex_hull_d_traits_3.h} + +\ccIsModel + +ConvexHullTraits\_d + +\ccCreation +\ccCreationVariable{traits} %% choose variable name + +\ccConstructor{Convex_hull_d_traits_3();}{default constructor.} + +%\ccSeeAlso +%\ccParDims +%\ccIndexTraitsClassEnd + +\ccAutoIndexingOff +\end{ccRefClass} +\ccAutoIndexingOn + +% +------------------------------------------------------------------------+ +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/DelaunayLiftedTraits_d.tex b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/DelaunayLiftedTraits_d.tex new file mode 100644 index 00000000000..aba9a7c8f10 --- /dev/null +++ b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/DelaunayLiftedTraits_d.tex @@ -0,0 +1,119 @@ +\begin{ccRefConcept}{DelaunayLiftedTraits_d} + +\ccDefinition Requirements of the second traits class to be used with the +class \ccc{Delaunay_d}. + +\ccTypes +\ccAutoIndexingOff +\ccNestedType{Point_d}{the dD point type on which the Delaunay algorithm +operates} +\ccGlue +\ccNestedType{Hyperplane_d}{a dD plane} +\ccGlue +\ccNestedType{Vector_d}{a dD vector} +\ccGlue +\ccNestedType{Ray_d}{a dD ray} +\ccGlue +\ccNestedType{RT}{a arithmetic ring type} + +\ccNestedType{Construct_vector_d}{Function object type that provides +\ccc{Vector_d operator()(int d, CGAL::Null_vector)}, which constructs +and returns the null vector.} + +\ccNestedType{Construct_hyperplane_d}{Function object type that +provides \ccc{Hyperplane_d operator()(ForwardIterator first, +ForwardIterator last, Point_d p, CGAL::Oriented_side side)}, which +constructs and returns a hyperplane passing through the points in +\ccc{tuple[first,last)} and oriented such that \ccc{p} is on the side +\ccc{side} of the returned hyperplane. When +\ccc{side==ON_ORIENTED_BOUNDARY} then any hyperplane containing the +tuple is returned.} + +\ccNestedType{Vector_to_point_d}{Function object type that provides +\ccc{Point_d operator()(Vector_d v)}, which constructs and +returns the point defined by $0+v$.} + +\ccNestedType{Point_to_vector_d}{Function object type that provides +\ccc{Vector_d operator()(Point_d v)}, which constructs and returns the +vector defined by $p-0$.} + +\ccNestedType{Orientation_d}{Function object type that provides +\ccc{Orientation operator()(ForwardIterator first, +ForwardIterator last)}, which determines the orientation of the +points \ccc{tuple[first,last)}.} + +\ccNestedType{Orthogonal_vector_d}{Function object type that provides +\ccc{Vector_d operator()(Hyperplane_d h)}, which constructs and +returns a vector orthogonal to \ccc{h} and pointing from the boundary +into its positive halfspace.} + +\ccNestedType{Oriented_side_d}{Predicate object type that provides +\ccc{Oriented_side operator()(Hyperplane_d h, Point_d p)}, which +determines the oriented side of \ccc{p} with respect to \ccc{h}.} + +\ccNestedType{Has_on_positive_side_d}{Predicate object type that +provides \ccc{bool operator()(Hyperplane_d h, Point_d p)}, which +return true iff \ccc{p} lies in the positive halfspace determined by +\ccc{h}.} + +\ccNestedType{Affinely_independent_d}{Predicate object type that provides +\ccc{bool operator()(ForwardIterator first, ForwardIterator last)}, which +determines if the points \ccc{tuple[first,last)} are affinely independent.} + +\ccNestedType{Contained_in_simplex_d}{Predicate object type that +provides \ccc{bool operator()(ForwardIterator first, ForwardIterator +last, Point_d p)}, which determines if \ccc{p} is contained in +the closed simplex defined by the points in \ccc{tuple[first,last)}.} + +\ccNestedType{Contained_in_affined_hull_d}{Predicate object type that +provides \ccc{bool operator()(ForwardIterator first, ForwardIterator +last, Point_d p)}, which determines if \ccc{p} is contained in +the affine hull of the points in \ccc{tuple[first,last)}.} + +\ccNestedType{Intersect_d}{Predicate object type that provides +\ccc{Object operator()(Ray_d r, Hyperplane_d h)}, which determines if +\ccc{r} and \ccc{h} intersect and returns the corresponding +polymorphic object.} + +The previous requirements are all identical to the concept +\ccc{ConvexHullTraits_d}. The Delaunay class adds the following +requirements. + +\ccNestedType{Project_along_d_axis_d}{Predicate object type that +provides \ccc{DelaunayTraits_d::Point_d operator()(Point_d p)}, which +determines the $d-1$-dimensional point from the $d$-dimensional point +$p$ while discarding the last coordinate.} + +\ccNestedType{Lift_to_paraboloid_d}{Predicate object type that +provides \ccc{Point_d operator()(DelaunayTraits_d::Point_d p)}, which +determines the $d$-dimensional point from the $d-1$-dimensional point +$p$ while lifting it to the paraboloid of revolution.} + +\ccNestedType{Component_accessor_d}{Predicate object type that +provides \ccc{RT homogeneous(Vector_d v,int i)} and \ccc{int +dimension(Vector_d v)}, where the former determines the $i$th +coordinate of $v$ and the latter the dimension of $v$.} + +\ccCreation +\ccCreationVariable{traits} + +A default constructor and copy constructor is required. + +\ccOperations + +For each of the above function and predicate object types, +\ccc{Func_obj_type}, a function must exist with the name +\ccc{func_obj_type_object} that creates an instance of the function or +predicate object type. For example: + +\ccMethod{Construct_vector_d construct_vector_d_object();}{} + +\ccAutoIndexingOn + +\ccHasModels +\ccRefIdfierPage{CGAL::Cartesian_d}\\ +\ccRefIdfierPage{CGAL::Homogeneous_d} + +%\ccSeeAlso + +\end{ccRefConcept} diff --git a/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/DelaunayTraits_d.tex b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/DelaunayTraits_d.tex new file mode 100644 index 00000000000..301c3716c80 --- /dev/null +++ b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/DelaunayTraits_d.tex @@ -0,0 +1,60 @@ +\begin{ccRefConcept}{DelaunayTraits_d} + +\ccDefinition Requirements of the first traits class to be used with the +class \ccc{Delaunay_d}. + +\ccTypes +\ccAutoIndexingOff +\ccNestedType{Point_d}{the dD point type on which the delaunay +algorithm operates} +\ccGlue +\ccNestedType{Sphere_d}{a dD sphere} +\ccGlue +\ccNestedType{FT}{an arithmetic field type} + +\ccNestedType{Point_of_sphere_d}{Predicate object type that provides +\ccc{Point_d operator()(Sphere_d s, int i)}, which returns the $i$th +point defining sphere \ccc{s}.} + +\ccNestedType{Construct_sphere_d}{Predicate object type that provides +\ccc{Sphere_d operator()(int d, ForwardIterator first, ForwardIterator +last)}, which returns a dD sphere through the points in +\ccc{tuple[first,last)}.} + +\ccNestedType{Contained_in_simplex_d}{Predicate object type that +provides \ccc{bool operator()(ForwardIterator first, ForwardIterator +last, Point_d p)}, which determines if \ccc{p} is contained in +the closed simplex defined by the points in \ccc{tuple[first,last)}.} + +\ccNestedType{Squared_distance_d}{Predicate object type that provides +\ccc{FT operator()(Point_d p,Point_d q)}, which determines the +squared distance from \ccc{p} to \ccc{q}.} + +\ccNestedType{Affinely_independent_d}{Predicate object type that +provides \ccc{bool operator()(ForwardIterator first, ForwardIterator +last)}, which determines if the points in \ccc{tuple[first,last)} are +affinely independent.} + +\ccCreation +\ccCreationVariable{traits} + +A default constructor and copy constructor is required. + +\ccOperations + +For each of the above function and predicate object types, +\ccc{Func_obj_type}, a function must exist with the name +\ccc{func_obj_type_object} that creates an instance of the function or +predicate object type. For example: + +\ccMethod{Construct_sphere_d construct_sphere_d_object();}{} + +\ccAutoIndexingOn + +\ccHasModels +\ccRefIdfierPage{CGAL::Cartesian_d}\\ +\ccRefIdfierPage{CGAL::Homogeneous_d} + +%\ccSeeAlso + +\end{ccRefConcept} diff --git a/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/Delaunay_d.tex b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/Delaunay_d.tex new file mode 100644 index 00000000000..55713278d1f --- /dev/null +++ b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/Delaunay_d.tex @@ -0,0 +1,339 @@ +% begin cgal manual page + +\begin{ccRefClass}{Delaunay_d< R, Lifted_R >}\ccCreationVariable{DT} +\ccIndexMainItemBegin{Delaunay triangulation, dD} + +\ccDefinition + +An instance \ccc{DT} of type \ccc{Delaunay_d< R, Lifted_R >} is the +nearest and furthest site Delaunay triangulation of a set \ccc{S} of +points in some $d$-dimensional space. We call \ccc{S} the underlying +point set and $d$ or \ccc{dim} the dimension of the underlying space. +We use \ccc{dcur} to denote the affine dimension of \ccc{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 \ccc{dcur}. In the nearest +site Delaunay triangulation the circumsphere of any simplex in the +triangulation contains no point of $S$ in its interior. In the +furthest site Delaunay triangulation the circumsphere of any simplex +contains no point of $S$ in its exterior. If the points in $S$ are +co-circular then any triangulation of $S$ is a nearest as well as a +furthest site Delaunay triangulation of $S$. If the points in $S$ are +not co-circular then no simplex can be a simplex of both +triangulations. Accordingly, we view \ccc{DT} as either one or two +collection(s) of simplices. If the points in $S$ are co-circular there +is just one collection: the set of simplices of some triangulation. +If the points in $S$ 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 +\ccc{Simplex_handle} and for each vertex of the triangulation there is +a handle of type \ccc{Vertex_handle}. Each simplex has \ccc{1 + dcur} +vertices indexed from $0$ to \ccc{dcur}. For any simplex $s$ and any +index $i$, \ccc{DT.vertex_of(s,i)} returns the $i$-th vertex of +$s$. There may or may not be a simplex $t$ opposite to the vertex of +$s$ with index $i$. The function \ccc{DT.opposite_simplex(s,i)} +returns $t$ if it exists and returns \ccc{Simplex_handle()} +otherwise. If $t$ exists then $s$ and $t$ share \ccc{dcur} vertices, +namely all but the vertex with index $i$ of $s$ and the vertex with +index \ccc{DT.index_of_vertex_in_opposite_simplex(s,i)} of $t$. +Assume that $t = \ccc{DT.opposite_simplex(s,i)}$ exists and let $j = +\ccc{DT.index_of_vertex_in_opposite_simplex(s,i)}$. Then \ccc{s = +DT.opposite_simplex(t,j)} and \ccc{i = +DT.index_of_vertex_in_opposite_simplex(t,j)}. In general, a vertex +belongs to many simplices. + +Any simplex of \ccc{DT} belongs either to the nearest or to the +furthest site Delaunay triangulation or both. The test +\ccc{DT.simplex_of_nearest(dt_simplex s)} returns true if \ccc{s} +belongs to the nearest site triangulation and the test +\ccc{DT.simplex_of_furthest(dt_simplex s)} returns true if \ccc{s} +belongs to the furthest site triangulation. + +\ccInheritsFrom \ccc{Convex_hull_d} + +\ccSetOneOfTwoColumns{7cm} + +\ccTypes + +\ccNestedType{Simplex_handle}{handles to the simplices of the complex. +} + +\ccNestedType{Vertex_handle}{handles to vertices of the complex. +} + +\ccNestedType{Point_d}{the point type +} + +\ccNestedType{Sphere_d}{the sphere type +} + +\ccEnum{enum Delaunay_voronoi_kind { NEAREST, FURTHEST }}{interface flags +} + +To use these types you can typedef them into the global +scope after instantiation of the class. We use \ccc{Vertex_handle} instead +of \ccc{Delaunay_d< R, Lifted_R >::Vertex_handle} from now on. Similarly we use +\ccc{Simplex_handle}. + + + +\ccNestedType{Point_const_iterator}{the iterator for points. +} + +\ccNestedType{Vertex_iterator}{the iterator for vertices. +} + +\ccNestedType{Simplex_iterator}{the iterator for simplices. +} + + +\ccSetOneOfTwoColumns{3cm} + +\ccCreation + +\ccConstructor{Delaunay_d< R, Lifted_R >(int d, R k1 = R(), Lifted_R k2 = Lifted_R())}{creates an instance \ccc{DT} of type \ccc{Delaunay_d}. The +dimension of the underlying space is $d$ and \ccc{S} is initialized to the +empty point set. The traits class \ccc{R} specifies the models of +all types and the implementations of all geometric primitives used by +the Delaunay class. The traits class \ccc{Lifted_R} specifies the models of +all types and the implementations of all geometric primitives used by +the base class of \ccc{Delaunay_d< R, Lifted_R >}. The second template parameter defaults to +the first: \ccc{Delaunay_d = Delaunay_d}. +} + +The data type \ccc{Delaunay_d} offers neither copy constructor nor +assignment operator. + +\ccHeading{Requirements} + +\ccc{R} is a model of the concept \ccc{DelaunayTraits_d} + \ccIndexMainItem[c]{DelaunayTraits_d}. +\ccc{Lifted_R} is a model of the concept \ccc{DelaunayLiftedTraits_d} + \ccIndexMainItem[c]{DelaunayLiftedTraits_d}. + + +\ccSetTwoOfThreeColumns{3cm}{3cm} + +\ccOperations + +All operations below that take a point \ccc{x} as an argument +have the common precondition that $\ccc{x.dimension()} = \ccc{DT.dimension()}$. + + + +\ccMethod{int dimension() ;}{returns the dimension of ambient space +} + +\ccMethod{int current_dimension() ;}{returns the affine dimension of the current point set, i.e., +$-1$ is $S$ is empty, $0$ if $S$ consists of a single point, +$1$ if all points of $S$ lie on a common line, etcetera. +} + +\ccMethod{bool is_simplex_of_nearest(Simplex_handle s) ;}{returns true if \ccc{s} is a simplex of the nearest site +triangulation. +} + +\ccMethod{bool is_simplex_of_furthest(Simplex_handle s) ;}{returns true if \ccc{s} is a simplex of the furthest site +triangulation. +} + +\ccMethod{ Vertex_handle vertex_of_simplex(Simplex_handle s, int i) ;}{returns the vertex associated with the $i$-th node of $s$. +\ccPrecond $0 \leq i \leq \ccc{dcur}$. +} + +\ccMethod{Point_d associated_point(Vertex_handle v) ;}{returns the point associated with vertex $v$. +} + +\ccMethod{Point_d point_of_simplex(Simplex_handle s,int i) ;}{returns the point associated with the $i$-th vertex of $s$. +\ccPrecond $0 \leq i \leq \ccc{dcur}$. +} + +\ccMethod{Simplex_handle opposite_simplex(Simplex_handle s, int i) ;}{returns the simplex opposite to the $i$-th vertex of $s$ +(\ccc{Simplex_handle()} if there is no such simplex). +\ccPrecond $0 \leq i \leq \ccc{dcur}$. +} + +\ccMethod{int index_of_vertex_in_opposite_simplex(Simplex_handle s,int i) ;}{returns the index of the vertex opposite to the $i$-th vertex +of $s$. \ccPrecond $0 \leq i \leq \ccc{dcur}$. +} + +\ccMethod{Simplex_handle simplex(Vertex_handle v) ;}{returns a simplex of the nearest site triangulation incident +to $v$. +} + +\ccMethod{int index(Vertex_handle v) ;}{returns the index of $v$ in \ccc{DT.simplex(v)}. +} + +\ccMethod{ bool contains(Simplex_handle s, const Point_d& x) ;}{returns true if \ccc{x} is contained in the closure of simplex \ccc{s}. +} + +\ccMethod{ bool empty() ;}{decides whether \ccc{DT} is empty. +} + +\ccMethod{void clear() ;}{reinitializes \ccc{DT} to the empty Delaunay triangulation. +} + +\ccMethod{Vertex_handle insert(const Point_d& x) ;}{inserts point $x$ into \ccc{DT} and returns the corresponding +\ccc{Vertex_handle}. More precisely, if there is already a vertex \ccc{v} in +\ccc{DT} positioned at $x$ (i.e., \ccc{associated_point(v)} is equal to +\ccc{x}) then \ccc{associated_point(v)} is changed to \ccc{x} (i.e., +\ccc{associated_point(v)} is made identical to \ccc{x}) and if there is no +such vertex then a new vertex $v$ with \ccc{associated_point(v) = x} is +added to \ccc{DT}. In either case, $v$ is returned. +} + +\ccMethod{Simplex_handle locate(const Point_d& x) ;}{returns a simplex of the nearest site triangulation +containing \ccc{x} in its closure (returns \ccc{Simplex_handle()} if \ccc{x} lies +outside the convex hull of $S$). +} + +\ccMethod{Vertex_handle lookup(const Point_d& x) ;}{if \ccc{DT} contains a vertex $v$ with \ccc{associated_point(v) = x} +the result is $v$ otherwise the result is \ccc{Vertex_handle()}. +} + +\ccMethod{Vertex_handle nearest_neighbor(const Point_d& x) ;}{computes a vertex $v$ of \ccc{DT} that is closest to $x$, +i.e.,\\ $\ccc{dist(x,associated_point(v))} = \min \{ +\ccc{dist(x, associated_point(u))} \mid u \in S\ \}$. +} + + +\ccMethod{std::list range_search(const Sphere_d& C) ;}{returns the list of all vertices contained in the closure of +sphere $C$. +} + +\ccMethod{std::list range_search(const std::vector& A) ;}{returns the list of all vertices contained in the closure of +the simplex whose corners are given by \ccc{A}. +\ccPrecond \ccc{A} must consist of $d+1$ affinely independent points +in base space. +} + +\ccMethod{std::list all_simplices(Delaunay_voronoi_kind k = NEAREST) ;}{returns a list of all simplices of either the nearest or the + furthest site Delaunay triangulation of \ccc{S}. +} + +\ccMethod{std::list all_vertices(Delaunay_voronoi_kind k = NEAREST) ;}{returns a list of all vertices of either the nearest or the +furthest site Delaunay triangulation of \ccc{S}. +} + +\ccMethod{ std::list all_points() ;}{returns $S$. +} + +\ccMethod{ Point_const_iterator points_begin() ;}{returns the start iterator for points in \ccc{DT}. +} + +\ccMethod{Point_const_iterator points_end() ;}{returns the past the end iterator for points in \ccc{DT}. +} + +\ccMethod{Simplex_iterator simplices_begin(Delaunay_voronoi_kind k = NEAREST) ;}{returns the start iterator for simplices of \ccc{DT}. +} + +\ccMethod{Simplex_iterator simplices_end() ;}{returns the past the end iterator for simplices of \ccc{DT}. +} + +\ccImplementation + +The data type is derived from \ccc{Convex_hull_d} via +the lifting map. For a point $x$ in $d$-dimensional space let +\ccc{lift(x)} be its lifting to the unit paraboloid of revolution. There +is an intimate relationship between the Delaunay triangulation of a +point set $S$ and the convex hull of \ccc{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. + + + +\ccExample + + + +The abstract data type \ccc{Delaunay_d} has a default instantiation by +means of the $d$-dimensional geometric kernel. + +\begin{verbatim} +#include +#include +#include + +typedef leda_integer RT; +typedef CGAL::Homogeneous_d Kernel; +typedef CGAL::Delaunay_d 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)); + ... +} +\end{verbatim} + + + + +\ccHeading{Traits requirements} + +\ccc{Delaunay_d< R, Lifted_R >} requires the following types from the kernel traits \ccc{Lifted_R}: +\begin{verbatim} + RT Point_d Vector_d Ray_d Hyperplane_d +\end{verbatim} +and uses the following function objects from the kernel traits: +\begin{verbatim} + 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_d +\end{verbatim} +\ccc{Delaunay_d< R, Lifted_R >} requires the following types from the kernel traits \ccc{R}: +\begin{verbatim} + FT Point_d Sphere_d +\end{verbatim} +and uses the following function objects from the kernel traits \ccc{R}: +\begin{verbatim} + Construct_sphere_d + Squared_distance_d + Point_of_sphere_d + Affinely_independent_d + Contained_in_simplex_d +\end{verbatim} + + + + +\ccHeading{Low Dimensional Output Routines} +include \ccc{} + +\ccFunction{template +template void d2_show(const Delaunay_d& D, CGAL::Window_stream& W, typename Delaunay_d::Delaunay_voronoi_kind k = Delaunay_d::NEAREST) ;}{draws the underlying simplicial complex \ccc{D} into window \ccc{W}.\\ +\ccPrecond \ccc{dim == 2}. +} + +\ccFunction{template +template void d2_map(const Delaunay_d& D, GRAPH< typename Delaunay_d::Point_d, int >& DTG, typename Delaunay_d::Delaunay_voronoi_kind k = Delaunay_d::NEAREST) ;}{constructs a LEDA graph representation of the nearest +(\ccc{kind = NEAREST} or the furthest (\ccc{kind = FURTHEST}) site +Delaunay triangulation.\\ \ccPrecond \ccc{dim() == 2}. +} + +\ccIndexMainItemEnd{Delaunay triangulation, dD} +\end{ccRefClass} diff --git a/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/intro.tex b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/intro.tex new file mode 100644 index 00000000000..4563ccef0e6 --- /dev/null +++ b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/intro.tex @@ -0,0 +1,38 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: Convex_hull_d_ref/intro.tex +% +------------------------------------------------------------------------+ + +\clearpage +\section{Reference Pages for dD Convex Hulls and Delaunay Triangulations} + +A subset $S \subseteq \R^3$ is convex if for any two points $p$ and $q$ +in the set the line segment with endpoints $p$ and $q$ is contained +in $S$. The convex hull\ccIndexMainItemDef{convex hull} of a set $S$ is +the smallest convex set containing +$S$. The convex hull of a set of points $P$ is a convex +polytope with vertices in $P$. A point in $P$ is an extreme point +(with respect to $P$)\ccIndexMainItemDef{extreme point} if it is a vertex +of the convex hull of $P$. + +\cgal\ provides functions for computing convex hulls in two, three +and arbitrary dimensions as well as functions for testing if a given set of +points in is strongly convex or not. This chapter describes the class +available for arbitrary dimensions and its companion class for +computing the nearest and furthest side Delaunay triangulation. + + +\ccHeading{Concepts} + +\ccRefConceptPage{ConvexHullTraits_d} \\ +\ccRefConceptPage{DelaunayLiftedTraits_d} \\ +\ccRefConceptPage{DelaunayTraits_d} \\ + +\ccHeading{Classes} + +\ccRefIdfierPage{CGAL::Convex_hull_d_traits_3} \\ +\ccRefIdfierPage{CGAL::Convex_hull_d} \\ +\ccRefIdfierPage{CGAL::Delaunay_d< R, Lifted_R >} + +\clearpage + +\lcHtml{\ccHeading{Alphabetical Listing of Reference Pages}} diff --git a/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/main.tex b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/main.tex new file mode 100644 index 00000000000..ff6ea23203f --- /dev/null +++ b/Packages/Kernel_d/doc_tex/Convex_hull_d/Convex_hull_d_ref/main.tex @@ -0,0 +1,17 @@ +% +------------------------------------------------------------------------+ +% | CBP Reference Manual: main.tex +% +------------------------------------------------------------------------+ +% | Automatically generated driver file for the reference manual chapter +% | of this package. Do not edit manually, you may loose your changes. +% +------------------------------------------------------------------------+ + +\input{Convex_hull_d_ref/intro.tex} + +\input{Convex_hull_d_ref/ConvexHullTraits_d.tex} +\input{Convex_hull_d_ref/Convex_hull_d.tex} +\input{Convex_hull_d_ref/Convex_hull_d_traits_3.tex} +\input{Convex_hull_d_ref/DelaunayLiftedTraits_d.tex} +\input{Convex_hull_d_ref/DelaunayTraits_d.tex} +\input{Convex_hull_d_ref/Delaunay_d.tex} + +%% EOF diff --git a/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/ConvexHullTraits_d.tex b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/ConvexHullTraits_d.tex new file mode 100644 index 00000000000..ef457915ea3 --- /dev/null +++ b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/ConvexHullTraits_d.tex @@ -0,0 +1,101 @@ +\begin{ccRefConcept}{ConvexHullTraits_d} + +\ccDefinition Requirements of the traits class to be used with the +class \ccc{Convex_hull_d}. + +\ccTypes +\ccAutoIndexingOff +\ccNestedType{Point_d}{the dD point type on which the convex hull algorithm +operates} +\ccGlue +\ccNestedType{Hyperplane_d}{a dD plane} +\ccGlue +\ccNestedType{Vector_d}{a dD vector} +\ccGlue +\ccNestedType{Ray_d}{a dD ray} +\ccGlue +\ccNestedType{RT}{an arithmetic ring type} + +\ccNestedType{Construct_vector_d}{Function object type that provides +\ccc{Vector_d operator()(int d, CGAL::Null_vector)}, which constructs +and returns the null vector.} + +\ccNestedType{Construct_hyperplane_d}{Function object type that +provides \ccc{Hyperplane_d operator()(ForwardIterator first, +ForwardIterator last, Point_d p, CGAL::Oriented_side side)}, which +constructs and returns a hyperplane passing through the points in +\ccc{tuple[first,last)} and oriented such that \ccc{p} is on the side +\ccc{side} of the returned hyperplane. When +\ccc{side==ON_ORIENTED_BOUNDARY} then any hyperplane containing the +tuple is returned.} + +\ccNestedType{Vector_to_point_d}{Function object type that provides +\ccc{Point_d operator()(Vector_d v)}, which constructs and +returns the point defined by $0+v$.} + +\ccNestedType{Point_to_vector_d}{Function object type that provides +\ccc{Vector_d operator()(Point_d v)}, which constructs and returns the +vector defined by $p-0$.} + +\ccNestedType{Orientation_d}{Function object type that provides +\ccc{Orientation operator()(ForwardIterator first, +ForwardIterator last)}, which determines the orientation of the +points \ccc{tuple[first,last)}.} + +\ccNestedType{Orthogonal_vector_d}{Function object type that provides +\ccc{Vector_d operator()(Hyperplane_d h)}, which constructs and +returns a vector orthogonal to \ccc{h} and pointing from the boundary +into its positive halfspace.} + +\ccNestedType{Oriented_side_d}{Predicate object type that provides +\ccc{Oriented_side operator()(Hyperplane_d h, Point_d p)}, which +determines the oriented side of \ccc{p} with respect to \ccc{h}.} + +\ccNestedType{Has_on_positive_side_d}{Predicate object type that +provides \ccc{bool operator()(Hyperplane_d h, Point_d p)}, which +return true iff \ccc{p} lies in the positive halfspace determined by +\ccc{h}.} + +\ccNestedType{Affinely_independent_d}{Predicate object type that provides +\ccc{bool operator()(ForwardIterator first, ForwardIterator last)}, which +determines if the points \ccc{tuple[first,last)} are affinely independent.} + +\ccNestedType{Contained_in_simplex_d}{Predicate object type that +provides \ccc{bool operator()(ForwardIterator first, ForwardIterator +last, Point_d p)}, which determines if \ccc{p} is contained in +the closed simplex defined by the points in \ccc{tuple[first,last)}.} + +\ccNestedType{Contained_in_affined_hull_d}{Predicate object type that +provides \ccc{bool operator()(ForwardIterator first, ForwardIterator +last, Point_d p)}, which determines if \ccc{p} is contained in +the affine hull of the points in \ccc{tuple[first,last)}.} + +\ccNestedType{Intersect_d}{Predicate object type that provides +\ccc{Object operator()(Ray_d r, Hyperplane_d h)}, which determines if +\ccc{r} and \ccc{h} intersect and returns the corresponding +polymorphic object.} + +\ccCreation +\ccCreationVariable{traits} + +A default constructor and copy constructor is required. + +\ccOperations + +For each of the above function and predicate object types, +\ccc{Func_obj_type}, a function must exist with the name +\ccc{func_obj_type_object} that creates an instance of the function or +predicate object type. For example: + +\ccMethod{Construct_vector_d construct_vector_d_object();}{} + +\ccAutoIndexingOn + +\ccHasModels +\ccRefIdfierPage{CGAL::Cartesian_d}\\ +\ccRefIdfierPage{CGAL::Homogeneous_d}\\ +\ccRefIdfierPage{CGAL::Convex_hull_d_traits_3} + +%\ccSeeAlso + +\end{ccRefConcept} diff --git a/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/Convex_hull_d.tex b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/Convex_hull_d.tex new file mode 100644 index 00000000000..0b933ba9cbb --- /dev/null +++ b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/Convex_hull_d.tex @@ -0,0 +1,344 @@ +% begin cgal manual page + +\begin{ccRefClass}{Convex_hull_d}\ccCreationVariable{C} + +\ccDefinition + +An instance \ccc{C} of type \ccc{Convex_hull_d} is the convex hull +of a multi-set \ccc{S} of points in $d$-dimensional space. We call +\ccc{S} the underlying point set and $d$ or \ccc{dim} the dimension of +the underlying space. We use \ccc{dcur} to denote the affine dimension +of \ccc{S}. The data type supports incremental construction of hulls. + +The closure of the hull is maintained as a simplicial complex, i.e., +as a collection of simplices. The intersection of any two is a face of +both\footnote{The empty set if a facet of every simplex.}. In the +sequel we reserve the word simplex for the simplices of dimension +\ccc{dcur}. For each simplex there is a handle of type +\ccc{Simplex_handlex} and for each vertex there is a handle of type +\ccc{Vertex_handle}. Each simplex has $1 + \ccc{dcur}$ vertices +indexed from $0$ to \ccc{dcur}; for a simplex $s$ and an index $i$, +\ccc{C.vertex(s,i)} returns the $i$-th vertex of $s$. For any simplex +$s$ and any index $i$ of $s$ there may or may not be a simplex $t$ +opposite to the $i$-th vertex of $s$. The function +\ccc{C.opposite_simplex(s,i)} returns $t$ if it exists and returns +\ccc{Simplex_handle()} (the undefined handle) otherwise. If $t$ exists +then $s$ and $t$ share \ccc{dcur} vertices, namely all but the vertex +with index $i$ of $s$ and the vertex with index +\ccc{C.index_of_vertex_in_opposite_simplex(s,i)} of $t$. Assume that +$t$ exists and let \ccc{j = +C.index_of_vertex_in_opposite_simplex(s,i)}. Then $s =$ +\ccc{C.opposite_simplex(t,j)} and $i =$ +\ccc{C.index_of_vertex_in_opposite_simplex(t,j)}. + +The boundary of the hull is also a simplicial complex. All simplices +in this complex have dimension $\ccc{dcur} - 1$. For each boundary +simplex there is a handle of type \ccc{Facet_handle}. Each facet has +\ccc{dcur} vertices indexed from $0$ to $\ccc{dcur} - 1$. If \ccc{dcur +> 1} then for each facet $f$ and each index $i$, $0 \le i < +\ccc{dcur}$, there is a facet $g$ opposite to the $i$-th vertex of +$f$. The function \ccc{C.opposite_facet(f,i)} returns $g$. Two +neighboring facets $f$ and $g$ share \ccc{dcur - 1} vertices, namely +all but the vertex with index $i$ of $f$ and the vertex with index +\ccc{C.index_of_vertex_in_opposite_facet(f,i)} of $g$. Let \ccc{j = +C.index_of_vertex_in_opposite_facet(f,i)}. Then \ccc{f = +C.opposite_facet(g,j)} and \ccc{i = +C.index_of_vertex_in_opposite_facet(g,j)}. + + +\ccSetOneOfTwoColumns{6cm} + +\ccTypes + +\ccNestedType{R}{the representation class.} + +\ccNestedType{Point_d}{the point type.} + +\ccNestedType{Hyperplane_d}{the hyperplane type.} + +\ccNestedType{Simplex_handle}{handle for simplices.} + +\ccNestedType{Facet_handle}{handle for facets.} + +\ccNestedType{Vertex_handle}{handle for vertices.} + +\ccNestedType{Simplex_iterator}{iterator for simplices.} + +\ccNestedType{Facet_iterator}{iterator for facets.} + +\ccNestedType{Vertex_iterator}{iterator for vertices.} + +\ccNestedType{Hull_vertex_iterator}{iterator for vertices that are +part of the convex hull.} + +Note that each iterator fits the handle concept, i.e. iterators can be +used as handles. Note also that all iterator and handle types come +also in a const flavor, e.g., \ccc{Vertex_const_iterator} is the +constant version of \ccc{Vertex_iterator}. Const correctness requires +to use the const version whenever the the convex hull object is +referenced as constant. The \ccc{Hull_vertex_iterator} is convertible +to \ccc{Vertex_iterator} and \ccc{Vertex_handle}. + +\ccNestedType{Point_const_iterator}{const iterator for all inserted +points.} + +\ccNestedType{Hull_point_const_iterator}{const iterator for all points +that are part of the convex hull.} + + +\ccSetOneOfTwoColumns{3cm} + +\ccCreation + +\ccConstructor{Convex_hull_d(int d, R Kernel = R())}{creates an +instance \ccc{C} of type \ccc{Convex_hull_d}. The dimension of the +underlying space is $d$ and \ccc{S} is initialized to the empty point +set. The traits class \ccc{R} specifies the models of all types and +the implementations of all geometric primitives used by the convex +hull class. The default model is one of the $d$-dimensional +representation classes (e.g., \ccc{Homogeneous_d}). } + +The data type \ccc{Convex_hull_d} offers neither copy constructor nor +assignment operator. + +\ccHeading{Requirements} + +\ccc{R} is a model of the concept \ccc{ConvexHullTraits_d} + \ccIndexMainItem[c]{ConvexHullTraits_d}. + +\ccSetTwoOfThreeColumns{3cm}{2cm} + +\ccOperations + +All operations below that take a point \ccc{x} as argument have the +common precondition that \ccc{x} is a point of ambient space. + + +\ccMethod{int dimension() ;}{returns the dimension of ambient space } + +\ccMethod{int current_dimension() ;}{% +returns the affine dimension \ccc{dcur} of $S$. } + +\ccMethod{Point_d associated_point(Vertex_handle v) ;}{% +returns the point associated with vertex $v$.} + +\ccMethod{Vertex_handle vertex_of_simplex(Simplex_handle s, int i) +;}{returns the vertex corresponding to the $i$-th vertex of $s$.\\ +\ccPrecond $0 \leq i \leq \ccc{dcur}$. } + +\ccMethod{Point_d point_of_simplex(Simplex_handle s,int i) ;}{same as +\ccc{C.associated_point(C.vertex_of_simplex(s,i))}. } + +\ccMethod{Simplex_handle opposite_simplex(Simplex_handle s,int i) +;}{returns the simplex opposite to the $i$-th vertex of $s$ +(\ccc{Simplex_handle()} if there is no such simplex). \ccPrecond $0 +\leq i \leq \ccc{dcur}$. } + +\ccMethod{int index_of_vertex_in_opposite_simplex(Simplex_handle s,int +i) ;}{returns the index of the vertex opposite to the $i$-th vertex of +$s$. \ccPrecond $0 \leq i \leq \ccc{dcur}$ and there is a simplex +opposite to the $i$-th vertex of $s$. } + +\ccMethod{Simplex_handle simplex(Vertex_handle v) ;}{returns a simplex +of which $v$ is a node. Note that this simplex is not unique. } + +\ccMethod{int index(Vertex_handle v) ;}{returns the index of $v$ in +\ccc{simplex(v)}. } + +\ccMethod{Vertex_handle vertex_of_facet(Facet_handle f, int i) +;}{returns the vertex corresponding to the $i$-th vertex of $f$. +\ccPrecond $0 \leq i < \ccc{dcur}$. } + +\ccMethod{Point_d point_of_facet(Facet_handle f, int i) ;}{same as +\ccc{C.associated_point(C.vertex_of_facet(f,i))}. } + +\ccMethod{Facet_handle opposite_facet(Facet_handle f, int i) +;}{returns the facet opposite to the $i$-th vertex of $f$ +(\ccc{Facet_handle()} if there is no such facet). \ccPrecond $0 \leq i +< \ccc{dcur}$ and \ccc{dcur > 1}. } + +\ccMethod{int index_of_vertex_in_opposite_facet(Facet_handle f, int i) +;}{returns the index of the vertex opposite to the $i$-th vertex of +$f$. \ccPrecond $0 \leq i < \ccc{dcur}$ and \ccc{dcur > 1}. } + +\ccMethod{Hyperplane_d hyperplane_supporting(Facet_handle f) +;}{returns a hyperplane supporting facet \ccc{f}. The hyperplane is +oriented such that the interior of \ccc{C} is on the negative side of +it. \ccPrecond \ccc{f} is a facet of \ccc{C} and \ccc{dcur > 1}. } + +\ccMethod{Vertex_handle insert(const Point_d& x);}{adds point \ccc{x} +to the underlying set of points. If $x$ is equal to (the point +associated with) a vertex of the current hull this vertex is returned +and its associated point is changed to $x$. If $x$ lies outside the +current hull, a new vertex \ccc{v} with associated point $x$ is added +to the hull and returned. In all other cases, i.e., if $x$ lies in the +interior of the hull or on the boundary but not on a vertex, the +current hull is not changed and \ccc{Vertex_handle()} is returned. If +\ccc{CGAL_CHECK_EXPENSIVE} is defined then the validity check +\ccc{is_valid(true)} is executed as a post condition. } + +\ccMethod{template void +insert(Forward_iterator first, Forward_iterator last) ;}{adds \ccc{S = +set [first,last)} to the underlying set of points. If any point +\ccc{S[i]} is equal to (the point associated with) a vertex of the +current hull its associated point is changed to \ccc{S[i]}. } + +\ccMethod{bool is_dimension_jump(const Point_d& x) ;}{returns true if +$x$ is not contained in the affine hull of \ccc{S}. } + +\ccMethod{std::list facets_visible_from(const Point_d& +x);}{returns the list of all facets that are visible from \ccc{x}.\\ +\ccPrecond \ccc{x} is contained in the affine hull of \ccc{S}. } + +\ccMethod{Bounded_side bounded_side(const Point_d& x);}{returns +\ccc{ON_BOUNDED_SIDE} (\ccc{ON_BOUNDARY},\ccc{ON_UNBOUNDED_SIDE}) if +\ccc{x} is contained in the interior (lies on the boundary, is +contained in the exterior) of \ccc{C}. \ccPrecond \ccc{x} is contained +in the affine hull of \ccc{S}. } + +\ccMethod{void clear(int d) ;}{reinitializes \ccc{C} to an empty hull +in $d$-dimensional space. } + +\ccMethod{int number_of_vertices() ;}{returns the number of vertices +of \ccc{C}. } + +\ccMethod{int number_of_facets() ;}{returns the number of facets of +\ccc{C}. } + +\ccMethod{int number_of_simplices() ;}{returns the number of bounded +simplices of \ccc{C}. } + +\ccMethod{void print_statistics() ;}{gives information about the size +of the current hull and the number of visibility tests performed. } + +\ccMethod{bool is_valid(bool throw_exceptions = false) ;}{checks the +validity of the data structure. If \ccc{throw_exceptions == thrue} +then the program throws the following exceptions to inform about the +problem.\\ \ccc{chull_has_center_on_wrong_side_of_hull_facet} the +hyperplane supporting a facet has the wrong orientation.\\ +\ccc{chull_has_local_non_convexity} a ridge is locally non convex.\\ +\ccc{chull_has_double_coverage} the hull has a winding number larger +than 1. } + +\ccSetTwoOfThreeColumns{3cm}{3cm} + +\ccHeading{Lists and Iterators} + +\ccMethod{Vertex_iterator vertices_begin() ;}{an iterator of \ccc{C} to +start the iteration over all vertices of the complex.} + +\ccMethod{Vertex_iterator vertices_end() ;}{the past the end iterator +for vertices.} + +\ccMethod{Simplex_iterator simplices_begin() ;}{an iterator of \ccc{C} +to start the iteration over all simplices of the complex.} + +\ccMethod{Simplex_iterator simplices_end() ;}{the past the end +iterator for simplices.} + +\ccMethod{Facet_iterator facets_begin() ;}{an iterator of \ccc{C} to +start the iteration over all facets of the complex.} + +\ccMethod{Facet_iterator facets_end() ;}{the past the end iterator for +facets.} + +\ccMethod{Hull_vertex_iterator hull_vertices_begin() ;}{an iterator to +start the iteration over all vertices of \ccc{C} that are part of the +convex hull.} + +\ccMethod{Hull_vertex_iterator hull_vertices_end() ;}{the past the end +iterator for hull vertices.} + + +\ccMethod{Point_const_iterator points_begin() ;}{returns the start +iterator for all points that have been inserted to construct \ccc{C}.} + +\ccMethod{Point_const_iterator points_end() ;}{returns the past the +end iterator for points.} + +\ccMethod{Hull_point_const_iterator hull_points_begin() ;}{returns an +iterator to start the iteration over all points in the convex hull +\ccc{C}. Included are points in the interior of facets.} + +\ccMethod{Hull_point_const_iterator hull_points_end() ;}{returns the +past the end iterator for points in the convex hull.} + +\ccMethod{template void visit_all_facets(const +Visitor& V) ;}{each facet of \ccc{C} is visited by the visitor object +\ccc{V}. \ccc{V} has to have a function call operator:\\ \ccc{void +operator()(Facet_handle) const} } + +\ccMethod{const std::list& all_points() ;}{returns a list of +all points that have been inserted to construct \ccc{C}.} + +\ccMethod{std::list all_vertices() ;}{returns a list of +all vertices of \ccc{C} (also interior ones). } + +\ccMethod{std::list all_simplices() ;}{returns a list +of all simplices in \ccc{C}. } + +\ccMethod{std::list all_facets() ;}{returns a list of +all facets of \ccc{C}.} + + +\ccHeading{Iteration Statements} + +{\bf forall\_ch\_vertices}($v,C$) $\{$ ``the vertices of $C$ are +successively assigned to $v$'' $\}$ + +{\bf forall\_ch\_simplices}($s,C$) $\{$ ``the simplices of $C$ are +successively assigned to $s$'' $\}$ + +{\bf forall\_ch\_facets}($f,C$) $\{$ ``the facets of $C$ are +successively assigned to $f$'' $\}$ + + +\ccImplementation + +The implementation of type \ccc{Convex_hull_d} is based on +\cite{cms:fourresults-93} and \cite{BMS:degeneracy-94}. The details +of the implementation can be found in the implementation document +available at the download site of this package. + +The time and space requirements are input dependent. Let $C_1$, $C_2$, +$C_3$, \ldots be the sequence of hulls constructed and for a point $x$ +let $k_i$ be the number of facets of $C_i$ that are visible from $x$ +and that are not already facets of $C_{i-1}$. Then the time for +inserting $x$ is $O(\ccc{dim} \sum_i k_i)$ and the number of new simplices +constructed during the insertion of $x$ is the number of facets of the +hull which were not already facets of the hull before the insertion. + +The data type \ccc{Convex_hull_d} is derived from +\ccc{Regular_complex_d}. The space requirement of regular complexes is +essentially $12(\ccc{dim} +2)$ bytes times the number of simplices +plus the space for the points. \ccc{Convex_hull_d} needs an additional +$8 + (4 + x)\ccc{dim}$ bytes per simplex where $x$ is the space +requirement of the underlying number type and an additional $12$ bytes +per point. The total is therefore $(16 + x)\ccc{dim} + 32$ bytes times +the number of simplices plus $28 + x \cdot \ccc{dim}$ bytes times the +number of points. + +\ccHeading{Low Dimensional Conversion Routine} +include \ccc{} + +\ccFunction{template +void convex_hull_d_to_polyhedron_3( const Convex_hull_d& C, Polyhedron_3& P) ;}{converts the convex hull \ccc{C} to polyedral surface stored in + \ccc{P}.\\ \ccPrecond \ccc{dim == 3} and \ccc{dcur == 3}. +} + +\ccHeading{Low Dimensional Output Routines} +include \ccc{} + +\ccFunction{template +void d2_show(const Convex_hull_d& C, CGAL::Window_stream& W);}{draws the convex hull \ccc{C} in window \ccc{W}.\\ +\ccPrecond \ccc{dim == 2}. +} + +\ccFunction{template +void d3_surface_map(const Convex_hull_d& C, GRAPH< typename Convex_hull_d::Point_d ,int>& G);}{constructs the representation of the surface of \ccc{C} as a +bidirected LEDA graph \ccc{G}.\\ \ccPrecond \ccc{dim == 3}. +} + +\end{ccRefClass} + + diff --git a/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/Convex_hull_d_traits_3.tex b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/Convex_hull_d_traits_3.tex new file mode 100644 index 00000000000..04a728c0a31 --- /dev/null +++ b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/Convex_hull_d_traits_3.tex @@ -0,0 +1,45 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: Convex_hull_traits_d.tex +% +------------------------------------------------------------------------+ +% | 17.05.2001 Michael Seel & Susan Hert +% | Package: Convex_hull_d +% | +% +------------------------------------------------------------------------+ + +\ccAutoIndexingOff +\begin{ccRefClass}{Convex_hull_d_traits_3} +\ccAutoIndexingOn +\ccIndexTraitsClassDefault[C]{Convex_hull_d} + +\ccDefinition + +The class \ccRefName\ serves as a traits class for the class +\ccc{Convex_hull_d}. This is a traits class that adapts any +low-dimensional standard kernel model, e.g. \ccc{Homogeneous} or +\ccc{Cartesian} for the fixed 3-dimensional usage of +\ccc{Convex_hull_d}. + + +\ccInclude{CGAL/Convex_hull_d_traits_3.h} + +\ccIsModel + +ConvexHullTraits\_d + +\ccCreation +\ccCreationVariable{traits} %% choose variable name + +\ccConstructor{Convex_hull_d_traits_3();}{default constructor.} + +%\ccSeeAlso +%\ccParDims +%\ccIndexTraitsClassEnd + +\ccAutoIndexingOff +\end{ccRefClass} +\ccAutoIndexingOn + +% +------------------------------------------------------------------------+ +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/DelaunayLiftedTraits_d.tex b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/DelaunayLiftedTraits_d.tex new file mode 100644 index 00000000000..aba9a7c8f10 --- /dev/null +++ b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/DelaunayLiftedTraits_d.tex @@ -0,0 +1,119 @@ +\begin{ccRefConcept}{DelaunayLiftedTraits_d} + +\ccDefinition Requirements of the second traits class to be used with the +class \ccc{Delaunay_d}. + +\ccTypes +\ccAutoIndexingOff +\ccNestedType{Point_d}{the dD point type on which the Delaunay algorithm +operates} +\ccGlue +\ccNestedType{Hyperplane_d}{a dD plane} +\ccGlue +\ccNestedType{Vector_d}{a dD vector} +\ccGlue +\ccNestedType{Ray_d}{a dD ray} +\ccGlue +\ccNestedType{RT}{a arithmetic ring type} + +\ccNestedType{Construct_vector_d}{Function object type that provides +\ccc{Vector_d operator()(int d, CGAL::Null_vector)}, which constructs +and returns the null vector.} + +\ccNestedType{Construct_hyperplane_d}{Function object type that +provides \ccc{Hyperplane_d operator()(ForwardIterator first, +ForwardIterator last, Point_d p, CGAL::Oriented_side side)}, which +constructs and returns a hyperplane passing through the points in +\ccc{tuple[first,last)} and oriented such that \ccc{p} is on the side +\ccc{side} of the returned hyperplane. When +\ccc{side==ON_ORIENTED_BOUNDARY} then any hyperplane containing the +tuple is returned.} + +\ccNestedType{Vector_to_point_d}{Function object type that provides +\ccc{Point_d operator()(Vector_d v)}, which constructs and +returns the point defined by $0+v$.} + +\ccNestedType{Point_to_vector_d}{Function object type that provides +\ccc{Vector_d operator()(Point_d v)}, which constructs and returns the +vector defined by $p-0$.} + +\ccNestedType{Orientation_d}{Function object type that provides +\ccc{Orientation operator()(ForwardIterator first, +ForwardIterator last)}, which determines the orientation of the +points \ccc{tuple[first,last)}.} + +\ccNestedType{Orthogonal_vector_d}{Function object type that provides +\ccc{Vector_d operator()(Hyperplane_d h)}, which constructs and +returns a vector orthogonal to \ccc{h} and pointing from the boundary +into its positive halfspace.} + +\ccNestedType{Oriented_side_d}{Predicate object type that provides +\ccc{Oriented_side operator()(Hyperplane_d h, Point_d p)}, which +determines the oriented side of \ccc{p} with respect to \ccc{h}.} + +\ccNestedType{Has_on_positive_side_d}{Predicate object type that +provides \ccc{bool operator()(Hyperplane_d h, Point_d p)}, which +return true iff \ccc{p} lies in the positive halfspace determined by +\ccc{h}.} + +\ccNestedType{Affinely_independent_d}{Predicate object type that provides +\ccc{bool operator()(ForwardIterator first, ForwardIterator last)}, which +determines if the points \ccc{tuple[first,last)} are affinely independent.} + +\ccNestedType{Contained_in_simplex_d}{Predicate object type that +provides \ccc{bool operator()(ForwardIterator first, ForwardIterator +last, Point_d p)}, which determines if \ccc{p} is contained in +the closed simplex defined by the points in \ccc{tuple[first,last)}.} + +\ccNestedType{Contained_in_affined_hull_d}{Predicate object type that +provides \ccc{bool operator()(ForwardIterator first, ForwardIterator +last, Point_d p)}, which determines if \ccc{p} is contained in +the affine hull of the points in \ccc{tuple[first,last)}.} + +\ccNestedType{Intersect_d}{Predicate object type that provides +\ccc{Object operator()(Ray_d r, Hyperplane_d h)}, which determines if +\ccc{r} and \ccc{h} intersect and returns the corresponding +polymorphic object.} + +The previous requirements are all identical to the concept +\ccc{ConvexHullTraits_d}. The Delaunay class adds the following +requirements. + +\ccNestedType{Project_along_d_axis_d}{Predicate object type that +provides \ccc{DelaunayTraits_d::Point_d operator()(Point_d p)}, which +determines the $d-1$-dimensional point from the $d$-dimensional point +$p$ while discarding the last coordinate.} + +\ccNestedType{Lift_to_paraboloid_d}{Predicate object type that +provides \ccc{Point_d operator()(DelaunayTraits_d::Point_d p)}, which +determines the $d$-dimensional point from the $d-1$-dimensional point +$p$ while lifting it to the paraboloid of revolution.} + +\ccNestedType{Component_accessor_d}{Predicate object type that +provides \ccc{RT homogeneous(Vector_d v,int i)} and \ccc{int +dimension(Vector_d v)}, where the former determines the $i$th +coordinate of $v$ and the latter the dimension of $v$.} + +\ccCreation +\ccCreationVariable{traits} + +A default constructor and copy constructor is required. + +\ccOperations + +For each of the above function and predicate object types, +\ccc{Func_obj_type}, a function must exist with the name +\ccc{func_obj_type_object} that creates an instance of the function or +predicate object type. For example: + +\ccMethod{Construct_vector_d construct_vector_d_object();}{} + +\ccAutoIndexingOn + +\ccHasModels +\ccRefIdfierPage{CGAL::Cartesian_d}\\ +\ccRefIdfierPage{CGAL::Homogeneous_d} + +%\ccSeeAlso + +\end{ccRefConcept} diff --git a/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/DelaunayTraits_d.tex b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/DelaunayTraits_d.tex new file mode 100644 index 00000000000..301c3716c80 --- /dev/null +++ b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/DelaunayTraits_d.tex @@ -0,0 +1,60 @@ +\begin{ccRefConcept}{DelaunayTraits_d} + +\ccDefinition Requirements of the first traits class to be used with the +class \ccc{Delaunay_d}. + +\ccTypes +\ccAutoIndexingOff +\ccNestedType{Point_d}{the dD point type on which the delaunay +algorithm operates} +\ccGlue +\ccNestedType{Sphere_d}{a dD sphere} +\ccGlue +\ccNestedType{FT}{an arithmetic field type} + +\ccNestedType{Point_of_sphere_d}{Predicate object type that provides +\ccc{Point_d operator()(Sphere_d s, int i)}, which returns the $i$th +point defining sphere \ccc{s}.} + +\ccNestedType{Construct_sphere_d}{Predicate object type that provides +\ccc{Sphere_d operator()(int d, ForwardIterator first, ForwardIterator +last)}, which returns a dD sphere through the points in +\ccc{tuple[first,last)}.} + +\ccNestedType{Contained_in_simplex_d}{Predicate object type that +provides \ccc{bool operator()(ForwardIterator first, ForwardIterator +last, Point_d p)}, which determines if \ccc{p} is contained in +the closed simplex defined by the points in \ccc{tuple[first,last)}.} + +\ccNestedType{Squared_distance_d}{Predicate object type that provides +\ccc{FT operator()(Point_d p,Point_d q)}, which determines the +squared distance from \ccc{p} to \ccc{q}.} + +\ccNestedType{Affinely_independent_d}{Predicate object type that +provides \ccc{bool operator()(ForwardIterator first, ForwardIterator +last)}, which determines if the points in \ccc{tuple[first,last)} are +affinely independent.} + +\ccCreation +\ccCreationVariable{traits} + +A default constructor and copy constructor is required. + +\ccOperations + +For each of the above function and predicate object types, +\ccc{Func_obj_type}, a function must exist with the name +\ccc{func_obj_type_object} that creates an instance of the function or +predicate object type. For example: + +\ccMethod{Construct_sphere_d construct_sphere_d_object();}{} + +\ccAutoIndexingOn + +\ccHasModels +\ccRefIdfierPage{CGAL::Cartesian_d}\\ +\ccRefIdfierPage{CGAL::Homogeneous_d} + +%\ccSeeAlso + +\end{ccRefConcept} diff --git a/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/Delaunay_d.tex b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/Delaunay_d.tex new file mode 100644 index 00000000000..55713278d1f --- /dev/null +++ b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/Delaunay_d.tex @@ -0,0 +1,339 @@ +% begin cgal manual page + +\begin{ccRefClass}{Delaunay_d< R, Lifted_R >}\ccCreationVariable{DT} +\ccIndexMainItemBegin{Delaunay triangulation, dD} + +\ccDefinition + +An instance \ccc{DT} of type \ccc{Delaunay_d< R, Lifted_R >} is the +nearest and furthest site Delaunay triangulation of a set \ccc{S} of +points in some $d$-dimensional space. We call \ccc{S} the underlying +point set and $d$ or \ccc{dim} the dimension of the underlying space. +We use \ccc{dcur} to denote the affine dimension of \ccc{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 \ccc{dcur}. In the nearest +site Delaunay triangulation the circumsphere of any simplex in the +triangulation contains no point of $S$ in its interior. In the +furthest site Delaunay triangulation the circumsphere of any simplex +contains no point of $S$ in its exterior. If the points in $S$ are +co-circular then any triangulation of $S$ is a nearest as well as a +furthest site Delaunay triangulation of $S$. If the points in $S$ are +not co-circular then no simplex can be a simplex of both +triangulations. Accordingly, we view \ccc{DT} as either one or two +collection(s) of simplices. If the points in $S$ are co-circular there +is just one collection: the set of simplices of some triangulation. +If the points in $S$ 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 +\ccc{Simplex_handle} and for each vertex of the triangulation there is +a handle of type \ccc{Vertex_handle}. Each simplex has \ccc{1 + dcur} +vertices indexed from $0$ to \ccc{dcur}. For any simplex $s$ and any +index $i$, \ccc{DT.vertex_of(s,i)} returns the $i$-th vertex of +$s$. There may or may not be a simplex $t$ opposite to the vertex of +$s$ with index $i$. The function \ccc{DT.opposite_simplex(s,i)} +returns $t$ if it exists and returns \ccc{Simplex_handle()} +otherwise. If $t$ exists then $s$ and $t$ share \ccc{dcur} vertices, +namely all but the vertex with index $i$ of $s$ and the vertex with +index \ccc{DT.index_of_vertex_in_opposite_simplex(s,i)} of $t$. +Assume that $t = \ccc{DT.opposite_simplex(s,i)}$ exists and let $j = +\ccc{DT.index_of_vertex_in_opposite_simplex(s,i)}$. Then \ccc{s = +DT.opposite_simplex(t,j)} and \ccc{i = +DT.index_of_vertex_in_opposite_simplex(t,j)}. In general, a vertex +belongs to many simplices. + +Any simplex of \ccc{DT} belongs either to the nearest or to the +furthest site Delaunay triangulation or both. The test +\ccc{DT.simplex_of_nearest(dt_simplex s)} returns true if \ccc{s} +belongs to the nearest site triangulation and the test +\ccc{DT.simplex_of_furthest(dt_simplex s)} returns true if \ccc{s} +belongs to the furthest site triangulation. + +\ccInheritsFrom \ccc{Convex_hull_d} + +\ccSetOneOfTwoColumns{7cm} + +\ccTypes + +\ccNestedType{Simplex_handle}{handles to the simplices of the complex. +} + +\ccNestedType{Vertex_handle}{handles to vertices of the complex. +} + +\ccNestedType{Point_d}{the point type +} + +\ccNestedType{Sphere_d}{the sphere type +} + +\ccEnum{enum Delaunay_voronoi_kind { NEAREST, FURTHEST }}{interface flags +} + +To use these types you can typedef them into the global +scope after instantiation of the class. We use \ccc{Vertex_handle} instead +of \ccc{Delaunay_d< R, Lifted_R >::Vertex_handle} from now on. Similarly we use +\ccc{Simplex_handle}. + + + +\ccNestedType{Point_const_iterator}{the iterator for points. +} + +\ccNestedType{Vertex_iterator}{the iterator for vertices. +} + +\ccNestedType{Simplex_iterator}{the iterator for simplices. +} + + +\ccSetOneOfTwoColumns{3cm} + +\ccCreation + +\ccConstructor{Delaunay_d< R, Lifted_R >(int d, R k1 = R(), Lifted_R k2 = Lifted_R())}{creates an instance \ccc{DT} of type \ccc{Delaunay_d}. The +dimension of the underlying space is $d$ and \ccc{S} is initialized to the +empty point set. The traits class \ccc{R} specifies the models of +all types and the implementations of all geometric primitives used by +the Delaunay class. The traits class \ccc{Lifted_R} specifies the models of +all types and the implementations of all geometric primitives used by +the base class of \ccc{Delaunay_d< R, Lifted_R >}. The second template parameter defaults to +the first: \ccc{Delaunay_d = Delaunay_d}. +} + +The data type \ccc{Delaunay_d} offers neither copy constructor nor +assignment operator. + +\ccHeading{Requirements} + +\ccc{R} is a model of the concept \ccc{DelaunayTraits_d} + \ccIndexMainItem[c]{DelaunayTraits_d}. +\ccc{Lifted_R} is a model of the concept \ccc{DelaunayLiftedTraits_d} + \ccIndexMainItem[c]{DelaunayLiftedTraits_d}. + + +\ccSetTwoOfThreeColumns{3cm}{3cm} + +\ccOperations + +All operations below that take a point \ccc{x} as an argument +have the common precondition that $\ccc{x.dimension()} = \ccc{DT.dimension()}$. + + + +\ccMethod{int dimension() ;}{returns the dimension of ambient space +} + +\ccMethod{int current_dimension() ;}{returns the affine dimension of the current point set, i.e., +$-1$ is $S$ is empty, $0$ if $S$ consists of a single point, +$1$ if all points of $S$ lie on a common line, etcetera. +} + +\ccMethod{bool is_simplex_of_nearest(Simplex_handle s) ;}{returns true if \ccc{s} is a simplex of the nearest site +triangulation. +} + +\ccMethod{bool is_simplex_of_furthest(Simplex_handle s) ;}{returns true if \ccc{s} is a simplex of the furthest site +triangulation. +} + +\ccMethod{ Vertex_handle vertex_of_simplex(Simplex_handle s, int i) ;}{returns the vertex associated with the $i$-th node of $s$. +\ccPrecond $0 \leq i \leq \ccc{dcur}$. +} + +\ccMethod{Point_d associated_point(Vertex_handle v) ;}{returns the point associated with vertex $v$. +} + +\ccMethod{Point_d point_of_simplex(Simplex_handle s,int i) ;}{returns the point associated with the $i$-th vertex of $s$. +\ccPrecond $0 \leq i \leq \ccc{dcur}$. +} + +\ccMethod{Simplex_handle opposite_simplex(Simplex_handle s, int i) ;}{returns the simplex opposite to the $i$-th vertex of $s$ +(\ccc{Simplex_handle()} if there is no such simplex). +\ccPrecond $0 \leq i \leq \ccc{dcur}$. +} + +\ccMethod{int index_of_vertex_in_opposite_simplex(Simplex_handle s,int i) ;}{returns the index of the vertex opposite to the $i$-th vertex +of $s$. \ccPrecond $0 \leq i \leq \ccc{dcur}$. +} + +\ccMethod{Simplex_handle simplex(Vertex_handle v) ;}{returns a simplex of the nearest site triangulation incident +to $v$. +} + +\ccMethod{int index(Vertex_handle v) ;}{returns the index of $v$ in \ccc{DT.simplex(v)}. +} + +\ccMethod{ bool contains(Simplex_handle s, const Point_d& x) ;}{returns true if \ccc{x} is contained in the closure of simplex \ccc{s}. +} + +\ccMethod{ bool empty() ;}{decides whether \ccc{DT} is empty. +} + +\ccMethod{void clear() ;}{reinitializes \ccc{DT} to the empty Delaunay triangulation. +} + +\ccMethod{Vertex_handle insert(const Point_d& x) ;}{inserts point $x$ into \ccc{DT} and returns the corresponding +\ccc{Vertex_handle}. More precisely, if there is already a vertex \ccc{v} in +\ccc{DT} positioned at $x$ (i.e., \ccc{associated_point(v)} is equal to +\ccc{x}) then \ccc{associated_point(v)} is changed to \ccc{x} (i.e., +\ccc{associated_point(v)} is made identical to \ccc{x}) and if there is no +such vertex then a new vertex $v$ with \ccc{associated_point(v) = x} is +added to \ccc{DT}. In either case, $v$ is returned. +} + +\ccMethod{Simplex_handle locate(const Point_d& x) ;}{returns a simplex of the nearest site triangulation +containing \ccc{x} in its closure (returns \ccc{Simplex_handle()} if \ccc{x} lies +outside the convex hull of $S$). +} + +\ccMethod{Vertex_handle lookup(const Point_d& x) ;}{if \ccc{DT} contains a vertex $v$ with \ccc{associated_point(v) = x} +the result is $v$ otherwise the result is \ccc{Vertex_handle()}. +} + +\ccMethod{Vertex_handle nearest_neighbor(const Point_d& x) ;}{computes a vertex $v$ of \ccc{DT} that is closest to $x$, +i.e.,\\ $\ccc{dist(x,associated_point(v))} = \min \{ +\ccc{dist(x, associated_point(u))} \mid u \in S\ \}$. +} + + +\ccMethod{std::list range_search(const Sphere_d& C) ;}{returns the list of all vertices contained in the closure of +sphere $C$. +} + +\ccMethod{std::list range_search(const std::vector& A) ;}{returns the list of all vertices contained in the closure of +the simplex whose corners are given by \ccc{A}. +\ccPrecond \ccc{A} must consist of $d+1$ affinely independent points +in base space. +} + +\ccMethod{std::list all_simplices(Delaunay_voronoi_kind k = NEAREST) ;}{returns a list of all simplices of either the nearest or the + furthest site Delaunay triangulation of \ccc{S}. +} + +\ccMethod{std::list all_vertices(Delaunay_voronoi_kind k = NEAREST) ;}{returns a list of all vertices of either the nearest or the +furthest site Delaunay triangulation of \ccc{S}. +} + +\ccMethod{ std::list all_points() ;}{returns $S$. +} + +\ccMethod{ Point_const_iterator points_begin() ;}{returns the start iterator for points in \ccc{DT}. +} + +\ccMethod{Point_const_iterator points_end() ;}{returns the past the end iterator for points in \ccc{DT}. +} + +\ccMethod{Simplex_iterator simplices_begin(Delaunay_voronoi_kind k = NEAREST) ;}{returns the start iterator for simplices of \ccc{DT}. +} + +\ccMethod{Simplex_iterator simplices_end() ;}{returns the past the end iterator for simplices of \ccc{DT}. +} + +\ccImplementation + +The data type is derived from \ccc{Convex_hull_d} via +the lifting map. For a point $x$ in $d$-dimensional space let +\ccc{lift(x)} be its lifting to the unit paraboloid of revolution. There +is an intimate relationship between the Delaunay triangulation of a +point set $S$ and the convex hull of \ccc{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. + + + +\ccExample + + + +The abstract data type \ccc{Delaunay_d} has a default instantiation by +means of the $d$-dimensional geometric kernel. + +\begin{verbatim} +#include +#include +#include + +typedef leda_integer RT; +typedef CGAL::Homogeneous_d Kernel; +typedef CGAL::Delaunay_d 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)); + ... +} +\end{verbatim} + + + + +\ccHeading{Traits requirements} + +\ccc{Delaunay_d< R, Lifted_R >} requires the following types from the kernel traits \ccc{Lifted_R}: +\begin{verbatim} + RT Point_d Vector_d Ray_d Hyperplane_d +\end{verbatim} +and uses the following function objects from the kernel traits: +\begin{verbatim} + 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_d +\end{verbatim} +\ccc{Delaunay_d< R, Lifted_R >} requires the following types from the kernel traits \ccc{R}: +\begin{verbatim} + FT Point_d Sphere_d +\end{verbatim} +and uses the following function objects from the kernel traits \ccc{R}: +\begin{verbatim} + Construct_sphere_d + Squared_distance_d + Point_of_sphere_d + Affinely_independent_d + Contained_in_simplex_d +\end{verbatim} + + + + +\ccHeading{Low Dimensional Output Routines} +include \ccc{} + +\ccFunction{template +template void d2_show(const Delaunay_d& D, CGAL::Window_stream& W, typename Delaunay_d::Delaunay_voronoi_kind k = Delaunay_d::NEAREST) ;}{draws the underlying simplicial complex \ccc{D} into window \ccc{W}.\\ +\ccPrecond \ccc{dim == 2}. +} + +\ccFunction{template +template void d2_map(const Delaunay_d& D, GRAPH< typename Delaunay_d::Point_d, int >& DTG, typename Delaunay_d::Delaunay_voronoi_kind k = Delaunay_d::NEAREST) ;}{constructs a LEDA graph representation of the nearest +(\ccc{kind = NEAREST} or the furthest (\ccc{kind = FURTHEST}) site +Delaunay triangulation.\\ \ccPrecond \ccc{dim() == 2}. +} + +\ccIndexMainItemEnd{Delaunay triangulation, dD} +\end{ccRefClass} diff --git a/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/intro.tex b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/intro.tex new file mode 100644 index 00000000000..4563ccef0e6 --- /dev/null +++ b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/intro.tex @@ -0,0 +1,38 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: Convex_hull_d_ref/intro.tex +% +------------------------------------------------------------------------+ + +\clearpage +\section{Reference Pages for dD Convex Hulls and Delaunay Triangulations} + +A subset $S \subseteq \R^3$ is convex if for any two points $p$ and $q$ +in the set the line segment with endpoints $p$ and $q$ is contained +in $S$. The convex hull\ccIndexMainItemDef{convex hull} of a set $S$ is +the smallest convex set containing +$S$. The convex hull of a set of points $P$ is a convex +polytope with vertices in $P$. A point in $P$ is an extreme point +(with respect to $P$)\ccIndexMainItemDef{extreme point} if it is a vertex +of the convex hull of $P$. + +\cgal\ provides functions for computing convex hulls in two, three +and arbitrary dimensions as well as functions for testing if a given set of +points in is strongly convex or not. This chapter describes the class +available for arbitrary dimensions and its companion class for +computing the nearest and furthest side Delaunay triangulation. + + +\ccHeading{Concepts} + +\ccRefConceptPage{ConvexHullTraits_d} \\ +\ccRefConceptPage{DelaunayLiftedTraits_d} \\ +\ccRefConceptPage{DelaunayTraits_d} \\ + +\ccHeading{Classes} + +\ccRefIdfierPage{CGAL::Convex_hull_d_traits_3} \\ +\ccRefIdfierPage{CGAL::Convex_hull_d} \\ +\ccRefIdfierPage{CGAL::Delaunay_d< R, Lifted_R >} + +\clearpage + +\lcHtml{\ccHeading{Alphabetical Listing of Reference Pages}} diff --git a/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/main.tex b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/main.tex new file mode 100644 index 00000000000..ff6ea23203f --- /dev/null +++ b/Packages/Kernel_d/doc_tex/basic/Convex_hull_d/Convex_hull_d_ref/main.tex @@ -0,0 +1,17 @@ +% +------------------------------------------------------------------------+ +% | CBP Reference Manual: main.tex +% +------------------------------------------------------------------------+ +% | Automatically generated driver file for the reference manual chapter +% | of this package. Do not edit manually, you may loose your changes. +% +------------------------------------------------------------------------+ + +\input{Convex_hull_d_ref/intro.tex} + +\input{Convex_hull_d_ref/ConvexHullTraits_d.tex} +\input{Convex_hull_d_ref/Convex_hull_d.tex} +\input{Convex_hull_d_ref/Convex_hull_d_traits_3.tex} +\input{Convex_hull_d_ref/DelaunayLiftedTraits_d.tex} +\input{Convex_hull_d_ref/DelaunayTraits_d.tex} +\input{Convex_hull_d_ref/Delaunay_d.tex} + +%% EOF