BowyerWatson Delaunay Triangulation - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

BowyerWatson Delaunay Triangulation

Description:

Bowyer-Watson. Delaunay Triangulation. 2D Implementation. Summary Of Algorithm ... Construct an initial rectangle that encloses all the given points and ... – PowerPoint PPT presentation

Number of Views:415
Avg rating:3.0/5.0
Slides: 26
Provided by: ecl120
Category:

less

Transcript and Presenter's Notes

Title: BowyerWatson Delaunay Triangulation


1
Bowyer-Watson Delaunay Triangulation
  • 2D Implementation

2
Summary Of Algorithm
  • There are 3 stages to the triangulation
  • Construct an initial rectangle that encloses all
    the given points and triangulate the rectangle.
  • Insert a point one at a time into the mesh. For
    each point, perform the following
  • Collect a list of triangle whose circumcircle
    contain the new point and remove them. The result
    is a polygon within the mesh.
  • The point will lie in the polygon. Connect the
    vertices to the new point. The resulting
    triangulation will be Delaunay.
  • Remove triangles in the mesh which shares a
    vertex with the enclosing rectangle.

3
Implementation Details Step 1
  • Create a rectangle that encloses all the given
    points.

Given Points
Enclosing Rectangle
4
Implementation Details Step 1
  • Triangulate The Rectangle (2 Possibilities)

or
5
Implementation Details Step 1
  • Store the triangles in such a way that we can
    retrieve its vertices in a counter-clockwise
    manner. (It will be important in Step 2)
  • Triangles in the Mesh
  • lt1,4,2gt
  • lt1,3,4gt

1
2
3
4
6
Implementation Details Step 2
  • Insert a point one at a time into the mesh. For
    each point, perform the following
  • Collect a list of triangles whose circumcircles
    contain the new point and remove them. The result
    is a polygon within the mesh.
  • The point will lie in the polygon. Connect the
    vertices to the new point. The resulting
    triangulation will be Delaunay.

7
Implementation Details Step 2.1
  • Collect a list of triangles whose circumcircles
    contain the new point and remove them. The result
    is a polygon within the mesh.
  • Locate the triangle the point is in. This
    triangles circumcircle will definitely contain
    the new point.
  • Do a search from this triangle to locate all
    other triangles whose circumcircles contain the
    new point.
  • Collect a list of edges which define the boundary
    of triangles to be deleted from triangles not
    to be deleted. (Triangles to be deleted are
    triangles whose circumcircles contain the new
    point)
  • Remove the triangles whose circumcircles contain
    the new point.

8
Implementation Details Step 2.1.1
  • Locate the triangle the point is in.
  • (x0,y0), (x1, y1) and (x2, y2) are in
    counter-clockwise order if the expression given
    is greater than zero.
  • For interest, multiplying ½ to the expression
    below gives the signed area of a triangle.

9
Implementation Details Step 2.1.1
  • Locate the triangle the point is in.
  • Let point p be the point just inserted into the
    mesh.
  • Our triangles has its vertices stored in a
    counter-clockwise manner lta,b,cgt
  • Point p is in the triangle if triangles lta,b,pgt,
    ltb,c,pgt, ltc,a,pgt have their respective vertices
    in an counter-clockwise manner.

Condition for the point to be in the triangle or
On one of the edges of the triangle The three
expression below must be greater or equal to
zero.
10
Implementation Details Step 2.1.1
  • Locate the triangle the point is in.
  • Looking at a random triangle lta,b,cgt in the mesh,
    we test if point p is in this triangle.
  • For the example given below, ltb,c,pgt has a
    clockwise orientation.
  • To advance closer to p, we will go to the
    adjacent triangle with the edge ltc,bgt i.e.
    ltb,d,cgt

c
d
p
Two random triangles in a mesh and a point p.
b
a
11
Implementation Details Step 2.1.1
  • Locate the triangle the point is in.
  • Given any triangle in the mesh, conduct the
    criterion test for a point in a triangle.
  • If a directed edge of the current triangle is in
    clockwise orientation with the point p, we move
    to the next triangle who share that edge.
  • We repeat step 1 and 2 till we find the triangle
    that contains the point.
  • A random starting point

12
Implementation Details Step 2.1.1
  • Locate the triangle the point is in.
  • To improve mean statistical running time of point
    location, our starting point should be the most
    recent triangle constructed rather than the first
    triangle in the list of mesh triangles.

