trianglewins / benchmark

trianglewins: triangulation at scale

Four constrained Delaunay backends for R on country boundaries from geoBoundaries (sds::CGAZ()), from Kosovo (23 thousand vertices) to the whole world (6.8 million). Times are medians of repeated runs, each job in its own R process.

Findings

Time against input size

Seconds (log scale) against input vertices (log scale), polygon datasets only. Constrained: the triangulation of the vertices and segments, outside removed. Area: refined until no triangle exceeds bounding box area / 100000. Quality: the same area bound plus a 20 degree minimum angle. A run that timed out or ran out of memory has no point.

Delaunay of points

Points sampled from the world's boundary vertices, no segments, meshed over their convex hull.

Editing a mesh: 1000 new points

laridae and trowel add 1000 points to a live constrained mesh (only the insert is timed). cdtr and RTriangle have no handle, so the time is a rebuild with the points included.

Peak memory

Peak resident memory of the job's R process (MB, log scale), including the input tables.

All runs

Datasets

Method

Inputs come from sds::CGAZ(), the geoBoundaries CGAZ ADM0 GeoParquet (CC BY 4.0). Rings are converted by bench/cgaz_pslg.py into a vertex table and a segment table: exactly repeated vertices are merged and repeated segments dropped, so shared borders appear once (except southern_africa_rings, which keeps every ring in full). Coordinates are longitude and latitude, triangulated as planar xy (coordinate dimension 2; the output is triangles, topological dimension 2). Each backend is called through the same adapter as the rest of trianglewins, so times include reading the result tables back into R. Every refinement has a Steiner budget of 100000 vertices. The area and angle columns are computed from the output; segment preservation and the empty-circle test run on inputs up to 50000 vertices. Code: bench/ in mdsumner/trianglewins.