520 likes | 532 Views
Streaming Computation of Delaunay Triangulations. Martin Isenburg UC Berkeley. Jonathan Shewchuk UC Berkeley. Jack Snoeyink UNC Chapel Hill. Yuanxin Liu UNC Chapel Hill. The 2D Delaunay Triangulation. a triangulation in which every triangle has an empty circumscribing circle.
E N D
Streaming Computation of Delaunay Triangulations Martin IsenburgUC Berkeley Jonathan ShewchukUC Berkeley Jack SnoeyinkUNC Chapel Hill Yuanxin LiuUNC Chapel Hill
The 2D Delaunay Triangulation • a triangulation in which every triangle has an empty circumscribing circle • important tool for interpolating points • graphics, GIS, finite elements, …
Neuse-River Basin Elevation map 0.5 billion points 11 GB Contour map Billions of Points courtesy of www.ncfloodmaps.com
anothersmall buffer small bufferin main memory finalization tags finalization tags external memory Streaming Computation input from disk output to disk small bufferin 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
Spatial Finalization • inject tags intothe point streamthat inform whengrid cells are freeof future points finalized region future pointsonly arrive inthese cells • use tags to certify triangles as beingpart of the finaltriangulation andoutput them
finalization tags Streaming Delaunay Spatial Finalization Incremental Triangulation 1.0 Billion Triangles 17 GB 0.5 Billion Points 11 GB on a laptop in 48 minutes using 60 + 10 MB
pipemesh only store isolines extract isolinesanddiscard 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
Stream-Processing Points • globally sort points along a sweep line • derive neighbors for smoothing, normals ... [Pajarola ‘05] Streaming Geometry Processing • Streaming Meshes • topological finalization of vertices [Isenburg & Lindstrom ‘05] Streaming Compression Streaming Simplification
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 • locate triangle enclosing the point [Lawson ’77] [Bowyer ’81] [Watson ’81] • find and remove all triangles with non-empty circumcircles • triangulate by connecting new point
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] • Divide and Conquer • algorithm controls temporary storage to disk [Arge et al. ‘05] Triangulating Lots of Points • buy more main memory • need 36 GB for 0.5 billion points
output mesh triangulation data structurein external memory External Memory Methods sorted points
extract output isolines Our Streaming Approach finalized points output mesh
Streaming Delaunay Pipeline spfinalize -i points.raw -ospb | spdelaunay –ispb –o tin.smb enhances points withspatial finalization uses spatial finalizationto certify triangles as final
Spatial Finalization of Points compute bounding box
4 5 4 9 5 8 3 6 5 6 1 6 1 7 4 7 2 2 3 7 1 9 7 4 5 1 7 7 7 5 8 7 8 9 2 1 7 7 8 7 3 1 7 8 7 6 8 7 7 4 8 8 9 7 9 8 2 6 9 6 5 8 2 Spatial Finalization of Points compute bounding box create finalization grid • count number of points per cell
5 4 9 8 6 1 6 7 4 7 3 7 9 7 7 5 8 7 8 9 2 7 7 8 7 3 7 8 7 6 8 7 7 4 8 8 9 7 9 8 2 6 9 6 5 8 2 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
1 4 9 7 6 0 3 5 4 7 3 7 9 7 7 5 8 7 8 9 2 7 7 8 7 3 7 8 7 6 8 7 7 4 8 8 9 7 9 8 2 6 9 6 5 8 2 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
0 4 9 2 6 1 0 5 4 5 3 6 9 7 7 5 8 7 8 9 2 7 7 8 7 3 7 8 7 6 8 7 7 4 8 8 9 7 9 8 2 6 9 6 5 8 2 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
0 3 9 0 4 1 0 0 4 3 3 3 9 7 7 5 8 7 8 9 2 7 7 8 7 3 7 8 7 6 8 7 7 4 8 8 9 7 9 8 2 6 9 6 5 8 2 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
0 7 1 0 4 3 1 2 7 1 1 7 7 9 2 7 7 8 7 3 7 8 7 6 8 7 7 4 8 8 9 7 9 8 2 6 9 6 5 8 2 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
0 2 1 0 4 1 6 3 2 5 1 7 6 4 5 8 6 7 4 8 8 8 7 9 8 2 6 9 6 5 8 2 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
0 2 1 0 4 1 1 3 2 3 2 3 7 2 5 9 5 4 7 2 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
0 2 1 0 4 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
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
finalization tags Unfinalized Region as Quadtree • as tags finalize cell after cell, maintain remaining cells in adaptive quadtree used for efficientoverlap tests bythe triangulator
Modified Incremental Delaunay • insert points • when reading afinalization tag • find certified triangles • output them to disk or pipe • deallocate data structure
Modified Incremental Delaunay • insert points • when reading afinalization tag • find certified triangles • output them to disk or pipe • deallocate data structure
Finding Certified Triangles • do circumcircleslie completely infinalized region? overlap test • efficient testing • avoid tests • try cheaper test • link overlappingcircles 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
The Neuse-River Basin 6 min 10 MB60,388 triangles 8 MB512 x 512 grid 6 min 52 MB 2,249,268 points 36 min 1.0 Billion Triangles 17 GB 0.5 Billion Points 11 GB on a laptop in 48 minutes using 60 + 10 MB
Scalability: 3 x 3 Tiling of Neuse 9.0 Billion Triangles 151 GB 4.5 Billion Points 101 GB on a laptop under 7 hours using 152 + 11 MB
to best in-core method • 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 [Shewchuk ‘96] Comparisons • to best out-of-core method • over 10 times faster on 0.5 billion points • laptop + 2 disks desktop & 4 disks • 0 scratch space 50 GB scratch space [Arge et al. ‘05]
Streaming Delaunay spfinalize -i points.raw -ospb | spdelaunay –ispb –o tin.smb enhances points withspatial finalization uses spatial finalizationto 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 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 0429901 + 0430065 "Collaborative Research: Fundamentalsand Algorithms for Streaming Meshes." • NGA award HM1582-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/