13
Implementation Details Step 2.1.1
  • Locate the triangle the point is in.
  • Pseudo-Code
  • We are at triangle lta,b,cgt and point p is newly
    inserted into the mesh
  • locate_triangle(current_triangle)
  • If one of the if statement below is satisfied,
    check if there exist an adjacent triangle for
    that particular edge else indicate that no
    triangle is found.
  • if(a,b,p has clockwise orientation) locate_t
    riangle(adjacent triangle with edge ltb,agt)
  • else if (b,c,p has clockwise orientation)
    locate_triangle(adjacent triangle
    with edge ltc,bgt)
  • else if (c,a,p has clockwise orientation)
  • locate_triangle(adjacent triangle with edge
    lta,cgt)
  • else
  • return current_triangle

14
Implementation Details Step 2.1.1
  • Locate the triangle the point is in.
  • If we are unable to locate the triangle through
    the method proposed earlier, perform an
    exhaustive search on all the mesh triangles.

15
Implementation Details Step 2.1.2
  • Locate all other triangles whose circumcircles
    contain the newly inserted point p
  • Perform a neighbor search from the triangle which
    contain p.
  • Neighbor search Examine the three adjacent
    triangles of the current triangle.
  • All triangles whose circumcircles contain p, will
    be continguous.
  • This means we dont have to look beyond a
    triangle whose circumcircle doesnt contain p.
  • Perform an neighbor search for every triangle
    whose circumcircle DOES contain p.
  • Avoid checking the same triangle twice by marking
    checked triangles as visited.

16
Implementation Details Step 2.1.2
  • Locate all other triangles whose circumcircles
    contain the newly inserted point p
  • Perform neighbor search for triangles whose
    circumcircles contain the point p.
  • Yellow triangles indicate that these triangles
    are examined and circumcircle doesnt contain the
    point
  • Green triangles are triangles discovered from the
    search whose circumcircle contain the point p.

17
Implementation Details Step 2.1.2
  • Locate all other triangles whose circumcircles
    contain the newly inserted point
  • Deriving the circumcenter and radius of a
    triangles circumcircle
  • http//mathworld.wolfram.com/Circumcircle.html
  • Given a triangle of points (x1, y1), (x2, y2) and
    (x3, y3), the formula to find the circumcenter
    (x0, y0) and radius r is provided below.

18
Implementation Details Step 2.1.2
  • Locate all other triangles whose circumcircles
    contain the newly inserted point
  • The point in the circumcircle test
  • To save time, we avoid the computationally
    expensive square root operation and check whether
    the distance squared of the point from the
    circumcenter is smaller or equal to the radius
    square of the circumcircle of the triangle.

19
Implementation Details Step 2.1.2
  • Locate all other triangles whose circumcircles
    contain the newly inserted point p
  • Pseudo-Code
  • We start from the triangle containing point p
  • find_triangles(current_triangle, delete_list)
  • if(visited)
  • return
  • mark triangle as visited
  • perform point_in_circumcircle check for this
    triangle
  • If (point in circumcircle)
  • add current triangle to delete_list
  • find_triangles(adj triangle 1,delete_list)
  • find_triangles(adj triangle 1,delete_list)
  • find_triangles(adj triangle 1,delete_list)
  • else
  • return

20
Implementation Details Step 2.1.3
  • Obtain a list of edges that define the boundary
    between triangles to be deleted(green triangles)
    and triangles not to be deleted.
  • Make sure that the edges obtained are directed as
    it would be for the triangles to be deleted.

The list of edges will be those lines in bold
and with a arrowhead.
21
Implementation Details Step 2.1.3
  • PseudoCode
  • Marked all triangles to be deleted.
  • Start from the triangle that contains the newly
    inserted point
  • Get_boundary(edge_list, current_triangle)
  • Mark current_triangle as visited.
  • for each of the edges of the current triangle,
    do the following
  • if(adjacent triangle to current edge is
    unmarked)
  • add edge 1 to the edge_list
  • else if(adjacent triangle to current edge is
    unvisited)
  • get_boundary(edge_list,adjacent_triangle)

22
Implementation Details Step 2.1.4
  • Remove all triangles that we have discovered
    which contains the newly inserted point

23
Implementation Details Step 2.2
  • The point will lie in the polygon.
  • Connect the vertices to the new point.
  • This resulting triangulation will be Delaunay.

24
Implementation Details Step 2.2
  • The formation of the new triangles should be in
    counter-clockwise order (for future point
    location to work)
  • From the list of directed edges from step 2.1,
    construct the new triangles in the following
    manner ltedge.start_node, edge.end_node, newly
    inserted pointgt

The list of edges will be those lines in bold
and with a arrowhead.
25
Implementation Details Step 3
  • Remove all triangles that share a vertex of the
    enclosing square
  • (Retaining triangles with the yellow shading)
Write a Comment
User Comments (0)
About PowerShow.com