triangulation and convex hull
play

Triangulation and Convex Hull 8th November 2018 Agenda 1. - PowerPoint PPT Presentation

Triangulation and Convex Hull 8th November 2018 Agenda 1. Triangulation. No book, the slides are the curriculum 2. Finding the convex hull. Textbook, 8.6.2 2 Triangulation and terrain models Here we have measured the elevation of a


  1. Triangulation and Convex Hull 8th November 2018

  2. Agenda 1. Triangulation. No book, the slides are the curriculum 2. Finding the convex hull. Textbook, 8.6.2 2

  3. Triangulation and terrain models • Here we have measured the elevation of a number of points in the terrain. • Each point is projected down to a “sea level plane”. Here we have used a “reasonable” triangulation of the resulting points. • This triangulation also gives a triangulation of the terrain, and this can easily be drawn, e.g. from the side and in any projection 3

  4. Triangulation • The general problem is finding a triangulation of a given set of points in the plane. Below, a set of points are given (left), and a arbitrarily chosen triangulation of this set is drawn (right) • When finding a triangulation, a polygon should also be given, where the corners are are points of the given point set, with the rest of the points inside the polygon. (To define a boundary.) • We will assume that this polygon always is the convex hull of the set of points (see next slide). 4

  5. The convex hull of a point set Let P be a set of points in the plane ( R 2 ) (Can also be defined for R k , k > 2 ) A set Q  R 2 is convex if: Definition: for all q 1 , q 2  Q the line q 1 q 2 is fully within Q. The convex hull of a set of points P  R 2 is the smallest Definition: convex set Q that contains all the points of P . 5

  6. How many triangles and edges will a triangulation consist of? • This way of counting also defines an algorithm for finding a triangulation (and we shall use a refinement of this algorithm later) • Assume that the outer (convex) polygon has n corners, and that there are m points inside (so that the total number of points is n+m ) . – We can find a triangulation of the corners by choosing one of them, p , and draw an edge to the n-3 corners that do not already have an edge to p . – Together with the outer edges this gives n + ( n - 3) = 2 n - 3 edges, and n - 2 triangles. – We then take each of the inner points, q , and do as follows: We find the triangle that q resides in, and draw edges from q to the three corners of this triangle. This gives 3 extra edges and 2 extra triangles for each of the m inner points – We then get: Number of edges: 2 n – 3 + 3 m = 2 n + 3 m – 3 Number of triangles: n - 2 + 2 m = n + 2 m - 2 • Even if this is a special way to construct a triangulation, the answer (number of edges and triangles) holds for any triangulation, even if the outer polygon is not convex. (We do not prove this.) 6

  7. Constructing a triangulation (an illustration of the previous slide) • We have n corners in the outer polygon and m internal points • The upper figure shows the situation just after the n -3 diagonals are drawn, the lower shows a later situation, in which we want to include the red node. • The new red node gives: – Three extra edges – Two extra triangles • Thus the number of edges will be: n + ( n – 3) + 3 m = 2 n + 3 m – 3 Number of triangles: n - 2 + 2 m = n + 2 m - 2 7

  8. There are a number of different triangulations of the same set of points • We assume that the following special cases do not occur: 1) Four points lie on one circle (along the circumference), 2) all the points occurs on the same straight line. • And, what is a “good” triangulation? ? – Usually one where each triangle is as close to an equilateral triangle (with all angles equal to 60 O ) as possible. Two reasonable goals could be – To minimize the maximal angle : The largest angle is as small as possible (And notice: The largest angle in a triangle is always at least 60 O ) – To maximize the minimal angle: The smallest angle (which is never larger than 60 O ) is as large as possible. • It turns out that max-of-min is easier to handle than min-of-max, so it’s most commonly used. 8

  9. Definition of a Delaunay-triangulation (max-of-min) • Roughly speaking, a triangulation of a set of points is, a Delaunay triangulation if, over all triangulations, the smallest angle is as large as possible. • Or more precisely: When the angles of a triangulation are sorted from smallest to This angle larger than alfa, largest, the Delaunay triangulation is the but smaller than all other sequence with the highest lexicographic angles in (a) order. • Figure (a) is a Delaunay triangulation, but not figure (b). • They have he same smallest angle, but the next to smallest is largest in (a) 9

  10. The Voronoi diagram Another definition of Delaunay triangulation • The diagram to the left is the Voronoi Diagram of the given points – It is constructed as if the points are islands, and so that that the sea area closer to island x than to any other island belongs to island x. (“ midtinje- prinsippet ”) (“closest store”). • The Delaunay-triangulation is then obtained by: – By drawing an edge between those points/islands that have a common border, you will get a Delaunay triangulation (and this edge will be orthogonal to the common border). – Note that these edges will not always pass through the common border 10 (this is the case for the top two edges, and one at the bottom left).

  11. A property equivalen to the two other definitions • A triangulation is a Delaunay triangulation if and only if for all triangles, the circle through the three corners does not contain (in its inside) any of the other points. – It is at the outset not clear that such a triangulation will always exist. However, it in fact does, and there is only one such triangulation (if we don’t have any of the special cases mentioned earlier) • The triangulation to the left is a Delaunay triangulation, but not the one to the right. – Note that we here have one of the special cases (four points on a circle), and then the Delaunay triangulation is not unique. – We could have replaced the edge c-a with the one from p and downwards. • This is the definition we will use for the Delaunay triangulation. 11

  12. Some facts about angles and circles d d’ d” • To the left, we have: ᶿ 1 > ᶿ 2 > ᶿ 3 . • To decide whether the point d is inside, on, or outside the circle through a , b and c , we c have to assure that a , b , c and d are taken a in counter clockwise order, and then compute the value of the determinant: b (The computation of this can be optimized, and performed quite fast.) 12

  13. The Delaunay trick Assume the quadrangle a-b-c-d above is convex. • We can observe that if d is inside the circle through a, b, and c , then the circle through a, c, and d will contain b . • The Delaunay requirement is not fulfilled. • If we in (b) remove the edge a-c and instead insert b-d (see (c)), then point a will be outside circle through b, c and d, and c will be outside the one through a, b, and d. • Now the Delaunay requirement is fulfilled, at least locally. 13

  14. An algorithm that finds the Delaunay triangulation • We are given a set of points in the plane. • Start: To have a triangulation to begin with, we add three points, so that the triangle defined by these points contains all the given points. – And we let this triangle be the initial triangle (see below). – This single triangle is a Delaunay triangulation of the three points. • Step: We then do as we did earlier when we constructed a triangulation to count triangles and edges: – That is, we add one node at a time, and for each node we also add the three edges to the corners of the triangle where the node resides. – This may locally destroy the Delaunay property, and before we add the next node we will restore the Delaunay property, when necessary. (see next slide) It is important here to choose two of the three starting nodes far away from the node set. Then it will be easier to remove them afterwards. The third point can in fact be one of the original 14 points.

  15. Restoring the Delaunay property • Adding a point (see previous slide): – Before the addition we have a Delaunay triangulation (invariant). – We add a point p in one of the triangles, and draw edges from p to each of the three corners of this triangle. – This may destroy the Delaunay property, and we want to restore it by using the Delaunay trick (see earlier slide). • An important fact that we don’t prove: – To restore the Delaunay property we look at all triangles that have a corner in p . We look at each of these triangles together with the neighboring triangle opposite to p , and check whether the Delaunay property holds for these two triangles together. If not, we use the Delaunay trick on those two triangles (see figure next slide). – While this checking and repair goes on, the set of triangles with a corner in p can increase, and we have to go on testing until we have gone a full round without any Delaunay property being broken. – This process will always stop, as the number of edges to p will increase each time we use the Delaunay trick, and there is only a 15 finite number of points that p can have edges to.

  16. Adding a new node, and restoring the Delaunay property 16

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend