CGAL 6.1 - 2D Triangulations on Hyperbolic Surfaces
Loading...
Searching...
No Matches
Triangulation_on_hyperbolic_surface_2/Triangulation_on_hyperbolic_surface_2.cpp
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Hyperbolic_Delaunay_triangulation_traits_2.h>
#include <CGAL/Hyperbolic_surface_traits_2.h>
#include <CGAL/Hyperbolic_fundamental_domain_factory_2.h>
#include <CGAL/Triangulation_on_hyperbolic_surface_2.h>
#include <CGAL/Triangulation_on_hyperbolic_surface_2_IO.h>
#include <time.h>
typedef CGAL::Exact_rational Rational;
typedef CGAL::Simple_cartesian<Rational> Kernel;
int main() {
// Generates the domain:
Factory factory = Factory();
Domain domain = factory.make_hyperbolic_fundamental_domain_g2(time(NULL)); // get a random seed with time(NULL)
// Triangulates the domain:
Triangulation triangulation = Triangulation(domain);
// Applies the Delaunay flip algorithm to the triangulation:
triangulation.make_Delaunay();
// Saves the triangulation:
std::ofstream output_file = std::ofstream ("OutputTriangulation.txt");
output_file << triangulation;
output_file.close();
// Prints the triangulation:
std::cout << triangulation << std::endl;
return 0;
}
represents a fundamental domain of a closed orientable hyperbolic surface.
Definition: Hyperbolic_fundamental_domain_2.h:18
Factory class, whose only purpose is to construct random fundamental domains of closed orientable hyp...
Definition: Hyperbolic_fundamental_domain_factory_2.h:16
Definition: Hyperbolic_surface_traits_2.h:11
represents a triangulation of a closed orientable hyperbolic surface.
Definition: Triangulation_on_hyperbolic_surface_2.h:37