Delaunay Triangulation on the GPU

Slides:



Advertisements
Similar presentations
Polygon Scan Conversion – 11b
Advertisements

Computer graphics & visualization Real-Time Pencil Rendering Marc Treib.
Polygon Triangulation
Parallel Banding Algorithm to Compute Exact Distance Transform with the GPU Thanh-Tung Cao Ke Tang Anis Mohamed Tiow-Seng Tan.
Efficient access to TIN Regular square grid TIN Efficient access to TIN Let q := (x, y) be a point. We want to estimate an elevation at a point q: 1. should.
Surface Reconstruction From Unorganized Point Sets
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
Computational Geometry II Brian Chen Rice University Computer Science.
10/10/02 (c) 2002 University of Wisconsin, CS 559 Last Time Finished viewing: Now you know how to: –Define a region of space that you wish to view – the.
Ruslana Mys Delaunay Triangulation Delaunay Triangulation (DT)  Introduction  Delaunay-Voronoi based method  Algorithms to compute the convex hull 
By Groysman Maxim. Let S be a set of sites in the plane. Each point in the plane is influenced by each point of S. We would like to decompose the plane.
Convex Hulls in 3-space Jason C. Yang.
What does that mean? To get the taste we will just look only at some sample problems... [Adapted from S.Suri]
3/5/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Delaunay Triangulations II Carola Wenk Based on: Computational.
Voronoi Diagram Presenter: GI1 11號 蔡逸凡
Computational Geometry -- Voronoi Diagram
17. Computational Geometry Chapter 7 Voronoi Diagrams.
2. Voronoi Diagram 2.1 Definiton Given a finite set S of points in the plane , each point X of  defines a subset S X of S consisting of the points of.
3. Delaunay triangulation
1cs542g-term Notes. 2 Meshing goals  Robust: doesn’t fail on reasonable geometry  Efficient: as few triangles as possible Easy to refine later.
Delaunay Triangulation Computational Geometry, WS 2006/07 Lecture 11 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Delaunay Triangulation on the GPU Dan Maljovec. CPU Delaunay Triangulation Randomized Incremental Algorithm 1.Construct Bounding triangle 2.Choose point.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2007 Chapter 5: Voronoi Diagrams Wednesday,
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Chapter 5: Voronoi Diagrams Monday, 2/23/04.
Lecture 10 : Delaunay Triangulation Computational Geometry Prof. Dr. Th. Ottmann 1 Overview Motivation. Triangulation of Planar Point Sets. Definition.
Delaunay circumcircle Empty Circle (Sphere) Property:
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 9 Delaunay Triangulation.
Computing the Delaunay Triangulation By Nacha Chavez Math 870 Computational Geometry; Ch.9; de Berg, van Kreveld, Overmars, Schwarzkopf By Nacha Chavez.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Voronoi diagrams of “nice” point sets Nina Amenta UC Davis “The World a Jigsaw”
Part Two Multiresolution Analysis of Arbitrary Meshes M. Eck, T. DeRose, T. Duchamp, H. Hoppe, M. Lounsbery, W. Stuetzle SIGGRAPH 95.
CSE554SimplificationSlide 1 CSE 554 Lecture 7: Simplification Fall 2014.
UNC Chapel Hill M. C. Lin Point Location Chapter 6 of the Textbook –Review –Algorithm Analysis –Dealing with Degeneracies.
Delaunay Triangulations Presented by Glenn Eguchi Computational Geometry October 11, 2001.
A Navigation Mesh for Dynamic Environments Wouter G. van Toll, Atlas F. Cook IV, Roland Geraerts CASA 2012.
9/7/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Triangulations and Guarding Art Galleries Carola Wenk.
PRE-TRIANGULATIONS Generalized Delaunay Triangulations and Flips Franz Aurenhammer Institute for Theoretical Computer Science Graz University of Technology,
CSE554SimplificationSlide 1 CSE 554 Lecture 7: Simplification Fall 2013.
CSE554Fairing and simplificationSlide 1 CSE 554 Lecture 6: Fairing and Simplification Fall 2012.
Voronoi Diagram (Supplemental)
Mesh Coarsening zhenyu shu Mesh Coarsening Large meshes are commonly used in numerous application area Modern range scanning devices are used.
Arrangements and Duality Motivation: Ray-Tracing Fall 2001, Lecture 9 Presented by Darius Jazayeri 10/4/01.
A New Voronoi-based Reconstruction Algorithm
Kansas State University Department of Computing and Information Sciences Friday, July 13, 2001 Mantena V. Raju Department of Computing and Information.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 7. Speed-up Techniques Presented by SooKyun Kim.
1/29/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Triangulations and Guarding Art Galleries Carola Wenk.
UNC Chapel Hill M. C. Lin Delaunay Triangulations Reading: Chapter 9 of the Textbook Driving Applications –Height Interpolation –Constrained Triangulation.
1 Point Location Strategies Idit Haran
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2010 O’Rourke Chapter 6 with some material.
9/8/10CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2010 Triangulations and Guarding Art Galleries Carola Wenk.
CDS 301 Fall, 2008 Domain-Modeling Techniques Chap. 8 November 04, 2008 Jie Zhang Copyright ©
3/3/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Delaunay Triangulations I Carola Wenk Based on: Computational.
CENG 789 – Digital Geometry Processing 03- Point Sets Asst. Prof. Yusuf Sahillioğlu Computer Eng. Dept,, Turkey.
Bigyan Ankur Mukherjee University of Utah. Given a set of Points P sampled from a surface Σ,  Find a Surface Σ * that “approximates” Σ  Σ * is generally.
Polygon Triangulation
Randomized Incremental Algorithm for Delaunay Triangulation (DT) CS Gates 219 October 19, 3:00 – 4:20 Richard Zhang (for Leo G.) Disclaimer: All.
CMPS 3130/6130 Computational Geometry Spring 2017
Computer Graphics Filling.
Polygons.
Computer Graphics Filled Area Primitives II Lecture 09 Taqdees A
Fill Area Algorithms Jan
Grids Geometry Computational Geometry
Grids Geometry Computational Geometry
Localizing the Delaunay Triangulation and its Parallel Implementation
Domain-Modeling Techniques
Craig Schroeder October 26, 2004
Grids Geometry Computational Geometry
Lecture 13 Clipping & Scan Conversion
Triangulation of a polygon
Iso-Surface extraction from red and green samples on a regular lattice
Presentation transcript:

Delaunay Triangulation on the GPU Dan Maljovec

CPU Delaunay Triangulation Randomized Incremental Algorithm Construct Bounding triangle Choose point to insert randomly Locate triangle containing point Construct new children triangles by connecting new point to each point of containing triangle Test edges and flip if necessary If flipped, test edges and recursively flip if necessary Repeat 2-5 until all points have been inserted

GPU Implementation Use the dual: Voronoi Diagram Construct a discrete Voronoi Diagram (Jump Flooding Algorithm) Obtain a triangulation from the Voronoi Fix the estimations we made and perform edge flipping

Jump Flooding Algorithm Write the sites into a square texture Map each pixel in the texture (a point in discrete space) to a thread Initialize the step size to be half of the width/height of the texture Each pixel will look in 8 directions of size step to find closest site to it Divide the step size by 2 and Repeat

1+JFA Write the sites into a square texture Map each pixel in the texture (a point in discrete space) to a thread Each pixel will look in eight directions of size step to find closest site to it Divide the step size by 2 and Repeat First do one round of step = 1, then step = textureDimension / 2

1+JFA (write sites)

1+JFA (step size = 1)

1+JFA (step size = 1)

1+JFA (step size = 8)

1+JFA (step size = 8)

1+JFA (step size = 4)

1+JFA (step size = 4)

1+JFA (step size = 2)

1+JFA (step size = 2)

1+JFA (step size = 1)

Errors from JFA JFA can introduce errors in the Voronoi diagram, which would lead to crossing triangles. These errors are manifested in “island” pixels as shown below:

Detect and Remove Islands Map pixels to threads Knowing where a site is with respect to a pixel, we can look in that direction and see if this pixel is stranded Iterate this process until no more islands are found

Detect and Remove Islands Map pixels to threads Knowing where a site is with respect to a pixel, we can look in that direction and see if this pixel is stranded Iterate this process until no more islands are found This pixel’s site is up and to the right, so we will check neighbors in those directions to see if this is an island.

Detect and Remove Islands Map pixels to threads Knowing where a site is with respect to a pixel, we can look in that direction and see if this pixel is stranded Iterate this process until no more islands are found Update it to the closest site of the colors we find at the neighboring pixels

Find Voronoi Vertices Vertices in the discrete Voronoi diagram, lie at junctions of 3 or 4 different colored pixels. Map pixels to threads, and look right, down, and diagonally down and to the right to test if there exists a vertex at this pixel. 3-Color Cases (generates 1 Δ): 4-Color Case (generates 2 Δ): Pixels will be marked as Voronoi vertices

Chain Up Voronoi Vertices Parallel Prefix operation: Map rows to threads, and for each pixel store the closest vertex in the row, to its right. Allows us to apriori know how many triangles we are about to create, and allows us to be output sensitive in the next step.

Chain up Vertices 0 2 1 2 #Vertices Row Δ to Generate Row -1 -1 -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 3 3 3 5 5 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 10 10 10 10 10 10 10 10 10 10 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1

Triangle Generation Map thread to each row Create a triangle at each 3-Color vertex by connecting the 3 sites that contribute to the vertex Create 2 triangles at each 4-Color vertex by connecting sites of pixels 1, 2, & 3, then sites of pixels 2,4, & 3 1 3 2 4

Generate Triangles

Generate Triangles

Generate Triangles

Generate Triangles

Generate Triangles

Generate Triangles

Generate Triangles

Fix Convex Hull What’s wrong here? Vertex will not be captured in texture, but it does exist. The bisectors will cross eventually if the points are not convex. Sites that form a convex turn will form bisectors that extend away from each other as they go to infinity.

Fix Convex Hull What’s wrong here? Vertex will not be captured in texture, but it does exist. Is there a specific case where this occurs? Moving clockwise around cells who touch the border, sites that form a left turn will have a vertex outside the texture The bisectors will cross eventually if the points are not convex. Sites that form a convex turn will form bisectors that extend away from each other as they go to infinity.

Shift Sites We shifted all the sites into discrete space, now we have to put them back without causing any intersecting triangles

Shift Sites

Shift Sites 1st case, we relocate to the inside of a triangle that lies within the fan without crossing any edges

Shift Sites 2nd case, we relocate to the inside of a triangle that lies within the fan but we cause edges to cross

Shift Sites 3rd case, we relocate to the inside of a triangle outside of the triangle fan connected to the site

Shift Sites 4th case, we relocate outside of the mesh

Shift Sites

Insert Missing Sites Similar to what we did with the incremental approach, point locate a site in a triangle and subdivide it, but since we know who took the missing site’s position, we can start with the triangle fan of that point.

Insert Missing Sites 1st case, point lies in the interior of a triangle

Insert Missing Sites 2nd case, point lies on an edge

Insert Missing Sites 3rd case, point lies outside of the mesh

Insert Missing Sites

Flip Edges We have seen this before Empty Circumcircle test

Flip Edges We have seen this before Empty Circumcircle test

Flip Edges We have seen this before Empty Circumcircle test

Flip Edges We have seen this before Empty Circumcircle test

Flip Edges We have seen this before Empty Circumcircle test

Summary 1+JFA Island removal Find vertices Generate Δs Fix convex hull Shift sites Insert missing sites Flip edges

References Hoff, K. E., Keyser, J., Lin, M., Manocha, D., Culver, T. 1999. Fast Computation of Generalized Voronoi Diagrams Using Graphics Hardware. In Proceedings of ACM SIGGRAPH 1999, ACM Press / ACM SIGGRAPH, New York. Computer Graphics Proceedings, Annual Conference Series, ACM, 277-286. Denny, M. O. 2003. Algorithmic geometry via graphics hardware. PhD thesis, Universität des Saarlandes. Rong, G., Tan, T.-S. 2006. Jump flooding in GPU with applications to Voronoi diagram and distance transform. In Proceedings of the Symposium on Interactive 3D Graphics and Games, ACM Press, 109–116. Rong, G., Tan, T.-S. 2007. Variants of jump flooding algorithm for computing discrete Voronoi diagrams. In Proceedings of the 4th International Symposium on Voronoi Diagrams in Science and Engineering (ISVD’07), 176–181. Rong, G., Tan, T.-S., and Cao, T.-T. and Stephanus. 2008. Computing Two dimensional Delaunay Triangulation Using Graphics Hardware. In Proceedings of the Symposium on Interactive 3D Graphics and Games, ACM Press, 89–97.

Chain up Vertices #Vertices Row Δ to Generate Row -1 8 6 0 1 1