Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
voronoi_clipped_cells_example.cc File Reference

Demonstrates clipped, site-indexed Voronoi cells. More...

#include <geom_algorithms.H>
#include <cassert>
#include <fstream>
#include <iomanip>
#include <iostream>
Include dependency graph for voronoi_clipped_cells_example.cc:

Go to the source code of this file.

Functions

static void write_polygon_wkt (ostream &out, const Polygon &poly)
 
static void export_cells_csv (ostream &out, const Array< VoronoiDiagramFromDelaunay::ClippedCell > &cells)
 
int main (int argc, char **argv)
 

Detailed Description

Demonstrates clipped, site-indexed Voronoi cells.

This example builds Voronoi cells from a point set, clips every cell against a convex bounding polygon, and exports the result as tabular CSV with WKT.

Usage: ./voronoi_clipped_cells_example [output.csv]

If output.csv is omitted, a default file voronoi_clipped_cells_output.csv is generated in the current directory.

Definition in file voronoi_clipped_cells_example.cc.

Function Documentation

◆ export_cells_csv()

static void export_cells_csv ( ostream &  out,
const Array< VoronoiDiagramFromDelaunay::ClippedCell > &  cells 
)
static

◆ main()

◆ write_polygon_wkt()

static void write_polygon_wkt ( ostream &  out,
const Polygon poly 
)
static