CGAL 6.1 - 2D Triangulations on Hyperbolic Surfaces
Loading...
Searching...
No Matches
CGAL::Triangulation_on_hyperbolic_surface_2< Traits, Attributes > Class Template Reference

#include <CGAL/Triangulation_on_hyperbolic_surface_2.h>

Definition

template<class Traits, class Attributes = Combinatorial_map_with_cross_ratios_item<Traits>>
class CGAL::Triangulation_on_hyperbolic_surface_2< Traits, Attributes >

represents a triangulation of a closed orientable hyperbolic surface.

The class provides functions 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.

Template Parameters
Traitsmust be a model of HyperbolicSurfaceTraits_2.
Attributesmust be a model of GenericMapItems whose edges are decorated with complex numbers to represent cross ratios.
Examples
Triangulation_on_hyperbolic_surface_2/Triangulation_on_hyperbolic_surface_2.cpp.

Classes

struct  Anchor
 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. More...
 

Types

typedef Combinatorial_map< 2, Attributes > Combinatorial_map_with_cross_ratios
 Type of combinatorial map whose edges are decorated with complex numbers.
 
typedef Combinatorial_map_with_cross_ratios::Dart_descriptor Dart_descriptor
 Combinatorial map dart descriptor type.
 
typedef Combinatorial_map_with_cross_ratios::Dart_const_descriptor Dart_const_descriptor
 Combinatorial map dart const descriptor type.
 
typedef Combinatorial_map_with_cross_ratios::template One_dart_per_cell_range< 0 > Vertex_range
 Range of one dart for each vertex (that is 0-cell) of the combinatorial map.
 
typedef Combinatorial_map_with_cross_ratios::template One_dart_per_cell_range< 1 > Edge_range
 Range of one dart for each edge (that is 1-cell) of the combinatorial map.
 
typedef Combinatorial_map_with_cross_ratios::template One_dart_per_cell_range< 2 > Face_range
 Range of one dart for each face (that is 2-cell) of the combinatorial map.
 
typedef Combinatorial_map_with_cross_ratios::template One_dart_per_cell_const_range< 0 > Vertex_const_range
 Range of one dart for each vertex (that is 0-cell) of the combinatorial map.
 
typedef Combinatorial_map_with_cross_ratios::template One_dart_per_cell_const_range< 1 > Edge_const_range
 Range of one dart for each edge (that is 1-cell) of the combinatorial map.
 
typedef Combinatorial_map_with_cross_ratios::template One_dart_per_cell_const_range< 2 > Face_const_range
 Range of one dart for each face (that is 2-cell) of the combinatorial map.
 
typedef Traits::Hyperbolic_point_2 Point
 Point type.
 

Creation

 Triangulation_on_hyperbolic_surface_2 ()
 Default constructor.
 
 Triangulation_on_hyperbolic_surface_2 (const Hyperbolic_fundamental_domain_2< Traits > &domain)
 Constructor from a convex fundamental domain: triangulates the polygon of the domain.
 
 Triangulation_on_hyperbolic_surface_2 (Combinatorial_map_with_cross_ratios &cmap, Anchor &an_anchor)
 Constructor from a decorated combinatorial map and an anchor.
 

Assignment

Triangulation_on_hyperbolic_surface_2operator= (Triangulation_on_hyperbolic_surface_2 other)
 

Access Functions

Combinatorial_map_with_cross_ratioscombinatorial_map ()
 returns the decorated combinatorial map.
 
bool has_anchor () const
 returns whether the triangulation has an anchor or not.
 
Anchoranchor ()
 returns the anchor.
 
const Anchoranchor () const
 returns the anchor.
 
Vertex_range vertices_range ()
 returns the range of vertices.
 
Edge_range edges_range ()
 returns the range of edges.
 
Face_range faces_range ()
 returns the range of faces.
 
Vertex_const_range vertices_const_range () const
 returns the range of vertices.
 
Edge_const_range edges_const_range () const
 returns the range of edges.
 
Face_const_range faces_const_range () const
 returns the range of faces.
 

Delaunay Flip Algorithm

bool is_Delaunay_flippable (Dart_descriptor dart) const
 returns whether the edge supported by the dart is Delaunay flippable or not.
 
void flip (Dart_descriptor dart)
 flips the edge supported by the dart.
 
bool is_Delaunay () const
 determines if the triangulation is a valid Delaunay triangulation.
 
int make_Delaunay ()
 applies the Delaunay flip algorithm: flips Delaunay-flippable edges until there is no such edge anymore.
 

Lifting

