doc update

This commit is contained in:
Loïc Dubois 2024-05-17 16:18:05 +02:00
parent 04c481cc5f
commit 97df9401e9
11 changed files with 122 additions and 228 deletions

View File

@ -692,24 +692,27 @@ Mourrain and Monique Teillaud"
@inproceedings{despre2020flipping, @inproceedings{despre2020flipping,
title={Flipping geometric triangulations on hyperbolic surfaces}, title={Flipping geometric triangulations on hyperbolic surfaces},
author={Despr{\'e}, Vincent and Schlenker, Jean-Marc and Teillaud, Monique}, author={Despr{\'e}, Vincent and Schlenker, Jean-Marc and Teillaud, Monique},
booktitle={SoCG 2020-36th International Symposium on Computational Geometry}, booktitle={36th International Symposium on Computational Geometry},
year={2020} year={2020},
url={https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.SoCG.2020.35}
} }
@article{despre2022experimental, @article{despre2022experimental,
title={Experimental analysis of Delaunay flip algorithms on genus two hyperbolic surfaces}, title={Experimental analysis of {Delaunay} flip algorithms on genus two hyperbolic surfaces},
author={Despr{\'e}, Vincent and Dubois, Lo{\"\i}c and Kolbe, Benedikt and Teillaud, Monique}, author={Despr{\'e}, Vincent and Dubois, Lo{\"\i}c and Kolbe, Benedikt and Teillaud, Monique},
year={2022} year={2022},
url={https://inria.hal.science/hal-03665888v1/document}
} }
@article{aigon2005hyperbolic, @article{aigon2005hyperbolic,
title={Hyperbolic octagons and Teichm{\"u}ller space in genus 2}, title={Hyperbolic octagons and {Teichm{\"u}ller} space in genus 2},
author={Aigon-Dupuy, Aline and Buser, Peter and Cibils, Michel and K{\"u}nzle, Alfred F and Steiner, Frank}, author={Aigon-Dupuy, Aline and Buser, Peter and Cibils, Michel and K{\"u}nzle, Alfred F and Steiner, Frank},
journal={Journal of mathematical physics}, journal={Journal of mathematical physics},
volume={46}, volume={46},
number={3}, number={3},
year={2005}, year={2005},
publisher={AIP Publishing} publisher={AIP Publishing},
url = {https://doi.org/10.1063/1.1850177}
} }

View File

@ -1,124 +1,17 @@
// Copyright (c) 2024 INRIA Nancy - Grand Est (France). LIGM Marne-la-Vallée (France) // Copyright (c) 2024 INRIA Nancy - Grand Est (France). LIGM Marne-la-Vallée (France)
// All rights reserved. // All rights reserved.
namespace CGAL { namespace CGAL{
/*! /*!
\ingroup PkgHyperbolicSurfaceTriangulation2MainClasses \ingroup PkgHyperbolicSurfaceTriangulation2MainClasses
Represents a complex number over a field. \cgalModels{ComplexWithoutSqrt}
\cgalModels{CGAL::ComplexWithoutSqrt}
\tparam FT is the field type and must be a model of `FieldNumberType`. \tparam FT is the field type and must be a model of `FieldNumberType`.
*/ */
template <class FT> template <class FT>
class Complex_without_sqrt { class Complex_without_sqrt {
public:
/// \name Creation
/// @{
/*!
Default constructor, sets the complex number to 0 + 0 * i.
*/
Complex_without_sqrt();
/*!
Constructor from the real part, sets the complex number to 'real_part' + 0 * i.
*/
Complex_without_sqrt(const FT& real_part);
/*!
Constructor from the real and imaginary parts, sets the complex number to 'real_part' + 'imaginary_part' * i.
*/
Complex_without_sqrt(const FT& real_part, const FT& imaginary_part);
/// @}
/// \name Access functions
/// @{
/*!
Sets the real part to 'real_part'
*/
void set_real_part(const FT& real_part);
/*!
Sets the imaginary part to 'imaginary_part'
*/
void set_imaginary_part(const FT& imaginary_part);
/*!
Returns the real part
*/
FT real_part() const;
/*!
Returns the imaginary part
*/
FT imaginary_part() const;
/// @}
/// \name Operations
/// @{
/*!
Returns the square of the modulus
*/
FT squared_modulus() const;
/*!
Returns the conjugate
*/
Complex_without_sqrt<FT> conjugate() const;
/*!
Returns the sum of itself and other
*/
Complex_without_sqrt<FT> operator+(const Complex_without_sqrt<FT>& other) const;
/*!
Returns the difference of itself and other
*/
Complex_without_sqrt<FT> operator-(const Complex_without_sqrt<FT>& other) const;
/*!
Returns the opposite of itself
*/
Complex_without_sqrt<FT> operator-() const;
/*!
Returns the multiplication of itself and other
*/
Complex_without_sqrt<FT> operator*(const Complex_without_sqrt<FT>& other) const;
/*!
Returns the division of itself by other
*/
Complex_without_sqrt<FT> operator/(const Complex_without_sqrt<FT>& other) const;
/// @}
/// \name Equality test
/// @{
/*!
Equality test operator.
*/
template<class FT> bool operator==(const Complex_without_sqrt<FT>& z1, const Complex_without_sqrt<FT>& z2);
/*!
Inequality test operator.
*/
template<class FT> bool operator!=(const Complex_without_sqrt<FT>& z1, const Complex_without_sqrt<FT>& z2);
/// @}
/// \name Input/output
/// @{
/*!
Outputs the complex number in a stream.
*/
template<class FT>std::ostream& operator<<(std::ostream& s, const Complex_without_sqrt<FT>& z);
/*!
Reads the complex number from a stream.
*/
template<class FT>void operator>>(std::istream& s, Complex_without_sqrt<FT>& z);
/// @}
}; };
}; // namespace CGAL
} //namespace CGAL

View File

@ -1,18 +1,18 @@
// Copyright (c) 2024 INRIA Nancy - Grand Est (France). LIGM Marne-la-Vallée (France) // Copyright (c) 2024 INRIA Nancy - Grand Est (France). LIGM Marne-la-Vallée (France)
// All rights reserved. // All rights reserved.
namespace CGAL { namespace CGAL{
/*! /*!
\ingroup PkgHyperbolicSurfaceTriangulation2MainClasses \ingroup PkgHyperbolicSurfaceTriangulation2MainClasses
Represents a fundamental domain of a closed orientable hyperbolic surface. Represents a fundamental domain of a closed orientable hyperbolic surface.
The domain is given as a polygon P represented by the list of its vertices in the Poincaré disk model, The domain is given as a polygon \f$ P \f$ represented by the list of its vertices in the Poincaré disk model,
together with a pairing of the sides of P. together with a pairing of the sides of \f$ P \f$.
The n-th side of P is the side between the n-th and the (n+1)-th vertex, where indices are modulo the number of vertices of P. The \f$ n \f$-th side of \f$ P \f$ is the side between the \f$ n \f$-th and the \f$ (n+1) \f$-th vertex, where indices are modulo the number of vertices of \f$ P \f$.
The sides pairing are represented by a list of integers, such that if the n-th integer of the list is m, then the n-th side is paired to the m-th side. The sides pairing are represented by a list of integers, such that if the \f$ n \f$-th integer of the list is \f$ m \f$, then the \f$ n \f$-th side is paired to the \f$ m \f$-th side.
\tparam Traits is the traits class and must be a model of `HyperbolicSurfacesTraits`. \tparam Traits is the traits class and must be a model of `HyperbolicSurfacesTraits_2`.
*/ */
template<class Traits> template<class Traits>
class Hyperbolic_fundamental_domain_2 { class Hyperbolic_fundamental_domain_2 {
@ -50,17 +50,17 @@ public:
int size() const; int size() const;
/*! /*!
Returns the index-th vertex Returns the index-th vertex.
*/ */
Point vertex(int index) const; Point vertex(int index) const;
/*! /*!
Returns the index of the side paired to side A, where A is the index-th side Returns the index of the side paired to the index-th side.
*/ */
int paired_side(int index) const; int paired_side(int index) const;
/*! /*!
Returns the isometry that maps side A to side B, where B is the index-th side, and A is the side paired to B Returns the isometry that maps side \f$ A \f$ to side \f$ B \f$, where \f$ B \f$ is the index-th side, and \f$ A \f$ is the side paired to \f$ B \f$.
*/ */
Hyperbolic_isometry_2<Traits> side_pairing(int index) const; Hyperbolic_isometry_2<Traits> side_pairing(int index) const;
/// @} /// @}
@ -79,8 +79,8 @@ public:
The format of the output is the following. The format of the output is the following.
The first line prints the number n of vertices of the domain. The first line prints the number n of vertices of the domain.
For i=0 to n-1 the index of the side paired to side i is printed on a separate line. For \f$ i=0 \f$ to \f$ n-1 \f$ the index of the side paired to side \f$ i \f$ is printed on a separate line.
For i=0 to n-1 the i-th vertex is printed on a separate line. For \f$ i=0 \f$ to \f$ n-1 \f$ the \f$ i \f$-th vertex is printed on a separate line.
*/ */
template<class Traits> std::ostream& operator<<(std::ostream& s, const Hyperbolic_fundamental_domain_2<Traits>& domain); template<class Traits> std::ostream& operator<<(std::ostream& s, const Hyperbolic_fundamental_domain_2<Traits>& domain);
/// @} /// @}
@ -96,4 +96,4 @@ public:
/// @} /// @}
}; };
} //namespace CGAL }; // namespace CGAL

View File

@ -1,14 +1,14 @@
// Copyright (c) 2024 INRIA Nancy - Grand Est (France). LIGM Marne-la-Vallée (France) // Copyright (c) 2024 INRIA Nancy - Grand Est (France). LIGM Marne-la-Vallée (France)
// All rights reserved. // All rights reserved.
namespace CGAL { namespace CGAL{
/*! /*!
\ingroup PkgHyperbolicSurfaceTriangulation2MainClasses \ingroup PkgHyperbolicSurfaceTriangulation2MainClasses
Factory class, whose only purpose is to randomly generate some convex domains of surfaces of genus two. Factory class, whose only purpose is to generate some convex domains of surfaces of genus two.
\tparam Traits is the traits class and must be a model of `HyperbolicSurfacesTraits`. \tparam Traits is the traits class and must be a model of `HyperbolicSurfacesTraits_2`.
*/ */
template<class Traits> template<class Traits>
class Hyperbolic_fundamental_domain_factory_2{ class Hyperbolic_fundamental_domain_factory_2{
@ -16,7 +16,7 @@ public:
/// \name Creation /// \name Creation
/// @{ /// @{
/*! /*!
Default constructor, the seed is used for random generation. Default constructor, the seed is used for generation.
*/ */
Hyperbolic_fundamental_domain_factory_2(unsigned int seed); Hyperbolic_fundamental_domain_factory_2(unsigned int seed);
/// @} /// @}
@ -31,4 +31,4 @@ public:
}; };
} //namespace CGAL }; // namespace CGAL

View File

@ -1,18 +1,18 @@
// Copyright (c) 2024 INRIA Nancy - Grand Est (France). LIGM Marne-la-Vallée (France) // Copyright (c) 2024 INRIA Nancy - Grand Est (France). LIGM Marne-la-Vallée (France)
// All rights reserved. // All rights reserved.
namespace CGAL { namespace CGAL{
/*! /*!
\ingroup PkgHyperbolicSurfaceTriangulation2MainClasses \ingroup PkgHyperbolicSurfaceTriangulation2MainClasses
Represents an isometry in the Poincaré disk model. Represents an isometry in the Poincaré disk model.
The isometry f is represented by a list (c0, c1, c2, c3) of complex numbers, The isometry \f$ f \f$ is represented by a list \f$ (c_0, c_1, c_2, c_3) \f$ of complex numbers,
so that f(z) = (c0 z + c1) / (c2 z + c3) holds on every complex z in the open unit disk. so that \f$ f(z) = (c_0 z + c_1) / (c_2 z + c_3) \f$ holds on every complex \f$ z \f$ in the open unit disk.
Facilities are offered to compose isometries, and apply an isometry to a point. Facilities are offered to compose isometries, and apply an isometry to a point.
\tparam Traits is the traits class and must be a model of `HyperbolicSurfacesTraits`. \tparam Traits is the traits class and must be a model of `HyperbolicSurfacesTraits_2`.
*/ */
template<class Traits> template<class Traits>
class Hyperbolic_isometry_2{ class Hyperbolic_isometry_2{
@ -67,7 +67,7 @@ class Hyperbolic_isometry_2{
Point evaluate(const Point& point) const; Point evaluate(const Point& point) const;
/*! /*!
Returns the composition of itself and other. Returns the composition of <code> other </code> by <code> itself </code>.
*/ */
Hyperbolic_isometry_2<Traits> compose(const Hyperbolic_isometry_2<Traits>& other) const; Hyperbolic_isometry_2<Traits> compose(const Hyperbolic_isometry_2<Traits>& other) const;
/// @} /// @}
@ -79,8 +79,6 @@ class Hyperbolic_isometry_2{
*/ */
template<class Traits> std::ostream& operator<<(std::ostream& s, const Hyperbolic_isometry_2<Traits>& isometry); template<class Traits> std::ostream& operator<<(std::ostream& s, const Hyperbolic_isometry_2<Traits>& isometry);
/// @} /// @}
}; };
} //namespace CGAL }; // namespace CGAL

View File

@ -1,7 +1,7 @@
// Copyright (c) 2024 INRIA Nancy - Grand Est (France). LIGM Marne-la-Vallée (France) // Copyright (c) 2024 INRIA Nancy - Grand Est (France). LIGM Marne-la-Vallée (France)
// All rights reserved. // All rights reserved.
namespace CGAL { namespace CGAL{
/*! /*!
\ingroup PkgHyperbolicSurfaceTriangulation2MainClasses \ingroup PkgHyperbolicSurfaceTriangulation2MainClasses
@ -11,7 +11,7 @@ Represents a triangulation of a closed orientable hyperbolic surface.
Offers facilities such as the generation of the triangulation from a convex fundamental domain, Offers facilities such as the generation of the triangulation from a convex fundamental domain,
the Delaunay flip algorithm, and the construction of a portion of the lift of the triangulation in the hyperbolic plane. the Delaunay flip algorithm, and the construction of a portion of the lift of the triangulation in the hyperbolic plane.
\tparam Traits is the traits class and must be a model of `HyperbolicSurfacesTraits`. \tparam Traits is the traits class and must be a model of `HyperbolicSurfacesTraits_2`.
*/ */
template<class Traits> template<class Traits>
class Hyperbolic_surface_triangulation_2{ class Hyperbolic_surface_triangulation_2{
@ -19,7 +19,7 @@ public:
/// \name Types /// \name Types
/// @{ /// @{
/*! /*!
Type of combinatorial map whose edges are attributed complex numbers. Type of combinatorial map whose edges are decorated with complex numbers.
*/ */
typedef Combinatorial_map<2,unspecified_type> Combinatorial_map_with_cross_ratios; typedef Combinatorial_map<2,unspecified_type> Combinatorial_map_with_cross_ratios;
/*! /*!
@ -36,7 +36,7 @@ public:
typedef typename Traits::Hyperbolic_point_2 Point; typedef typename Traits::Hyperbolic_point_2 Point;
/*! /*!
Stores a dart d of the combinatorial map, belonging to a triangle t, and stores the three vertices of a lift of t in the hyperbolic plane. Stores a dart \f$ d \f$ of the combinatorial map, belonging to a triangle \f$ t \f$, and stores the three vertices of a lift of \f$ t \f$ in the hyperbolic plane.
*/ */
struct Anchor{ struct Anchor{
typename Combinatorial_map_with_cross_ratios::Dart_handle dart; typename Combinatorial_map_with_cross_ratios::Dart_handle dart;
@ -114,11 +114,12 @@ public:
/// \name Lifting /// \name Lifting
/// @{ /// @{
/*! /*!
Lifts the triangulation in the hyperbolic plane. Returns, for every triangle T of the triangulation, one of the darts of T in the combinatorial map of the triangulation, together with a triple A,B,C of points in the hyperbolic plane. Lifts the triangulation in the hyperbolic plane.
The points A,B,C are the vertices of a lift of T in the hyperbolic plane. Returns, for every triangle \f$ t \f$ of the triangulation, one of the darts of \f$ t \f$ in the combinatorial map of the triangulation, together with a triple \f$ p,q,r \f$ of points in the hyperbolic plane.
If the center parameter is set to true, then one of the lifted triangles admits the point 0 as a vertex. The points \f$ p,q,r \f$ are the vertices of a lift of \f$ t \f$ in the hyperbolic plane.
If the center parameter is set to true, then one of the lifted triangles admits the origin \f$ 0 \f$ as a vertex.
This method is to be used only if the triangulation has an anchor. \pre This method is to be used only if the triangulation has an anchor.
*/ */
std::vector<std::tuple<Dart_const_handle, Point, Point, Point>> lift(bool center=true) const; std::vector<std::tuple<Dart_const_handle, Point, Point, Point>> lift(bool center=true) const;
/// @} /// @}
@ -128,8 +129,8 @@ public:
/*! /*!
Validity test. Validity test.
Checks that the combinatorial map has no 1,2-boundary and calls the is_valid method of the combinatorial map. Checks that the underlying combinatorial map \f$ M \f$ has no boundary and calls the is_valid method of \f$ M \f$.
If there is an anchor, then checks that the dart handle of the anchor does indeed point to a dart of the combinatorial map, and checks that the three vertices of the anchor lie within the open unit disk. If there is an anchor, then checks that the dart handle of the anchor does indeed point to a dart of \f$ M \f$, and checks that the three vertices of the anchor lie within the open unit disk.
*/ */
bool is_valid() const; bool is_valid() const;
/// @} /// @}
@ -140,22 +141,22 @@ public:
Writes the triangulation in a stream. Writes the triangulation in a stream.
The format of the output is the following. The format of the output is the following.
Each dart of the triangulation is given an index between 0 and n-1, where n is the number of darts of the triangulation. Each dart of the triangulation is given an index between \f$ 0 \f$ and \f$ n-1 \f$, where \f$ n \f$ is the number of darts of the triangulation.
The first line contains the number n of darts. The first line contains the number \f$ n \f$ of darts.
For every triangle t, the indices of the three darts of t are printed on three distinct lines. For every triangle \f$ t \f$, the indices of the three darts of \f$ t \f$ are printed on three distinct lines.
For every edge e, the indices of the two darts of e are printed on two distinct lines, followed by a third line on which the cross ratio of e is printed. For every edge \f$ e \f$, the indices of the two darts of \f$ e \f$ are printed on two distinct lines, followed by a third line on which the cross ratio of \f$ e \f$ is printed.
The next line contains either 'yes' or 'no' and tells whether the triangulation has an anchor. The next line contains either 'yes' or 'no' and tells whether the triangulation has an anchor.
If the triangulation has anchor A, then the two next lines print respectively the index of the dart of A, and the three complex numbers of A. If the triangulation has anchor, then the two next lines print respectively the index of the dart of the anchor, and the three vertices of the anchor.
*/ */
template<class Traits> std::ostream& operator<<(std::ostream& s, Hyperbolic_surface_triangulation_2<Traits>& Hyperbolic_surface_triangulation_2); std::ostream& operator<<(std::ostream& s, Hyperbolic_surface_triangulation_2<Traits>& Hyperbolic_surface_triangulation_2);
/*! /*!
Reads the triangulation from a stream. Reads the triangulation from a stream.
The format of the input should be the same as the format of the output of the 'from_stream' method. The format of the input should be the same as the format of the output of the '<<' operator.
*/ */
template<class Traits> void operator>>(std::istream& s, Hyperbolic_surface_triangulation_2<Traits>& triangulation); void operator>>(std::istream& s, Hyperbolic_surface_triangulation_2<Traits>& triangulation);
/// @} /// @}
}; };
} //namespace CGAL }; // namespace CGAL

View File

@ -1,30 +1,17 @@
// Copyright (c) 2024 INRIA Nancy - Grand Est (France). LIGM Marne-la-Vallée (France) // Copyright (c) 2024 INRIA Nancy - Grand Est (France). LIGM Marne-la-Vallée (France)
// All rights reserved. // All rights reserved.
namespace CGAL { namespace CGAL{
/*! /*!
\ingroup PkgHyperbolicSurfaceTriangulation2TraitsClasses \ingroup PkgHyperbolicSurfaceTriangulation2TraitsClasses
Traits class offered by \cgal as a default model for the traits concept `HyperbolicSurfacesTraits_2`.
\tparam HyperbolicTraitsClass must be a model of `HyperbolicDelaunayTriangulationTraits_2`. \tparam HyperbolicTraitsClass must be a model of `HyperbolicDelaunayTriangulationTraits_2`.
The default value for `HyperbolicTraitsClass` is `CGAL::Hyperbolic_Delaunay_triangulation_CK_traits_2<CGAL::Circular_kernel_2<CGAL::Cartesian<CGAL::Gmpq>,CGAL::Algebraic_kernel_for_circles_2_2<CGAL::Gmpq>>>`,
which provides exact constructions and predicates over rational numbers.
\cgalModels{HyperbolicSurfacesTraits_2} \cgalModels{HyperbolicSurfacesTraits_2}
*/ */
template<class HyperbolicTraitsClass> template<class HyperbolicTraitsClass>
class Hyperbolic_surfaces_traits_2 : public HyperbolicTraitsClass { class Hyperbolic_surfaces_traits_2 : public HyperbolicTraitsClass {
public:
/// \name Types
/// @{
typedef typename HyperbolicTraitsClass::FT FT;
typedef typename HyperbolicTraitsClass::Hyperbolic_point_2 Hyperbolic_point_2;
typedef Complex_without_sqrt<FT> Complex;
/// @}
}; };
}; // namespace CGAL
} //namespace CGAL

View File

@ -5,9 +5,6 @@
\ingroup PkgHyperbolicSurfaceTriangulation2Concepts \ingroup PkgHyperbolicSurfaceTriangulation2Concepts
\cgalConcept \cgalConcept
The concept `HyperbolicSurfacesTraits_2` describes the set of requirements
to be fulfilled by any class instantiating the template parameter of the main classes of the package.
\cgalRefines{HyperbolicDelaunayTriangulationTraits_2} \cgalRefines{HyperbolicDelaunayTriangulationTraits_2}
\cgalHasModelsBegin \cgalHasModelsBegin
@ -19,8 +16,16 @@ public:
/// \name Types /// \name Types
/// @{ /// @{
/*! /*!
Represents a complex number over a field: must be a model of 'CGAL::ComplexWithoutSqrt'. Field type.
*/ */
typedef unspecified_type Complex; typedef unspecified_type FT;
/*!
Represents a point in the Poincaré disk model of the hyperbolic plane.
*/
typedef unspecified_type Hyperbolic_point_2;
/*!
Represents a complex number over a field: must be a model of ComplexWithoutSqrt.
*/
typedef unspecified_type Complex;
/// @} /// @}
}; };

View File

@ -14,63 +14,68 @@ namespace CGAL {
<img src="header.svg" style="max-width:80%; width:80%;"/> <img src="header.svg" style="max-width:80%; width:80%;"/>
</center> </center>
This package enables handling and building triangulations of closed orientable hyperbolic surfaces. This package enables building and handling triangulations of closed orientable hyperbolic surfaces.
Facilities are offered such as the Delaunay flip algorithm, and the construction of a portion of the lift of the triangulation in the Poincaré disk model of the hyperbolic plane. Functionalities are offered such as the Delaunay flip algorithm, and the construction of a portion of the lift of the triangulation in the Poincaré disk model of the hyperbolic plane.
A triangulation of a surface can be generated from a convex fundamental domain of the surface. A method is offered that randomly generates such domains in genus two. A triangulation of a surface can be generated from a convex fundamental domain of the surface. A method is offered that generates such domains in genus two.
\section Section_Hyperbolic_Surface_Triangulations_Background Hyperbolic surfaces \section Section_Hyperbolic_Surface_Triangulations_Background Hyperbolic surfaces
\subsection Section_Hyperbolic_Surface_Triangulations_surfaces Hyperbolic surfaces
We assume some familiarity with basic notions from covering space theory, and from the theory of hyperbolic surfaces. We assume some familiarity with basic notions from covering space theory, and from the theory of hyperbolic surfaces.
The <b>Poincaré disk</b> \f$ \mathbb{D} \f$ is a model of the hyperbolic plane whose point set is the open unit disk of the complex plane \f$ \mathbb{C} \f$. The <b>Poincaré disk</b> \f$ \mathbb{D} \f$ is a model of the hyperbolic plane whose point set is the open unit disk of the complex plane \f$ \mathbb{C} \f$.
This package is concerned with the closed (compact, and without boundary) and orientable hyperbolic surfaces \f$ S \f$. In this package, every hyperbolic surface \f$ S \f$ is closed (compact, and without boundary) and orientable : this is without further mention.
The Poincaré disk \f$ \mathbb{D} \f$ is a universal covering space for \f$ S \f$, whose projection map \f$ \pi : \mathbb{D} \to S \f$ is a (local) isometry. The Poincaré disk \f$ \mathbb{D} \f$ is a universal covering space for \f$ S \f$, whose projection map \f$ \pi : \mathbb{D} \to S \f$ is a (local) isometry.
The pre-image \f$ \pi^{-1}(x) \f$ of a point \f$ x \in S \f$ is infinite, its points are the <b>lifts</b> of \f$ x \f$. The pre-image \f$ \pi^{-1}(x) \f$ of a point \f$ x \in S \f$ is infinite, its points are the <b>lifts</b> of \f$ x \f$.
We usually denote by \f$ \widetilde x \f$ a lift of \f$ x \f$.
Paths, and triangulations of \f$ S \f$ can also be lifted in \f$ \mathbb{D} \f$.
\subsection Section_Hyperbolic_Surface_Triangulations_domains Fundamental domains and triangulations \subsection Section_Hyperbolic_Surface_Triangulations_domains Fundamental domains and triangulations
Let \f$ S \f$ be a closed orientable hyperbolic surface. For representing \f$ S \f$ on a computer, we cut \f$ S \f$ into "manageable" pieces. Let \f$ S \f$ be a hyperbolic surface. For representing \f$ S \f$ on a computer, we cut \f$ S \f$ into "manageable" pieces.
A graph \f$ G \f$ embedded in \f$ S \f$ is a <b>cellular decomposition</b> of \f$ S \f$ if every face (every connected component of \f$ S \setminus G \f$ ) has genus zero; It is in that sense that the faces of \f$ G \f$ are "manageable". A graph \f$ G \f$ embedded on \f$ S \f$ is a <b>cellular decomposition</b> of \f$ S \f$ if every face (every connected component of \f$ S \setminus G \f$ ) is a topological disk.
In this document, it is implicit that if a graph \f$ G \f$ is embedded in a hyperbolic surface \f$ S \f$, then every edge of \f$ G \f$ is geodesic in \f$ S \f$. In this document, every edge of a graph \f$ G \f$ embedded on \f$ S \f$ is a geodesic on \f$ S \f$.
We consider two types of cellular decompositions of \f$ S \f$: We consider two types of cellular decompositions of \f$ S \f$:
<ul> <ul>
<li>We consider cellular decompositions \f$ G \f$ of \f$ S \f$ that have only one face. <li>We consider cellular decompositions \f$ G \f$ of \f$ S \f$ that have only one face.
Cutting \f$ S \f$ open at the edges of \f$ G \f$ results in a hyperbolic polygon \f$ P \f$, that we call <b>fundamental domain</b> for \f$ S \f$. Cutting \f$ S \f$ open at the edges of \f$ G \f$ results in a hyperbolic polygon \f$ P \f$, which is a <b>fundamental domain</b> for \f$ S \f$.
The edges of \f$ P \f$ are paired, so that every edge of \f$ G \f$ is cut into two edges that are paired in \f$ P \f$. The edges of \f$ P \f$ are paired, so that every edge of \f$ G \f$ is cut into two edges that are paired in \f$ P \f$.
Every closed orientable hyperbolic surface admits a fundamental domain \f$ P \f$ that is <b>convex</b>, in that the interior angles of \f$ P \f$ do not exceed \f$ \pi \f$. Every hyperbolic surface admits a fundamental domain \f$ P \f$ that is <b>convex</b>, in that the interior angles of \f$ P \f$ do not exceed \f$ \pi \f$.
<li>Also, we consider <b>triangulations</b> of \f$ S \f$. <li>Also, we consider <b>triangulations</b> of \f$ S \f$.
A cellular decomposition \f$ T \f$ of \f$ S \f$ is a triangulation if every face of \f$ T \f$ is a "triangle", in the sense that it admits three incidences with edges of \f$ T \f$. A cellular decomposition \f$ T \f$ of \f$ S \f$ is a triangulation if every face of \f$ T \f$ is a "triangle": it admits three incidences with edges of \f$ T \f$.
Observe that this definition allows for triangulations with only one vertex. Observe that this definition allows for triangulations with only one vertex.
</ul> </ul>
A triangulation of \f$ S \f$ can be obtained from a convex fundamental domain \f$ P \f$ of \f$ S \f$ by triangulating the interior \f$ P \f$, and by gluing back the boundary edges that are paired in \f$ P \f$. A triangulation of \f$ S \f$ can be obtained from a convex fundamental domain \f$ P \f$ of \f$ S \f$ by triangulating the interior of \f$ P \f$, and by gluing back the boundary edges that are paired in \f$ P \f$.
The assumption that \f$ P \f$ is convex ensures that the interior of \f$ P \f$ can be triangulated naively by insertion of arbitrary arcs of \f$ P \f$. The assumption that \f$ P \f$ is convex ensures that the interior of \f$ P \f$ can be triangulated naively by insertion of any maximal set of pairwise-disjoint arcs of \f$ P \f$.
\subsection Section_Hyperbolic_Surface_Triangulations_generation Generation of convex fundamental domains \subsection Section_Hyperbolic_Surface_Triangulations_generation Generation of convex fundamental domains
We aim at generating convex fundamental domains in a randomized way. This package can generate a convex fundamental domain \f$ P \f$ of a surface of genus two, with eight vertices \f$ z_0, \dots, z_7 \in \mathbb{C} \f$, whose side pairings are \f$ A B C D \overline{A} \overline{B} \overline{C} \overline{D} \f$.
We represent every domain as a polygon in the Poincaré disk, given by the list of its vertices, and endowed with side pairings. The vertices and the side pairings are in counter-clockwise order, the side between \f$ z_0 \f$ and \f$ z_1 \f$ is \f$ A \f$, and the side between \f$ z_4 \f$ and \f$ z_5 \f$ is \f$ \overline{A} \f$.
In order to perform fast and exact computations with the domains generated, every vertex must be a complex number whose type supports fast and exact computations. Those octagons are symmetric, .i.e \f$ z_i = z_{i+4} \f$ for every \f$ i \f$, where indices are modulo eight.
Under this constraint, we do not know how to generate domains of surfaces of genus greater than two. Such octagons are described in \cgalCite{aigon2005hyperbolic}.
In genus two, this package can generate a convex fundamental domain \f$ P \f$, whose side pairings are \f$ A B C D A B C D \f$, and whose eight vertices \f$ z_0, \dots, z_7 \f$ belong to \f$ \mathbb{Q} + i \mathbb{Q} \f$ (their real and imaginary parts are rational numbers).
Here the side pairings and the vertices are in counter-clockwise order, the side between \f$ z_0 \f$ and \f$ z_1 \f$ is labeled \f$ A \f$, and the side between \f$ z_4 \f$ and \f$ z_5 \f$ is also labeled \f$ A \f$. <center>
Those octagons are symmetric in the sense that \f$ z_i = z_{i+4} \f$ for every \f$ i \f$, where indices are modulo eight. <img src="octagon.svg" style="max-width:20%; width:20%;"/>
Such octagons are described in \cgalCite{aigon2005hyperbolic} (without the constraint that the vertices belong to \f$ \mathbb{Q} + i \mathbb{Q} \f$). </center>
The exact generation process can be found in \cgalCite{despre2022experimental}, together with a proof that the surfaces that can be generated in this way are dense in the space of surfaces genus two.
\section Subsection_Hyperbolic_Surface_Triangulations_Representation Representation \section Subsection_Hyperbolic_Surface_Triangulations_Representation Representation
\subsection Subsection_Hyperbolic_Surface_Triangulations_Data_Structure Data structure \subsection Subsection_Hyperbolic_Surface_Triangulations_DS_Domains Data structure for domains
We represent domains by the list of their vertices in the Poincaré disk, and by the list of their sides pairings. We represent every domain as a polygon in the Poincaré disk, given by the list of its vertices, and by the list of its side pairings.
Concerning the generation of domains, in order to perform fast and exact computations with the domains generated, every vertex must be a complex number whose type supports fast and exact computations.
Under this constraint, it is not known how to generate domains of surfaces of genus greater than two.
In genus two, this package generates domains whose vertices belong to \f$ \mathbb{Q} + i \mathbb{Q} \f$ (their real and imaginary parts are rational numbers).
The exact generation process can be found in \cgalCite{despre2022experimental}, together with a proof that the surfaces that can be generated in this way are dense in the space of surfaces genus two.
Let \f$ T \f$ be a triangulation of a closed orientable hyperbolic surface. \subsection Subsection_Hyperbolic_Surface_Triangulations_DS_Triangulations Data structure for triangulations
We represent \f$ T \f$ by an instance of CGAL::Combinatorial_map whose edges are attributed complex numbers.
The complex number \f$ R_T(e) \in \mathbb{C} \f$ attributed to an edge \f$ e \f$ of \f$ T \f$ is the <b>cross ratio</b> of \f$ e \f$ in \f$ T \f$, defined as follows. Let \f$ T \f$ be a triangulation of a hyperbolic surface.
We represent \f$ T \f$ by an instance of CGAL::Combinatorial_map whose edges are decorated with complex numbers.
The complex number \f$ R_T(e) \in \mathbb{C} \f$ decorating an edge \f$ e \f$ of \f$ T \f$ is the <b>cross ratio</b> of \f$ e \f$ in \f$ T \f$, defined as follows.
Consider the lift \f$ \widetilde T \f$ of \f$ T \f$ in the Poincaré disk \f$ \mathbb{D} \f$. Consider the lift \f$ \widetilde T \f$ of \f$ T \f$ in the Poincaré disk \f$ \mathbb{D} \f$.
In \f$ \widetilde T \f$, let \f$ \widetilde e \f$ be a lift of \f$ e \f$. In \f$ \widetilde T \f$, let \f$ \widetilde e \f$ be a lift of \f$ e \f$.
Orient \f$ \widetilde e \f$ arbitrarily, and let \f$ z_0 \in \mathbb{D} \f$ and \f$ z_2 \in \mathbb{D} \f$ be respectively the first and second vertices of \f$ \widetilde e \f$. Orient \f$ \widetilde e \f$ arbitrarily, and let \f$ z_0 \in \mathbb{D} \f$ and \f$ z_2 \in \mathbb{D} \f$ be respectively the first and second vertices of \f$ \widetilde e \f$.
@ -78,6 +83,11 @@ In \f$ \widetilde T \f$, consider the triangle on the right of \f$ \widetilde e
Similarly, consider the triangle on the left of \f$ \widetilde e \f$, and let \f$ z_3 \in \mathbb{D} \f$ be the third vertex of this triangle. Similarly, consider the triangle on the left of \f$ \widetilde e \f$, and let \f$ z_3 \in \mathbb{D} \f$ be the third vertex of this triangle.
Then \f$ R_T(e) = (z_3-z_1)*(z_2-z_0) / ((z_3-z_0)*(z_2-z_1)) \f$. Then \f$ R_T(e) = (z_3-z_1)*(z_2-z_0) / ((z_3-z_0)*(z_2-z_1)) \f$.
This definition does not depend on the choice of the lift \f$ \widetilde e \f$, nor on the orientation of \f$ \widetilde e \f$. This definition does not depend on the choice of the lift \f$ \widetilde e \f$, nor on the orientation of \f$ \widetilde e \f$.
See \cgalCite{despre2022experimental} for details.
<center>
<img src="crossratio.svg" style="max-width:15%; width:15%;"/>
</center>
While the triangulation \f$ T \f$ is unambiguously determined by the combinatorial map and its cross ratios, the internal representation of \f$ T \f$ can contain some additional data: the anchor. While the triangulation \f$ T \f$ is unambiguously determined by the combinatorial map and its cross ratios, the internal representation of \f$ T \f$ can contain some additional data: the anchor.
The anchor is used when building a portion of the lift of \f$ T \f$ in the Poincaré disk \f$ \mathbb{D} \f$. The anchor is used when building a portion of the lift of \f$ T \f$ in the Poincaré disk \f$ \mathbb{D} \f$.
@ -86,11 +96,11 @@ It contains a lift \f$ t \f$ of a triangle of \f$ T \f$ in \f$ \mathbb{D} \f$: \
\subsection Subsection_Hyperbolic_Surface_Triangulations_Delaunay Delaunay flip algorithm \subsection Subsection_Hyperbolic_Surface_Triangulations_Delaunay Delaunay flip algorithm
Let \f$ T \f$ be a triangulation of a closed orientable hyperbolic surface. An edge \f$ e \f$ of \f$ T \f$ satisfies the <b>Delaunay criterion</b> if the imaginary part of its cross ratio \f$R_T(e)\f$ is non-positive. Let \f$ T \f$ be a triangulation of a hyperbolic surface. An edge \f$ e \f$ of \f$ T \f$ satisfies the <b>Delaunay criterion</b> if the imaginary part of its cross ratio \f$R_T(e)\f$ is non-positive.
(This definition has an equivalent "empty disk" formulation in the package \ref PkgHyperbolicTriangulation2). This definition is equivalent to the usual "empty disk" formulation.
Then \f$ T \f$ is a <b>Delaunay triangulation</b> if every edge of \f$ T \f$ satisfies the Delaunay criterion. Then \f$ T \f$ is a <b>Delaunay triangulation</b> if every edge of \f$ T \f$ satisfies the Delaunay criterion.
If an edge \f$e \f$ of \f$ T \f$ does not satisfy the Delaunay criterion, then the two triangles incident to \f$ e \f$ form a strictly convex quadrilateron, so \f$ e \f$ can be deleted from \f$ T \f$ and replaced by the other diagonal of the quadrilateron. If an edge \f$e \f$ of \f$ T \f$ does not satisfy the Delaunay criterion, then the two triangles incident to \f$ e \f$ form a strictly convex quadrilateron, so \f$ e \f$ can be deleted from \f$ T \f$ and replaced by the other diagonal of the quadrilateron.
This operation is called a <b>flip</b>. This operation is called a Delaunay <b>flip</b>.
When a flip occurs, the cross ratios of the edges involved are modified via simple formulas. When a flip occurs, the cross ratios of the edges involved are modified via simple formulas.
The <b>Delaunay flip algorithm</b> flips edges that do not satisfy the Delaunay criterion as long as possible, with no preference on the order of the flips. The <b>Delaunay flip algorithm</b> flips edges that do not satisfy the Delaunay criterion as long as possible, with no preference on the order of the flips.
This algorithm terminates, and outputs a Delaunay triangulation of \f$ S \f$ \cgalCite{despre2020flipping}. This algorithm terminates, and outputs a Delaunay triangulation of \f$ S \f$ \cgalCite{despre2020flipping}.
@ -99,17 +109,16 @@ This algorithm terminates, and outputs a Delaunay triangulation of \f$ S \f$ \cg
The package contains three main classes: The package contains three main classes:
- `CGAL::Hyperbolic_surface_triangulation_2` represents a triangulation of a closed orientable hyperbolic surface. Offers facilities such as the generation of the triangulation from a convex fundamental domain, the Delaunay flip algorithm, and the construction of a portion of the lift of the triangulation in the Poincaré disk. - `CGAL::Hyperbolic_surface_triangulation_2` represents a triangulation of a hyperbolic surface. It offers functionalities such as the generation of the triangulation from a convex fundamental domain, the Delaunay flip algorithm, and the construction of a portion of the lift of the triangulation in the Poincaré disk.
- `CGAL::Hyperbolic_fundamental_domain_2` represents a convex fundamental domain of a closed orientable hyperbolic surface. - `CGAL::Hyperbolic_fundamental_domain_2` represents a convex fundamental domain of a hyperbolic surface.
- `CGAL::Hyperbolic_fundamental_domain_factory_2` is a factory class, whose only purpose is to randomly generate some convex fundamental domains of surfaces of genus two.
- `CGAL::Hyperbolic_fundamental_domain_factory_2` is a factory class, whose purpose is to generate some convex fundamental domains of surfaces of genus two.
The package also contains the secondary class `CGAL::Hyperbolic_isometry_2` to deal with isometries in the Poincaré disk. The package also contains the secondary class `CGAL::Hyperbolic_isometry_2` to deal with isometries in the Poincaré disk.
The concept `HyperbolicSurfacesTraits_2` is a refinement of `HyperbolicDelaunayTriangulationTraits_2`. The concept `HyperbolicSurfacesTraits_2` is a refinement of `HyperbolicDelaunayTriangulationTraits_2`.
This concept describes the requirements for the template parameter of the classes of the package. It describes the template parameter of most classes of the package.
It is modeled by the class `CGAL::Hyperbolic_surfaces_traits_2`. It is modeled by the class `CGAL::Hyperbolic_surfaces_traits_2`.
The concept `ComplexWithoutSqrt` describes a complex number type that does not use square root. It is modeled by the class `CGAL::Complex_without_sqrt`. The concept `ComplexWithoutSqrt` describes a complex number type that does not use square root. It is modeled by the class `CGAL::Complex_without_sqrt`.
@ -120,16 +129,16 @@ The concept `ComplexWithoutSqrt` describes a complex number type that does not u
\section Section_Hyperbolic_Surface_Triangulations_Example Example \section Section_Hyperbolic_Surface_Triangulations_Example Example
The example below randomly generates a convex fundamental domain of a surface of genus two, triangulates the domain, applies the Delaunay flip algorithm to the resulting triangulation, and saves and prints the Delaunay triangulation. The example below generates a convex fundamental domain of a surface of genus two, triangulates the domain, applies the Delaunay flip algorithm to the resulting triangulation, and saves and prints the Delaunay triangulation.
\cgalExample{Hyperbolic_surface_triangulation_2_Example/example.cpp} \cgalExample{Hyperbolic_surface_triangulation_2_Example/example.cpp}
\section Section_Hyperbolic_Surface_Implementation_History Design and implementation history \section Section_Hyperbolic_Surface_Implementation_History Design and implementation history
This package implements the Delaunay flip algorithm described in the hyperbolic setting by Vincent Despré, Jean-Marc Schlenker, and Monique Teillaud in \cgalCite{despre2020flipping} (with a different data structure for representing triangulations). This package implements the Delaunay flip algorithm described in the hyperbolic setting by Vincent Despré, Jean-Marc Schlenker, and Monique Teillaud in \cgalCite{despre2020flipping} (with a different data structure for representing triangulations, see \cgalCite{despre2022experimental}).
It also implements the generation of domains described by Vincent Despré, Loïc Dubois, Benedikt Kolbe, and Monique Teillaud in \cgalCite{despre2022experimental}, based on results of Aline Aigon-Dupuy, Peter Buser, Michel Cibils, Alfred F Künzle, and Frank Steiner \cgalCite{aigon2005hyperbolic}. It also implements the generation of domains described by Vincent Despré, Loïc Dubois, Benedikt Kolbe, and Monique Teillaud in \cgalCite{despre2022experimental}, based on results of Aline Aigon-Dupuy, Peter Buser, Michel Cibils, Alfred F Künzle, and Frank Steiner \cgalCite{aigon2005hyperbolic}.
The code and the documentation of the package were entirely written by Loïc Dubois, under regular discussions with Vincent Despré and Monique Teillaud. The code and the documentation of the package were written by Loïc Dubois, under regular discussions with Vincent Despré and Monique Teillaud.
The authors aknowledge support from the ANR SoS. The authors aknowledge support from the grants <a href="https://sos.loria.fr/">SoS</a> and <a href="https://perso.math.u-pem.fr/sabourau.stephane/min-max/min-max.html">MIN-MAX</a> of the French National Research Agency ANR.
*/ */
} /* namespace CGAL */ } /* namespace CGAL */

View File

@ -19,7 +19,7 @@
\cgalPkgSummaryBegin \cgalPkgSummaryBegin
\cgalPkgAuthors{Vincent Despré, Loïc Dubois, and Monique Teillaud} \cgalPkgAuthors{Vincent Despré, Loïc Dubois, and Monique Teillaud}
\cgalPkgDesc{This package enables handling and building triangulations of closed orientable hyperbolic surfaces. Facilities are offered such as the Delaunay flip algorithm, and the construction of a portion of the lift of the triangulation in the Poincaré disk model of the hyperbolic plane. Triangulations can be generated by triangulating a convex fundamental domain in the Poincaré disk model. A method is offered that generates such domains in genus two.} \cgalPkgDesc{This package enables building and handling triangulations of closed orientable hyperbolic surfaces. Functionalities are offered such as the Delaunay flip algorithm, and the construction of a portion of the lift of the triangulation in the Poincaré disk model of the hyperbolic plane. Triangulations can be generated by triangulating a convex fundamental domain in the Poincaré disk model. A method is offered that generates such domains in genus two.}
\cgalPkgManuals{Chapter_Hyperbolic_Surface_Triangulations,PkgHyperbolicSurfaceTriangulation2Ref} \cgalPkgManuals{Chapter_Hyperbolic_Surface_Triangulations,PkgHyperbolicSurfaceTriangulation2Ref}
\cgalPkgSummaryEnd \cgalPkgSummaryEnd
@ -39,20 +39,18 @@
\cgalCRPSection{Concepts} \cgalCRPSection{Concepts}
- `HyperbolicSurfacesTraits_2` describes the set of requirements to be fulfilled by any class instantiating the template parameter of most classes of the package. - `HyperbolicSurfacesTraits_2` describes the set of requirements to be fulfilled by any class instantiating the template parameter of most classes of the package.
- `ComplexWithoutSqrt` describes a complex number type that does not use square root.
\cgalCRPSection{Classes} \cgalCRPSection{Classes}
- `CGAL::Hyperbolic_surface_triangulation_2` represents a triangulation of a closed orientable hyperbolic surface. Offers facilities such as the generation of the triangulation from a convex fundamental domain, the Delaunay flip algorithm, and the construction of a portion of the lift of the triangulation in the hyperbolic plane. - `CGAL::Hyperbolic_surface_triangulation_2` represents a triangulation of a closed orientable hyperbolic surface. It offers facilities such as the generation of the triangulation from a convex fundamental domain, the Delaunay flip algorithm, and the construction of a portion of the lift of the triangulation in the hyperbolic plane.
- `CGAL::Hyperbolic_fundamental_domain_2` represents a fundamental domain of a closed orientable hyperbolic surface. - `CGAL::Hyperbolic_fundamental_domain_2` represents a fundamental domain of a closed orientable hyperbolic surface.
- `CGAL::Hyperbolic_fundamental_domain_factory_2` is a factory class, whose only purpose is to randomly generate some convex domains of surfaces of genus two. - `CGAL::Hyperbolic_fundamental_domain_factory_2` is a factory class, whose only purpose is to generate some convex domains of surfaces of genus two.
- `CGAL::Hyperbolic_isometry_2` represents an isometry in the Poincaré disk model. Facilities are offered to compose isometries, and apply an isometry to a point. - `CGAL::Hyperbolic_isometry_2` represents an isometry in the Poincaré disk model. Facilities are offered to compose isometries, and apply an isometry to a point.
- `CGAL::Complex_without_sqrt` represents a complex number. Models for `HyperbolicSurfacesTraits_2` and `ComplexWithoutSqrt` are provided : `CGAL::Hyperbolic_surfaces_traits_2` and `CGAL::Complex_without_sqrt`.
A model for the concept `HyperbolicSurfacesTraits_2` is provided:
- `CGAL::Hyperbolic_surfaces_traits_2` inherits from its template parameter HyperbolicTraitsClass. HyperbolicTraitsClass must be a model of `CGAL::HyperbolicDelaunayTriangulationTraits_2`.
*/ */

View File

@ -151,7 +151,7 @@ typename Traits::FT Hyperbolic_fundamental_domain_factory_2<Traits>::exact_numbe
if (x< 0){ if (x< 0){
return _FT(0)-exact_number_from_float(-x); return _FT(0)-exact_number_from_float(-x);
} }
return _FT(int(x*_DENOMINATOR_FOR_GENERATION)%_DENOMINATOR_FOR_GENERATION, _DENOMINATOR_FOR_GENERATION); return _FT(int(x*_DENOMINATOR_FOR_GENERATION)%_DENOMINATOR_FOR_GENERATION)/_FT( _DENOMINATOR_FOR_GENERATION);
} }
template<class Traits> template<class Traits>