Streaming Computation of Delaunay Triangulations Martin Isenburg Jonathan
Streaming Computation of Delaunay Triangulations Martin Isenburg Jonathan Shewchuk UC Berkeley Yuanxin Liu Jack Snoeyink UNC Chapel Hill
The 2 D Delaunay Triangulation • important tool for interpolating points – graphics, GIS, finite elements, … • a triangulation in which every triangle has an empty circumscribing circle
Billions of Points courtesy of www. ncfloodmaps. com Neuse-River Basin Elevation map 0. 5 billion points 11 GB Contour map
Streaming Computation input from disk output to disk another small buffer in main memory finalization tags external 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
Spatial Finalization • inject tags into the point stream that inform when grid cells are free of future points • use tags to certify triangles as being part of the final triangulation and output them finalized region future points only arrive in these cells
Streaming Delaunay Spatial Finalization 0. 5 Billion Points 11 GB finalization tags Incremental Triangulation 1. 0 Billion Triangles 17 GB on a laptop in 48 minutes using 60 + 10 MB
Immediate Processing of Output pipe mesh only store isolines extract isolines and discard mesh
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 3 D points – but not when point are along a surface
Related Work
Streaming Geometry Processing • Streaming Meshes [Isenburg & Lindstrom ‘ 05] – topological finalization of vertices Streaming Compression Streaming Simplification • Stream-Processing Points [Pajarola ‘ 05] – globally sort points along a sweep line – derive neighbors for smoothing, normals. . .
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
Incremental Point Insertion [Lawson ’ 77] [Bowyer ’ 81] [Watson ’ 81] • locate triangle enclosing the point • find and remove all triangles with nonempty circumcircles • triangulate by connecting new point
Triangulating Lots of Points • buy more main memory – need 36 GB for 0. 5 billion points • use less memory [Blandford et al. ‘ 05] – compress the data structures (ratio 1: 3) • store data to external memory – Incremental Point Insertion [Amenta et al. ‘ 03] • BRIO order, virtual memory paging of OS – Divide and Conquer [Arge et al. ‘ 05] • 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 1 7 4 2 4 5 3 6 7 1 7 8 1 7 7 2 4 5 8 6 1 7 2 9 7 9 1 6 9 6 compute 4 9 5 6 7 5 7 8 8 6 1 8 8 7 8 9 3 7 7 7 9 8 7 7 8 7 5 bounding box create finalization grid – count number of points per cell 2 4 8 2
Spatial Finalization of Points 1 7 4 5 3 6 7 8 7 7 2 5 8 7 9 9 6 compute 4 9 6 7 7 8 8 6 8 8 7 8 9 3 7 7 7 9 8 7 7 8 7 5 bounding box create finalization grid – count number of points per cell 2 4 8 2 output finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Finalization of Points 0 5 4 5 3 3 7 8 7 7 2 1 7 7 9 9 6 compute 4 9 6 7 7 8 8 6 8 8 7 8 9 3 7 7 7 9 8 7 7 8 7 5 bounding box create finalization grid – count number of points per cell 2 4 8 2 output finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Finalization of Points 1 5 4 5 3 0 6 8 7 7 2 0 2 5 9 9 6 compute 4 9 6 7 7 8 8 6 8 8 7 8 9 3 7 7 7 9 8 7 7 8 7 5 bounding box create finalization grid – count number of points per cell 2 4 8 2 output finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Finalization of Points 1 0 4 5 3 0 3 8 7 7 2 0 0 3 9 9 6 compute 3 9 4 7 7 8 8 6 8 8 7 8 9 3 7 7 7 9 8 7 7 8 7 5 bounding box create finalization grid – count number of points per cell 2 4 8 2 output finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Finalization of Points 0 1 0 4 1 1 1 2 3 7 9 7 7 6 8 9 8 2 6 6 compute 7 7 8 9 3 7 7 7 9 8 7 7 8 7 5 bounding box create finalization grid – count number of points per cell 2 4 8 2 output finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Finalization of Points 0 compute 2 1 0 4 1 6 5 6 4 8 8 8 2 6 6 9 1 3 5 7 9 8 6 7 8 7 5 bounding box create finalization grid – count number of points per cell 2 4 8 2 output finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Finalization of Points 0 2 1 0 4 compute bounding box create finalization grid – count number of points per cell output 1 1 3 3 2 7 2 5 5 9 7 4 2 finalized points – buffer per grid cell – if full, output points in one randomized chunk followed by finalization tag
Spatial Finalization of Points 0 1 0 4 2 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
Spatial Coherence
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
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
Finding Certified Triangles • do circumcircles lie completely in finalized region? overlap test • efficient testing – avoid tests – try cheaper test • link overlapping circles to cells
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 8 MB 512 x 512 grid 36 min 52 MB 2, 249, 268 points 0. 5 Billion Points 11 GB 10 MB 60, 388 triangles 1. 0 Billion Triangles 17 GB on a laptop in 48 minutes using 60 + 10 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 152 + 11 MB
Comparisons • to best out-of-core method [Arge et al. ‘ 05] – over 10 times faster on 0. 5 billion points – laptop + 2 disks desktop & 4 disks – 0 scratch space 50 GB scratch space • to best in-core method [Shewchuk ‘ 96] – 30 - 60 % faster on 6 - 13 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
Spatial Finalization Tags • order of magnitude faster than methods that use external memory • no temporary storage to disk – output results early & reuse memory • interleave input & computation & output – 100% CPU usage while triangulating • no global sort – don’t fight the data, use existing coherence
Streaming Delaunay in 3 D
Streaming Delaunay in 3 D • 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 0429901 + 0430065 "Collaborative Research: Fundamentals and Algorithms for Streaming Meshes. " – NGA award HM 1582 -05 -2 -0003 – Alfred P. Sloan Research Fellowship
Thank You executables, video, slides, paper, and soon also source code: http: //www. cs. unc. edu/~isenburg/sd/
Thank You executables, video, slides, paper, and soon also source code: http: //www. cs. unc. edu/~isenburg/sd/
Future / Current Work • Finalize without Bounding Box – eliminate 1 st pass of finalizer • Streaming Constrained Delaunay – crucial in GIS applications • Triangulate 3 D surface points – data-dependent spatial finalization • Spatial Finalization for other algorithm – surface reconstruction, …
Sprinkle Points • add global randomness to the point insertion order without sprinkle points with sprinkle points
- Slides: 52