11#ifndef INCLUDE_PERIODIC_3_COMPLEX_HPP_
12#define INCLUDE_PERIODIC_3_COMPLEX_HPP_
14#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
15#include <CGAL/Periodic_3_Delaunay_triangulation_3.h>
16#include <CGAL/Periodic_3_triangulation_traits_3.h>
17#include <CGAL/point_generators_3.h>
18#include <CGAL/Random.h>
19#include <CGAL/Timer.h>
24namespace cdt::experimental::periodic_complex
26 using K = CGAL::Exact_predicates_inexact_constructions_kernel;
27 using GT = CGAL::Periodic_3_triangulation_traits_3<K>;
28 using PDT = CGAL::Periodic_3_Delaunay_triangulation_3<GT>;
31 inline void make_random_T3_simplicial_complex(PDT* T3,
32 int number_of_simplices)
34 typedef CGAL::Creator_uniform_3<double, PDT::Point> Creator;
35 CGAL::Random random(7);
36 CGAL::Random_points_in_cube_3<PDT::Point, Creator> in_cube(.5, random);
40 int n = number_of_simplices / 6;
41 std::vector<PDT::Point> pts;
44 for (
int i = 0; i < n; i++)
46 PDT::Point p = *in_cube;
48 pts.emplace_back(PDT::Point(p.x() + .5, p.y() + .5, p.z() + .5));
52 T3->insert(pts.begin(), pts.end(),
true);
54 assert(T3->dimension() == 3);
55 assert(T3->is_valid());