std::vector< std::tuple< Dart_const_descriptor, Point, Point, Point > > lift (bool center=true) const
 lifts the triangulation in the hyperbolic plane.
 

Validity

bool is_valid () const
 checks that the underlying combinatorial map \( M \) has no boundary and calls the is_valid method of \( M \).
 

Constructor & Destructor Documentation

◆ Triangulation_on_hyperbolic_surface_2()

template<class Traits , class Attributes = Combinatorial_map_with_cross_ratios_item<Traits>>
CGAL::Triangulation_on_hyperbolic_surface_2< Traits, Attributes >::Triangulation_on_hyperbolic_surface_2 ( const Hyperbolic_fundamental_domain_2< Traits > &  domain)

Constructor from a convex fundamental domain: triangulates the polygon of the domain.

(The triangulation is defined by adding an internal edge between domain.vertex(size-1) and the other vertices. The anchor has the three vertices of indices size-1, 0 and 1 and the dart is the one between the vertices of indices size-1 and 0.)

Member Function Documentation

◆ anchor() [1/2]

template<class Traits , class Attributes = Combinatorial_map_with_cross_ratios_item<Traits>>
Anchor & CGAL::Triangulation_on_hyperbolic_surface_2< Traits, Attributes >::anchor ( )

returns the anchor.

Precondition
is_valid() && has_anchor()

◆ anchor() [2/2]

template<class Traits , class Attributes = Combinatorial_map_with_cross_ratios_item<Traits>>
const Anchor & CGAL::Triangulation_on_hyperbolic_surface_2< Traits, Attributes >::anchor ( ) const

returns the anchor.

Precondition
is_valid() && has_anchor()

◆ flip()

template<class Traits , class Attributes = Combinatorial_map_with_cross_ratios_item<Traits>>
void CGAL::Triangulation_on_hyperbolic_surface_2< Traits, Attributes >::flip ( Dart_descriptor  dart)

flips the edge supported by the dart.

Precondition
is_valid()

◆ has_anchor()

template<class Traits , class Attributes = Combinatorial_map_with_cross_ratios_item<Traits>>
bool CGAL::Triangulation_on_hyperbolic_surface_2< Traits, Attributes >::has_anchor ( ) const

returns whether the triangulation has an anchor or not.

Precondition
is_valid()

◆ is_Delaunay_flippable()

template<class Traits , class Attributes = Combinatorial_map_with_cross_ratios_item<Traits>>
bool CGAL::Triangulation_on_hyperbolic_surface_2< Traits, Attributes >::is_Delaunay_flippable ( Dart_descriptor  dart) const

returns whether the edge supported by the dart is Delaunay flippable or not.

An edge \( e \) is Delaunay flippable if the imaginary part of its cross ratio is positive.

Precondition
is_valid()

◆ is_valid()

template<class Traits , class Attributes = Combinatorial_map_with_cross_ratios_item<Traits>>
bool CGAL::Triangulation_on_hyperbolic_surface_2< Traits, Attributes >::is_valid ( ) const

checks that the underlying combinatorial map \( M \) has no boundary and calls the is_valid method of \( M \).

If there is an anchor, then checks that the dart descriptor of the anchor does indeed point to a dart of \( M \), and checks that the three vertices of the anchor lie within the open unit disk.

◆ lift()

template<class Traits , class Attributes = Combinatorial_map_with_cross_ratios_item<Traits>>
std::vector< std::tuple< Dart_const_descriptor, Point, Point, Point > > CGAL::Triangulation_on_hyperbolic_surface_2< Traits, Attributes >::lift ( bool  center = true) const

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 \( p,q,r \) of points in the hyperbolic plane. The points \( p,q,r \) are the vertices of a lift of \( t \) in the hyperbolic plane. If the center parameter is set to true, then one of the vertices of the anchor is translated to the origin \( 0 \).

Precondition
is_valid() && has_anchor()

◆ make_Delaunay()

template<class Traits , class Attributes = Combinatorial_map_with_cross_ratios_item<Traits>>
int CGAL::Triangulation_on_hyperbolic_surface_2< Traits, Attributes >::make_Delaunay ( )

applies the Delaunay flip algorithm: flips Delaunay-flippable edges until there is no such edge anymore.

Precondition
is_valid()

◆ operator=()

template<class Traits , class Attributes = Combinatorial_map_with_cross_ratios_item<Traits>>
Triangulation_on_hyperbolic_surface_2 & CGAL::Triangulation_on_hyperbolic_surface_2< Traits, Attributes >::operator= ( Triangulation_on_hyperbolic_surface_2< Traits, Attributes >  other)
Precondition
other.is_valid()