57 cout <<
"[Aleph Geometry Example] " << title <<
"\n";
58 cout <<
"============================================================\n";
80 cout << fixed << setprecision(3);
95 cout <<
"\nUnique sites: " << dt.
sites.size() <<
endl;
96 cout <<
"Delaunay triangles: " << dt.
triangles.size() <<
endl;
100 for (
size_t i = 0; i < dt.
triangles.size(); ++i)
103 cout <<
" T" << i <<
": [" <<
tr.i <<
", " <<
tr.j <<
", " <<
tr.k <<
"] ";
114 cout <<
"\nVoronoi vertices: " <<
vor.vertices.size() <<
endl;
115 cout <<
"Voronoi edges: " <<
vor.edges.size() <<
endl;
116 cout <<
"Voronoi cells (raw): " <<
vor.cells.size() <<
endl;
123 cout <<
"Voronoi cells (clipped): " <<
clipped.size() <<
endl;
127 for (
size_t i = 0; i <
clipped.size(); ++i)
130 assert(c.site_index == i);
131 assert(c.polygon.is_closed());
132 assert(c.polygon.size() >= 3);
136 cout <<
"\nFirst 3 clipped cells:" <<
endl;
137 for (
size_t i = 0; i <
clipped.size()
and i < 3; ++i)
140 cout <<
" cell[" << c.site_index <<
"] site=";
142 cout <<
" vertices=" << c.polygon.size() <<
endl;
145 cout <<
"\nValidation OK: clipped cells are indexed and contain their site." <<
endl;
146 cout <<
"STATUS: OK" <<
endl;
Simple dynamic array with automatic resizing and functional operations.
Exact Delaunay triangulation using the Bowyer-Watson incremental algorithm.
Doubly-linked list (defined in tpl_dynList.H).
T & append(const T &item)
Exact point-in-polygon classification via winding number.
Represents a point with rectangular coordinates in a 2D plane.
const Geom_Number & get_x() const noexcept
Gets the x-coordinate value.
const Geom_Number & get_y() const noexcept
Gets the y-coordinate value.
A general (irregular) 2D polygon defined by a sequence of vertices.
void add_vertex(const Point &point)
Add a vertex to the polygon.
Voronoi diagram derived as the dual of a Delaunay triangulation.
static Array< ClippedCell > clipped_cells_indexed(const Array< Point > &sites, const Polygon &clip)
Clip Voronoi cells and return explicit site-indexed records.
static Polygon make_clip_window()
static void print_point(const Point &p)
static void print_banner(const char *title)
Computational geometry algorithms.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Main namespace for Aleph-w library functions.
and
Check uniqueness with explicit hash + equality functors.
double geom_number_to_double(const Geom_Number &n)
Converts a Geom_Number to its double precision representation.
The result of a Delaunay triangulation.
Array< IndexedTriangle > triangles
Triangles forming the Delaunay triangulation.
Array< Point > sites
Unique, sorted input points used for triangulation.
The complete result of a Voronoi diagram computation.