I/O-Efficient Construction of Constrained Delaunay Triangulations Pankaj K. Agarwal, Lars Arge, and Ke Yi Duke University
DT vs. Constrained DT Delaunay TriangulationConstrained Delaunay Triangulation As much “Delaunay” as possible while keeping the constrained edges
Constrained DT: Definition A valid edge in DT A valid edge in CDT A set of points: P A set of non-intersecting obstacle segments S with endpoints in P CDT(P,S) consists of all segments in S and all edges connecting pairs of points p,q of P such that (1) p and q can see each other, and (2) there exists a circle passing through p and q, that contains only points of P that cannot see both p and q pq pq
Constrained DT: Definition (2) A valid triangle in DT A valid triangle in CDT A set of points: P A set of non-intersecting obstacle segments S with endpoints in P Or equivalently, CDT(P,S) consists of all triangles pqr such that (1) any two of p, q, and r can see each other or are connected by a segment of S; (2) their circumcircle contains only points that cannot see the interior of pqr. pq pq r r
I/O Model Main memory: M CPU Disk Disk size = B N elements Scan: O(N/B) I/Os (linear) Sort: O(N/B log M N) I/Os
Previous Results Internal memory algorithms DT: many algorithms [Aurenhammer and Klein], practical CDT: [Chew 1987], [Wang and Schubert 1987], runs in O(N log N) time but impractical; Use incremental construction in practice External memory algorithms DT: [Crauser et al. 2001] runs in expected O(N/B log M N) I/Os CDT: not known
Our Results The first external memory algorithm for building the constrained Delaunay triangulation Runs in expected O(N/B log M N) I/Os when #segments < M Implementation
Algorithm ① Take a sample R of size M including all segment endpoints ② Build CDT(R,S) ③ Construct the conflict list of each edge of CDT(R,S) The conflict list of an edge e consists of all points in two adjacent circumcircles and visible from e
Algorithm ④ Build CDT of each conflict list (recurse if still too large to fit in memory) Assemble results together (discussed later) Linear I/Os (in the total size of conflict lists) if ignore recursion
Analysis Lemma: Expected size of each conflict list = O(N/M) Following Clarkson and Shor framework Difference: Only a constant fraction of the samples are random O(log M N) levels of recursion Total: O(N/B log M N)
Kernels Kernel
Assemble Results Together Lemma 1: A triangle is a valid triangle of CDT(P,S) iff its circumcenter lies inside the kernel Kernel
Assemble Results Together Lemma 2: The circumcenter of each triangle of CDT(P,S) lies inside exactly one kernel Kernel
Implementation & Experiments Using TPIE Compared with Shewchuk’s Triangle program Incremental construction Delete all edges intersected by s Retriangulate two polygons on both sides of s Pre-sort points and segments along some space filling curve (Hilbert curve)
Experiment: Uniform Data 10 million points Varying #segments Ave segment length = Memory: 128M
Experiment: Segment Length 10 million points 10,000 segments Varying segment length Memory: 128M
Experiments: Real World Data Segments: TIGER road data Largest dataset: 0.5 billion points, 1 million segment (input file: 80GB) points: LIDAR points from the Neuse River Basin
Experiments: Real World Data 16M 28M 44M 59M 91M 116M 163M 257M 503M Couldn’t run internal algorithm 7.5 hours
Open Questions External memory algorithms for arbitrary #segments Analysis of the (internal memory) randomized incremental algorithm O(n log 2 n) Ω (n log n)
Thank you!
Extending the Plane [Seidel, 1989] Primary sheet Secondary sheet
Extending the Plane [Seidel, 1989] Primary sheet Secondary sheets
Traveling Rule [Seidel, 1989] Primary sheet Secondary sheets x y z
Extended Voronoi Diagram [Seidel, 1989] Primary sheet Secondary sheets p
Extended Voronoi Diagram CDT(P,S) is dual to EVD(P,S) [Seidel, 1989] Primary sheet Secondary sheets
Kernels Primary sheet Secondary sheets