Streaming Computation of Delaunay Triangulations Jack Snoeyink UNC Chapel Hill Jonathan Shewchuk UC Berkeley Yuanxin Liu UNC Chapel Hill Martin Isenburg UC Berkeley
The 2D Delaunay Triangulation a triangulation in which every triangle has an empty circumscribing circle important tool for interpolating points – graphics, GIS, finite elements, …
Billions of Points courtesy of billion points 11 GB Neuse-River Basin Elevation map Contour map
Streaming Computation output to diskinput from disk small buffer in main memory restrict computations to data in buffer – process data in the order it arrives – output results early and reuse the memory – do not use external memory finalization tags external memory small buffer in main memory another small buffer finalization tags
Spatial Finalization inject tags into the point stream that inform when grid cells are free of future points finalized region future points only arrive in these cells use tags to certify triangles as being part of the final triangulation and output them
Streaming Delaunay Spatial FinalizationIncremental Triangulation finalization tags 0.5 Billion Points 11 GB 1.0 Billion Triangles 17 GB on a laptop in 48 minutes using MB
pipe mesh only store isolines extract isolines and discard mesh Immediate Processing of Output
Features of Streaming Delaunay efficient – 10 × faster than previous method extremely scalable – billions of terrain points on a laptop streaming output – process triangulation without storing it only uniform points distributions – can tetrahedralize 3D points – but not when point are along a surface
Related Work
Streaming Geometry Processing Streaming Meshes – topological finalization of vertices [ Isenburg & Lindstrom ‘05 ] Stream-Processing Points – globally sort points along a sweep line – derive neighbors for smoothing, normals... [ Pajarola ‘05 ] Streaming Simplification Streaming Compression
Delaunay Triangulators Sweep line – pretty complex implementation – points along sweep line global sort Divide and Conquer – fastest in practice (in main memory) – partition points recursively global sort Incremental Point Insertion – usually fast (except for “bad” orders) – can process points in any order
locate triangle enclosing the point Incremental Point Insertion find and remove all triangles with non- empty circumcircles triangulate by connecting new point [ Lawson ’77 ] [ Bowyer ’81 ] [ Watson ’81 ]
Triangulating Lots of Points buy more main memory – need 36 GB for 0.5 billion points use less memory – compress the data structures ( ratio 1:3 ) [ Blandford et al. ‘05 ] store data to external memory – Incremental Point Insertion BRIO order, virtual memory paging of OS [ Amenta et al. ‘03 ] [ Arge et al. ‘05 ] – Divide and Conquer algorithm controls temporary storage to disk
External Memory Methods sorted points output mesh triangulation data structure in external memory
Our Streaming Approach finalized points output mesh output isolines extract
Streaming Delaunay Pipeline spfinalize -i points.raw -ospb | spdelaunay –ispb –o tin.smb enhances points with spatial finalization uses spatial finalization to certify triangles as final
The Finalizer
Spatial Finalization of Points compute bounding box
Spatial Finalization of Points compute bounding box create finalization grid – count number of points per cell
Spatial Finalization of Points compute bounding box create finalization grid – count number of points per cell output finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Finalization of Points compute bounding box create finalization grid – count number of points per cell output finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Finalization of Points compute bounding box create finalization grid – count number of points per cell output finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Finalization of Points compute bounding box create finalization grid – count number of points per cell output finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Finalization of Points compute bounding box create finalization grid – count number of points per cell output finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Finalization of Points compute bounding box create finalization grid – count number of points per cell output finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Finalization of Points compute bounding box create finalization grid – count number of points per cell output finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Finalization of Points compute bounding box create finalization grid – count number of points per cell output finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Coherence
Exploit the Existing Coherence raw point stream finalized point stream document with finalization tags enhance by releasing chunks of points benefits of global sort, but cheaper
Exploit the Existing Coherence document with finalization tags enhance by releasing chunks of points benefits of global sort, but cheaper raw point stream finalized point stream
Unfinalized Region as Quadtree as tags finalize cell after cell, maintain remaining cells in adaptive quadtree used for efficient overlap tests by the triangulator finalization tags
The Triangulator
Modified Incremental Delaunay insert points when reading a finalization tag – find certified triangles – output them to disk or pipe – deallocate data structure
Modified Incremental Delaunay insert points when reading a finalization tag – find certified triangles – output them to disk or pipe – deallocate data structure
do circumcircles lie completely in finalized region? Finding Certified Triangles efficient testing – avoid tests – try cheaper test link overlapping circles to cells overlap test
Modified Point Location usual strategy – walk current triangulation starting at the newest triangle if we fail – restart from a triangle linked with the cell – brute force
Results
The Neuse-River Basin 6 min 36 min 52 MB 2,249,268 points 8 MB 512 x 512 grid 10 MB 60,388 triangles 0.5 Billion Points 11 GB 1.0 Billion Triangles 17 GB on a laptop in 48 minutes using MB
Scalability: 3 x 3 Tiling of Neuse 4.5 Billion Points 101 GB 9.0 Billion Triangles 151 GB on a laptop under 7 hours using MB
Comparisons to best out-of-core method – over 10 times faster on 0.5 billion points – laptop + 2 disks desktop & 4 disks – 0 scratch space50 GB scratch space [ Arge et al. ‘05 ] [ Shewchuk ‘96 ] to best in-core method – % faster on million points – despite all our extra overlap test? why? interleaving of computations and I/O better cache use due to smaller footprint
Discussion
Streaming Delaunay spfinalize -i points.raw -ospb | spdelaunay –ispb –o tin.smb enhances points with spatial finalization uses spatial finalization to certify triangles as final
Geometry Processing Pipelines isoline extraction raster DEM generation
no temporary storage to disk – output results early & reuse memory Spatial Finalization Tags order of magnitude faster than methods that use external memory no global sort – don’t fight the data, use existing coherence interleave input & computation & output – 100% CPU usage while triangulating
Streaming Delaunay in 3D
uniform distributed points – works, but bigger footprint – example result: 14 GB mesh, 2:40 hrs, 795 MB surface scans – does not work – big circumspheres intersect many cells – most tetrahedra cannot be certified early
Acknowledgements data – Kevin Yi, Duke support – NSF grants "Collaborative Research: Fundamentals and Algorithms for Streaming Meshes." – NGA award HM – Alfred P. Sloan Research Fellowship
Thank You executables, video, slides, paper, and soon also source code:
Thank You executables, video, slides, paper, and soon also source code:
Future / Current Work Finalize without Bounding Box – eliminate 1 st pass of finalizer Streaming Constrained Delaunay – crucial in GIS applications Triangulate 3D surface points – data-dependent spatial finalization Spatial Finalization for other algorithm – surface reconstruction, …
Sprinkle Points without sprinkle points with sprinkle points add global randomness to the point insertion order