Universitat Politcnica de Catalunya Facultat d'Informatica...
Transcript of Universitat Politcnica de Catalunya Facultat d'Informatica...
![Page 1: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/1.jpg)
Vera Sacristan
Computational Geometry
Facultat d’Informatica de Barcelona
Universitat Politcnica de Catalunya
TRIANGULATING POLYGONS
![Page 2: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/2.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
![Page 3: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/3.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
A polygon triangulation is the decomposition of a polygon into triangles. This is done byinserting internal diagonals.
An internal diagonal is any segment...
• connecting two vertices of the polygon and
• completely enclosed in the polygon.
![Page 4: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/4.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
A polygon triangulation is the decomposition of a polygon into triangles. This is done byinserting internal diagonals.
An internal diagonal is any segment...
• connecting two vertices of the polygon and
• completely enclosed in the polygon.
![Page 5: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/5.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
A polygon triangulation is the decomposition of a polygon into triangles. This is done byinserting internal diagonals.
An internal diagonal is any segment...
• connecting two vertices of the polygon and
• completely enclosed in the polygon.
![Page 6: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/6.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
A polygon triangulation is the decomposition of a polygon into triangles. This is done byinserting internal diagonals.
An internal diagonal is any segment...
• connecting two vertices of the polygon and
• completely enclosed in the polygon.
![Page 7: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/7.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
A polygon triangulation is the decomposition of a polygon into triangles. This is done byinserting internal diagonals.
An internal diagonal is any segment...
• connecting two vertices of the polygon and
• completely enclosed in the polygon.
![Page 8: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/8.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
A polygon triangulation is the decomposition of a polygon into triangles. This is done byinserting internal diagonals.
An internal diagonal is any segment...
• connecting two vertices of the polygon and
• completely enclosed in the polygon.
![Page 9: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/9.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
A polygon triangulation is the decomposition of a polygon into triangles. This is done byinserting internal diagonals.
An internal diagonal is any segment...
• connecting two vertices of the polygon and
• completely enclosed in the polygon.
![Page 10: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/10.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
A polygon triangulation is the decomposition of a polygon into triangles. This is done byinserting internal diagonals.
An internal diagonal is any segment...
• connecting two vertices of the polygon and
• completely enclosed in the polygon.
An application example:
![Page 11: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/11.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
A polygon triangulation is the decomposition of a polygon into triangles. This is done byinserting internal diagonals.
An internal diagonal is any segment...
• connecting two vertices of the polygon and
• completely enclosed in the polygon.
An application example:
![Page 12: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/12.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
A polygon triangulation is the decomposition of a polygon into triangles. This is done byinserting internal diagonals.
An internal diagonal is any segment...
• connecting two vertices of the polygon and
• completely enclosed in the polygon.
An application example:
![Page 13: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/13.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
A polygon triangulation is the decomposition of a polygon into triangles. This is done byinserting internal diagonals.
An internal diagonal is any segment...
• connecting two vertices of the polygon and
• completely enclosed in the polygon.
An application example:
![Page 14: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/14.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
A polygon triangulation is the decomposition of a polygon into triangles. This is done byinserting internal diagonals.
An internal diagonal is any segment...
• connecting two vertices of the polygon and
• completely enclosed in the polygon.
An application example:
![Page 15: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/15.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
A polygon triangulation is the decomposition of a polygon into triangles. This is done byinserting internal diagonals.
An internal diagonal is any segment...
• connecting two vertices of the polygon and
• completely enclosed in the polygon.
An application example:
![Page 16: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/16.jpg)
TRIANGULATING POLYGONS
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
Index
1. Every polygon can be triangulated
2. Properties of polygon triangulations
3. Algorithms
(a) Triangulating by inserting diagonals
(b) Triangulating by subtracting ears
(c) Triangulating convex polygons
(d) Triangulating monotone polygons
(e) Monotone partinioning
![Page 17: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/17.jpg)
Every polygon admits a triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 18: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/18.jpg)
Every polygon admits a triangulation
Lemma 1. Every polygon has at least one convex vertex (actually, at least three).
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 19: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/19.jpg)
Every polygon admits a triangulation
Lemma 1. Every polygon has at least one convex vertex (actually, at least three).
The vertex p with minimum x-coordinate (and, if there are morethan one, the one with minimumy-coordinate) is convex.
p
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 20: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/20.jpg)
Every polygon admits a triangulation
Lemma 1. Every polygon has at least one convex vertex (actually, at least three).
The vertex p with minimum x-coordinate (and, if there are morethan one, the one with minimumy-coordinate) is convex.
p
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 21: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/21.jpg)
Every polygon admits a triangulation
Lemma 1. Every polygon has at least one convex vertex (actually, at least three).
The vertex p with minimum x-coordinate (and, if there are morethan one, the one with minimumy-coordinate) is convex.
So is the vertex q with maximumx-coordinate (which is different ofthe one with minimum one).
p
q
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 22: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/22.jpg)
Every polygon admits a triangulation
Lemma 1. Every polygon has at least one convex vertex (actually, at least three).
The vertex p with minimum x-coordinate (and, if there are morethan one, the one with minimumy-coordinate) is convex.
So is the vertex q with maximumx-coordinate (which is different ofthe one with minimum one).
Finally, there is at least one vertexwhich is extreme in the directionorthogonal to pq and does not co-incide with any of the above. Thisthird vertex r is necessarily convex.
p
q
r
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 23: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/23.jpg)
Every polygon admits a triangulation
Lemma 1. Every polygon has at least one convex vertex (actually, at least three).
Lemma 2. Every n-gon with n ≥ 4 has at least one internal diagonal.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 24: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/24.jpg)
Every polygon admits a triangulation
Lemma 1. Every polygon has at least one convex vertex (actually, at least three).
Lemma 2. Every n-gon with n ≥ 4 has at least one internal diagonal.
Let vi be a convex vertex.
Then, either vi−1vi+1 is an internal diagonal...
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
vi
vi−1
vi+1
![Page 25: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/25.jpg)
Every polygon admits a triangulation
Lemma 1. Every polygon has at least one convex vertex (actually, at least three).
Lemma 2. Every n-gon with n ≥ 4 has at least one internal diagonal.
or there exists a vertex of the polygon lying inthe triangle vi−1vivi+1.
Let vi be a convex vertex.
Then, either vi−1vi+1 is an internal diagonal...
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
vi
vi−1
vi+1
![Page 26: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/26.jpg)
Every polygon admits a triangulation
Lemma 1. Every polygon has at least one convex vertex (actually, at least three).
Lemma 2. Every n-gon with n ≥ 4 has at least one internal diagonal.
or there exists a vertex of the polygon lying inthe triangle vi−1vivi+1.
Let vi be a convex vertex.
Then, either vi−1vi+1 is an internal diagonal...
In this case, among all the vertices ly-ing in the triangle, let vj be the farthestone from the segment vi−1vi+1. Thenvivj is an internal diagonal (it can notbe intersected by any edge of the poly-gon).
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
vi
vi−1
vi+1
vj
![Page 27: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/27.jpg)
Every polygon admits a triangulation
Lemma 1. Every polygon has at least one convex vertex (actually, at least three).
Lemma 2. Every n-gon with n ≥ 4 has at least one internal diagonal.
or there exists a vertex of the polygon lying inthe triangle vi−1vivi+1.
Let vi be a convex vertex.
Then, either vi−1vi+1 is an internal diagonal...
In this case, among all the vertices ly-ing in the triangle, let vj be the farthestone from the segment vi−1vi+1. Thenvivj is an internal diagonal (it can notbe intersected by any edge of the poly-gon).
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
vi
vi−1
vi+1
vj
![Page 28: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/28.jpg)
Every polygon admits a triangulation
Lemma 1. Every polygon has at least one convex vertex (actually, at least three).
Lemma 2. Every n-gon with n ≥ 4 has at least one internal diagonal.
Corollary. Every polygon can be triangulated. (By induction.)
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 29: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/29.jpg)
Properties of the triangulations of polygons
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 30: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/30.jpg)
Properties of the triangulations of polygons
Let P be a simple n-gon.
Property 1. Every triangulation of P has n− 3 diagonals.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 31: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/31.jpg)
Properties of the triangulations of polygons
Let P be a simple n-gon.
Property 1. Every triangulation of P has n− 3 diagonals.
Proof by induction.
Base case: When n = 3, the number of diagonals is d = 0 = n− 3.
Inductive step: Consider a diagonal of a triangulation T of P , decomposing P into twosubpolygons: a (k + 1)-gon P1 and an (n − k + 1)-gon P2. By inductive hypothesis, thenumber of diagonals of the triangulations induced by T in P1 and P2 are:
d1 = k + 1− 3,d2 = n− k + 1− 3,
therefore, d = d1 + d2 + 1 = k + 1− 3 + n− k + 1− 3 + 1 = n− 3.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
P1P2
![Page 32: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/32.jpg)
Properties of the triangulations of polygons
Let P be a simple n-gon.
Property 1. Every triangulation of P has n− 3 diagonals.
Property 2. Every triangulation of P has n− 2 triangles.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 33: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/33.jpg)
Properties of the triangulations of polygons
Let P be a simple n-gon.
Property 1. Every triangulation of P has n− 3 diagonals.
Property 2. Every triangulation of P has n− 2 triangles.
Again, the proof is by induction.
Base case: When n = 3, the number of triangles is t = 1 = n− 2.
Inductive step: With the same conditions of the previous proof,
t1 = k + 1− 2,t2 = n− k + 1− 2,
hence,t = t1 + t2 = k + 1− 2 + n− k + 1− 2 = n− 2.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
P1P2
![Page 34: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/34.jpg)
Properties of the triangulations of polygons
Let P be a simple n-gon.
Property 1. Every triangulation of P has n− 3 diagonals.
Property 2. Every triangulation of P has n− 2 triangles.
Property 3. The dual graph of any triangulation of P is a tree.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 35: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/35.jpg)
Properties of the triangulations of polygons
Let P be a simple n-gon.
Property 1. Every triangulation of P has n− 3 diagonals.
Property 2. Every triangulation of P has n− 2 triangles.
Property 3. The dual graph of any triangulation of P is a tree.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Given a triangulation of P , its dual graph has one vertex for each trian-gle, and one edge connecting two vertices whenever their correspondingtriangles are adjacent. We want to prove that this graph is connected andacyclic.
![Page 36: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/36.jpg)
Properties of the triangulations of polygons
Let P be a simple n-gon.
Property 1. Every triangulation of P has n− 3 diagonals.
Property 2. Every triangulation of P has n− 2 triangles.
Property 3. The dual graph of any triangulation of P is a tree.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Given a triangulation of P , its dual graph has one vertex for each trian-gle, and one edge connecting two vertices whenever their correspondingtriangles are adjacent. We want to prove that this graph is connected andacyclic.
![Page 37: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/37.jpg)
Properties of the triangulations of polygons
Let P be a simple n-gon.
Property 1. Every triangulation of P has n− 3 diagonals.
Property 2. Every triangulation of P has n− 2 triangles.
Property 3. The dual graph of any triangulation of P is a tree.
Given a triangulation of P , its dual graph has one vertex for each trian-gle, and one edge connecting two vertices whenever their correspondingtriangles are adjacent. We want to prove that this graph is connected andacyclic.
The graph is trivially connected.
About the acyclicity: Notice that each edge of the dual graph “separates”the two endpoints of the internal diagonal of P shared by the two adjacenttriangles. If the graph had a cycle, it would enclose the endpoint(s) of thediagonals intersected by the cycle and, therefore, it would enclose pointsbelonging to the boundary of the polygon, contradicting the hypothesisthat P is simple and without holes.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 38: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/38.jpg)
Properties of the triangulations of polygons
Let P be a simple n-gon.
Property 1. Every triangulation of P has n− 3 diagonals.
Property 2. Every triangulation of P has n− 2 triangles.
Property 3. The dual graph of any triangulation of P is a tree.
Corollary. Every n-gon with n ≥ 4 has at least two non-adjacent ears.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 39: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/39.jpg)
ALGORITHMS FORPOLYGON TRIANGULATION
![Page 40: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/40.jpg)
Tringulating a polygon by subtracting ears
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 41: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/41.jpg)
Tringulating a polygon by subtracting ears
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 42: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/42.jpg)
Tringulating a polygon by subtracting ears
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
Procedure1. Sequentially explore the vertices until you find an ear2. Crop it3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 43: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/43.jpg)
Tringulating a polygon by subtracting ears
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
Running time
Procedure1. Sequentially explore the vertices until you find an ear2. Crop it3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 44: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/44.jpg)
Tringulating a polygon by subtracting ears
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
Running timeDetecting whether a vertex is convex: O(1).
Procedure1. Sequentially explore the vertices until you find an ear2. Crop it3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 45: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/45.jpg)
Tringulating a polygon by subtracting ears
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
Running timeDetecting whether a vertex is convex: O(1).Detecting whether a convex vertex is an ear: O(n).
Procedure1. Sequentially explore the vertices until you find an ear2. Crop it3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 46: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/46.jpg)
Tringulating a polygon by subtracting ears
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
Running timeDetecting whether a vertex is convex: O(1).Detecting whether a convex vertex is an ear: O(n).Finding an ear: O(n2).
Procedure1. Sequentially explore the vertices until you find an ear2. Crop it3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 47: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/47.jpg)
Tringulating a polygon by subtracting ears
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
Running timeDetecting whether a vertex is convex: O(1).Detecting whether a convex vertex is an ear: O(n).Finding an ear: O(n2).
Overall running time:
T (n) = O(n2) +O((n− 1)2) +O((n− 2)2) + · · ·+O(1) = O(n3).
Procedure1. Sequentially explore the vertices until you find an ear2. Crop it3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 48: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/48.jpg)
Tringulating a polygon by subtracting ears
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
Improved procedureInitialization
1. Detect all convex vertices2. Detect all ears
Next step1. Crop an ear2. Update the information of the convex vertices3. Update the information of the ears
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 49: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/49.jpg)
Tringulating a polygon by subtracting ears
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
Improved procedureInitialization
1. Detect all convex vertices2. Detect all ears
Next step1. Crop an ear2. Update the information of the convex vertices3. Update the information of the ears
Running time
O(n)O(n2)
O(1)O(1)O(n)
Only once
O(n) times
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 50: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/50.jpg)
Tringulating a polygon by subtracting ears
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
Improved procedureInitialization
1. Detect all convex vertices2. Detect all ears
Next step1. Crop an ear2. Update the information of the convex vertices3. Update the information of the ears
Running time
Running time: O(n2)
O(n)O(n2)
O(1)O(1)O(n)
Only once
O(n) times
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 51: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/51.jpg)
Tringulating a polygon by inserting diagonals
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 52: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/52.jpg)
Tringulating a polygon by inserting diagonals
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 53: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/53.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 54: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/54.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Is it a diagonal?
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 55: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/55.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Is it a diagonal?
Check vivj against all segments vkvk+1 for intersection.
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 56: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/56.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Is it a diagonal?
Is it internal?
Check vivj against all segments vkvk+1 for intersection.
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 57: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/57.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Is it a diagonal?
Is it internal?
Check vivj against all segments vkvk+1 for intersection.
If vi is convex, the oriented line −−→vivj should leavevi−1 to its left and vi+1 to its right.
vi
vi−1
vi+1
vj
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 58: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/58.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Is it a diagonal?
Is it internal?
Check vivj against all segments vkvk+1 for intersection.
If vi is convex, the oriented line −−→vivj should leavevi−1 to its left and vi+1 to its right.
If vi is reflex, the oriented line −−→vivj should not leavevi−1 to its right and vi+1 to its left.
vi
vi−1
vi+1
vj
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 59: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/59.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Is it a diagonal?
Is it internal?
Check vivj against all segments vkvk+1 for intersection.
If vi is convex, the oriented line −−→vivj should leavevi−1 to its left and vi+1 to its right.
If vi is reflex, the oriented line −−→vivj should not leavevi−1 to its right and vi+1 to its left.
Running time
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 60: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/60.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Is it a diagonal?
Is it internal?
Check vivj against all segments vkvk+1 for intersection.
If vi is convex, the oriented line −−→vivj should leavevi−1 to its left and vi+1 to its right.
If vi is reflex, the oriented line −−→vivj should not leavevi−1 to its right and vi+1 to its left.
Running time
O(n)
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 61: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/61.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Running time
O(n)
Search. How to find an internal diagonal?
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 62: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/62.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Running time
O(n)
Search. How to find an internal diagonal?
Brute-force solution:
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 63: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/63.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Running time
O(n)
Search. How to find an internal diagonal?
Brute-force solution:
Apply the test to each candidate segment.
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 64: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/64.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Running time
O(n)
Search. How to find an internal diagonal?
Brute-force solution:
Apply the test to each candidate segment.
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
O(n3)
![Page 65: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/65.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Running time
O(n)
Search. How to find an internal diagonal?
Brute-force solution:
Apply the test to each candidate segment.
Testing each candidate takes O(n) time,and there are
(n2
)of them.
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
O(n3)
![Page 66: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/66.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Running time
O(n)
Search. How to find an internal diagonal?
Brute-force solution:
Apply the test to each candidate segment.
Applying previous results:
1. Find a convex vertex, vi.2. Detect whether vi−1vi+1 is an internal diagonal.3. If so, report it.
Else, find the farthest vk from the segment vi−1vi+1, lying in the triangle vi−1vivi+1.
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
O(n3)
![Page 67: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/67.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Running time
O(n)
Search. How to find an internal diagonal?
Brute-force solution:
Apply the test to each candidate segment.
Applying previous results:
1. Find a convex vertex, vi.2. Detect whether vi−1vi+1 is an internal diagonal.3. If so, report it.
Else, find the farthest vk from the segment vi−1vi+1, lying in the triangle vi−1vivi+1.
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
O(n3)
O(n)
![Page 68: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/68.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Running time
O(n)
Search. How to find an internal diagonal? O(n)
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 69: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/69.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Running time
O(n)
Search. How to find an internal diagonal? O(n)
Partition. How to partition the polygon into two subpolygons?
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 70: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/70.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Running time
O(n)
Search. How to find an internal diagonal? O(n)
Partition. How to partition the polygon into two subpolygons?
From the diagonal found, create the sorted list of the vertices of the two subpolygons.
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 71: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/71.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Running time
O(n)
Search. How to find an internal diagonal? O(n)
Partition. How to partition the polygon into two subpolygons?
From the diagonal found, create the sorted list of the vertices of the two subpolygons.
O(n)
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 72: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/72.jpg)
Tringulating a polygon by inserting diagonals
Test. How to decide whether a given segment vivj is an internal diagonal?
Running time
O(n)
Search. How to find an internal diagonal? O(n)
Partition. How to partition the polygon into two subpolygons? O(n)
Total running time of the algorithm: O(n2)
It finds n− 3 diagonals and each one is found in O(n) time.
Procedure:1. Find an internal diagonal2. Decompose the polygon into two subpolygons3. Proceed recursively
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Input: v1, . . . , vn, sorted list of the vertices of a simple polygon P .
Output: List of internal diagonals of P , vivj , determining a triangulation of P .
![Page 73: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/73.jpg)
Is it possible to triangulate a polygon more efficiently?
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 74: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/74.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 75: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/75.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 76: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/76.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 77: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/77.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 78: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/78.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 79: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/79.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 80: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/80.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 81: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/81.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 82: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/82.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 83: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/83.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 84: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/84.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 85: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/85.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 86: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/86.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 87: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/87.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 88: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/88.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 89: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/89.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Triangulating a star-shaped polygon
Can be done in O(n) time. Posed as problem.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 90: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/90.jpg)
Is it possible to triangulate a polygon more efficiently?
Triangulating a convex polygon
Trivially done in O(n) time.
Triangulating a monotone polygon
It can also be done in O(n) time. In the following we will see how.
Triangulating a star-shaped polygon
Can be done in O(n) time. Posed as problem.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 91: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/91.jpg)
Monotone polygon
A polygon P is called monotone with respect to a direction r if, forevery line r′ orthogonal to r, the intersection P ∩ r′ is connected (i.e.,it is a segment, a point or the empty set).
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 92: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/92.jpg)
Monotone polygon
A polygon P is called monotone with respect to a direction r if, forevery line r′ orthogonal to r, the intersection P ∩ r′ is connected (i.e.,it is a segment, a point or the empty set).
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 93: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/93.jpg)
Monotone polygon
A polygon P is called monotone with respect to a direction r if, forevery line r′ orthogonal to r, the intersection P ∩ r′ is connected (i.e.,it is a segment, a point or the empty set).
y
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 94: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/94.jpg)
Monotone polygon
A polygon P is called monotone with respect to a direction r if, forevery line r′ orthogonal to r, the intersection P ∩ r′ is connected (i.e.,it is a segment, a point or the empty set).
y
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 95: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/95.jpg)
Monotone polygon
A polygon P is called monotone with respect to a direction r if, forevery line r′ orthogonal to r, the intersection P ∩ r′ is connected (i.e.,it is a segment, a point or the empty set).
y
Local characterization
A polygon is y-monotone if and only if it does not have any cusp.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 96: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/96.jpg)
Monotone polygon
A polygon P is called monotone with respect to a direction r if, forevery line r′ orthogonal to r, the intersection P ∩ r′ is connected (i.e.,it is a segment, a point or the empty set).
Local characterization
A polygon is y-monotone if and only if it does not have any cusp.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 97: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/97.jpg)
Monotone polygon
A polygon P is called monotone with respect to a direction r if, forevery line r′ orthogonal to r, the intersection P ∩ r′ is connected (i.e.,it is a segment, a point or the empty set).
Local characterization
A polygon is y-monotone if and only if it does not have any cusp.
A cusp is a reflex vertex v of the polygon such that its twoincident edges both lie to the same side of the horizontal linethrough v.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 98: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/98.jpg)
Monotone polygon
A polygon P is called monotone with respect to a direction r if, forevery line r′ orthogonal to r, the intersection P ∩ r′ is connected (i.e.,it is a segment, a point or the empty set).
Local characterization
A polygon is y-monotone if and only if it does not have any cusp.
A cusp is a reflex vertex v of the polygon such that its twoincident edges both lie to the same side of the horizontal linethrough v.
Proof:
If the polygon has a local maximum cusp v, an infinitesimaldownwards translation of the horizontal line through v wouldintersect the polygon in at least two connected components.
v
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 99: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/99.jpg)
Monotone polygon
A polygon P is called monotone with respect to a direction r if, forevery line r′ orthogonal to r, the intersection P ∩ r′ is connected (i.e.,it is a segment, a point or the empty set).
Local characterization
A polygon is y-monotone if and only if it does not have any cusp.
A cusp is a reflex vertex v of the polygon such that its twoincident edges both lie to the same side of the horizontal linethrough v.
Proof:
If the polygon has a local maximum cusp v, an infinitesimaldownwards translation of the horizontal line through v wouldintersect the polygon in at least two connected components.
If the polygon is not y-monotone, let r be a horizontal line intersecting the polygon in two ormore connected components. Consider two consecutive components, with facing endpoints pand q as in the figure. The polygon boundary needs to connect p and q. No matter whether itgoes above or below the horizontal line, it will have a cusp.
p q
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 100: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/100.jpg)
Monotone polygon
A polygon P is called monotone with respect to a direction r if, forevery line r′ orthogonal to r, the intersection P ∩ r′ is connected (i.e.,it is a segment, a point or the empty set).
Local characterization
A polygon is y-monotone if and only if it does not have any cusp.
A cusp is a reflex vertex v of the polygon such that its twoincident edges both lie to the same side of the horizontal linethrough v.
Proof:
If the polygon has a local maximum cusp v, an infinitesimaldownwards translation of the horizontal line through v wouldintersect the polygon in at least two connected components.
If the polygon is not y-monotone, let r be a horizontal line intersecting the polygon in two ormore connected components. Consider two consecutive components, with facing endpoints pand q as in the figure. The polygon boundary needs to connect p and q. No matter whether itgoes above or below the horizontal line, it will have a cusp.
p q
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 101: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/101.jpg)
Monotone polygon
A polygon P is called monotone with respect to a direction r if, forevery line r′ orthogonal to r, the intersection P ∩ r′ is connected (i.e.,it is a segment, a point or the empty set).
Local characterization
A polygon is y-monotone if and only if it does not have any cusp.
A cusp is a reflex vertex v of the polygon such that its twoincident edges both lie to the same side of the horizontal linethrough v.
Proof:
If the polygon has a local maximum cusp v, an infinitesimaldownwards translation of the horizontal line through v wouldintersect the polygon in at least two connected components.
If the polygon is not y-monotone, let r be a horizontal line intersecting the polygon in two ormore connected components. Consider two consecutive components, with facing endpoints pand q as in the figure. The polygon boundary needs to connect p and q. No matter whether itgoes above or below the horizontal line, it will have a cusp.
p q
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 102: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/102.jpg)
Monotone polygon
A polygon P is called monotone with respect to a direction r if, forevery line r′ orthogonal to r, the intersection P ∩ r′ is connected (i.e.,it is a segment, a point or the empty set).
Local characterization
A polygon is y-monotone if and only if it does not have any cusp.
A cusp is a reflex vertex v of the polygon such that its twoincident edges both lie to the same side of the horizontal linethrough v.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 103: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/103.jpg)
Monotone polygon
A polygon P is called monotone with respect to a direction r if, forevery line r′ orthogonal to r, the intersection P ∩ r′ is connected (i.e.,it is a segment, a point or the empty set).
y
Local characterization
A polygon is y-monotone if and only if it does not have any cusp.
A cusp is a reflex vertex v of the polygon such that its twoincident edges both lie to the same side of the horizontal linethrough v.
Corollary
If a polygon is y-monotone, then it can be decomposed into twoy-monotone non intersecting chains sharing their endpoints.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 104: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/104.jpg)
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 105: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/105.jpg)
Triangulating a monotone polygon
The vertices of the polygon P are processed by decreasing order of their y-coordinate.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 106: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/106.jpg)
Triangulating a monotone polygon
The vertices of the polygon P are processed by decreasing order of their y-coordinate.
During the process a queue Q is used to store the vertices that have already been visited butare still needed in order to generate the triangulation. Characteristics of Q:
- The topmost (i.e., largest y-coordinate) vertex in Q, is a convex vertex of the subpolygonP ′ still to be triangulated.
- All the remaining vertices in Q are reflex.- All the vertices in Q belong to the same monotone chain of P ′.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
1234
5
76
8 910
1112
1314 15
1617
18 19
P ′
![Page 107: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/107.jpg)
Triangulating a monotone polygon
The vertices of the polygon P are processed by decreasing order of their y-coordinate.
During the process a queue Q is used to store the vertices that have already been visited butare still needed in order to generate the triangulation. Characteristics of Q:
- The topmost (i.e., largest y-coordinate) vertex in Q, is a convex vertex of the subpolygonP ′ still to be triangulated.
- All the remaining vertices in Q are reflex.- All the vertices in Q belong to the same monotone chain of P ′.
Processing a vertex vi:
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
1234
5
76
8 910
1112
1314 15
1617
18 19
P ′
![Page 108: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/108.jpg)
Triangulating a monotone polygon
The vertices of the polygon P are processed by decreasing order of their y-coordinate.
During the process a queue Q is used to store the vertices that have already been visited butare still needed in order to generate the triangulation. Characteristics of Q:
- The topmost (i.e., largest y-coordinate) vertex in Q, is a convex vertex of the subpolygonP ′ still to be triangulated.
- All the remaining vertices in Q are reflex.- All the vertices in Q belong to the same monotone chain of P ′.
Processing a vertex vi:
• If vi belongs to the opposite chain, report the diagonals con-necting vi to every vertex of Q and delete them all from Q,except the last one. Add vi to Q.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 109: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/109.jpg)
Triangulating a monotone polygon
The vertices of the polygon P are processed by decreasing order of their y-coordinate.
During the process a queue Q is used to store the vertices that have already been visited butare still needed in order to generate the triangulation. Characteristics of Q:
- The topmost (i.e., largest y-coordinate) vertex in Q, is a convex vertex of the subpolygonP ′ still to be triangulated.
- All the remaining vertices in Q are reflex.- All the vertices in Q belong to the same monotone chain of P ′.
Processing a vertex vi:
• If vi belongs to the opposite chain, report the diagonals con-necting vi to every vertex of Q and delete them all from Q,except the last one. Add vi to Q.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 110: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/110.jpg)
Triangulating a monotone polygon
The vertices of the polygon P are processed by decreasing order of their y-coordinate.
During the process a queue Q is used to store the vertices that have already been visited butare still needed in order to generate the triangulation. Characteristics of Q:
- The topmost (i.e., largest y-coordinate) vertex in Q, is a convex vertex of the subpolygonP ′ still to be triangulated.
- All the remaining vertices in Q are reflex.- All the vertices in Q belong to the same monotone chain of P ′.
Processing a vertex vi:
• If vi belongs to the opposite chain, report the diagonals con-necting vi to every vertex of Q and delete them all from Q,except the last one. Add vi to Q.
• If vi belongs to the same chain and produces a reflex turn,add vi to Q.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 111: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/111.jpg)
Triangulating a monotone polygon
The vertices of the polygon P are processed by decreasing order of their y-coordinate.
During the process a queue Q is used to store the vertices that have already been visited butare still needed in order to generate the triangulation. Characteristics of Q:
- The topmost (i.e., largest y-coordinate) vertex in Q, is a convex vertex of the subpolygonP ′ still to be triangulated.
- All the remaining vertices in Q are reflex.- All the vertices in Q belong to the same monotone chain of P ′.
Processing a vertex vi:
• If vi belongs to the opposite chain, report the diagonals con-necting vi to every vertex of Q and delete them all from Q,except the last one. Add vi to Q.
• If vi belongs to the same chain and produces a reflex turn,add vi to Q.
• If vi belongs to the same chain and produces a convex turn,report the diagonal connecting vi to the penultimate elementof Q, delete the last element of Q and process vi again.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 112: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/112.jpg)
Triangulating a monotone polygon
The vertices of the polygon P are processed by decreasing order of their y-coordinate.
During the process a queue Q is used to store the vertices that have already been visited butare still needed in order to generate the triangulation. Characteristics of Q:
- The topmost (i.e., largest y-coordinate) vertex in Q, is a convex vertex of the subpolygonP ′ still to be triangulated.
- All the remaining vertices in Q are reflex.- All the vertices in Q belong to the same monotone chain of P ′.
Processing a vertex vi:
• If vi belongs to the opposite chain, report the diagonals con-necting vi to every vertex of Q and delete them all from Q,except the last one. Add vi to Q.
• If vi belongs to the same chain and produces a reflex turn,add vi to Q.
• If vi belongs to the same chain and produces a convex turn,report the diagonal connecting vi to the penultimate elementof Q, delete the last element of Q and process vi again.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 113: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/113.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18 19
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 114: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/114.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Queue state
1, 2
19
Start
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 115: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/115.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
3
1, 2, 3
19
Add
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 116: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/116.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
4
1, 2, 3, 4
19
Add
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 117: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/117.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
5
1, 2, 3, 4, 5
19
Add
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 118: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/118.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
6
1, 2, 3, 4, 5, 6
19
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Add
![Page 119: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/119.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
7
6, 7
19
Opposite chain
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 120: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/120.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
8
6, 8
19
Ear
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 121: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/121.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
9
6, 9
19
Ear
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 122: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/122.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
10
6, 9, 10
19
Add
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 123: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/123.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
11
6, 9, 10, 11
19
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Add
![Page 124: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/124.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
12
6, 9, 10, 11, 12
19
Add
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 125: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/125.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
13
6, 9, 10, 13
19
Ear
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 126: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/126.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
14
6, 9, 10, 14
19
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Ear
![Page 127: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/127.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
15
14, 15
19
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Opposite chain
![Page 128: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/128.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
16
15, 16
19
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Opposite chain
![Page 129: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/129.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
17
15, 17
19
Ear
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 130: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/130.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
18
15, 18
19
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Ear
![Page 131: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/131.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18
Current vertex:
Queue state:
19
18, 19
19
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Opposite chain
![Page 132: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/132.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18 19
End
Triangulating a monotone polygon
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 133: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/133.jpg)
1
2
34
5
7
6
89
10
1112
13
1415
16
17
18 19
Triangulating a monotone polygon
Running time: O(n)
Each vertex is removed fromthe queue Q in O(1) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 134: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/134.jpg)
Running time for triangulating a polygon:
• O(n2) by subtracting ears
• O(n2) by inserting diagonals
If the polygon is convex:
• O(n) trivially
If the polygon is monotone:
• O(n) scanning the monotone chains in order
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Summarizing
![Page 135: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/135.jpg)
Running time for triangulating a polygon:
• O(n2) by subtracting ears
• O(n2) by inserting diagonals
If the polygon is convex:
• O(n) trivially
If the polygon is monotone:
• O(n) scanning the monotone chains in order
Is it possible to be more efficient more general polygons?
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Summarizing
![Page 136: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/136.jpg)
Running time for triangulating a polygon:
• O(n2) by subtracting ears
• O(n2) by inserting diagonals
If the polygon is convex:
• O(n) trivially
If the polygon is monotone:
• O(n) scanning the monotone chains in order
1. Decompose the polygon into monotone subpolygons
2. Triangulate the monotone subpolygons
Is it possible to be more efficient more general polygons? Yes!
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Summarizing
![Page 137: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/137.jpg)
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 138: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/138.jpg)
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In order to create a monotone partition of a polygon,all cusps need to be “broken” by internal diagonals.
![Page 139: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/139.jpg)
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In order to create a monotone partition of a polygon,all cusps need to be “broken” by internal diagonals.
![Page 140: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/140.jpg)
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In order to create a monotone partition of a polygon,all cusps need to be “broken” by internal diagonals.
![Page 141: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/141.jpg)
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In order to create a monotone partition of a polygon,all cusps need to be “broken” by internal diagonals.
![Page 142: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/142.jpg)
This can be done starting from atrapezoidal decomposition of the polygon.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In order to create a monotone partition of a polygon,all cusps need to be “broken” by internal diagonals.
![Page 143: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/143.jpg)
This can be done starting from atrapezoidal decomposition of the polygon.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In order to create a monotone partition of a polygon,all cusps need to be “broken” by internal diagonals.
![Page 144: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/144.jpg)
This can be done starting from atrapezoidal decomposition of the polygon.
Connect each cusp with the opposite vertex in itstrapezoid (the upper trapezoid, if the cusp is a localmaximum, the lower one, if it is a local minimum).
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In order to create a monotone partition of a polygon,all cusps need to be “broken” by internal diagonals.
![Page 145: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/145.jpg)
This can be done starting from atrapezoidal decomposition of the polygon.
Connect each cusp with the opposite vertex in itstrapezoid (the upper trapezoid, if the cusp is a localmaximum, the lower one, if it is a local minimum).
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In order to create a monotone partition of a polygon,all cusps need to be “broken” by internal diagonals.
![Page 146: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/146.jpg)
This can be done starting from atrapezoidal decomposition of the polygon.
Connect each cusp with the opposite vertex in itstrapezoid (the upper trapezoid, if the cusp is a localmaximum, the lower one, if it is a local minimum).
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In order to create a monotone partition of a polygon,all cusps need to be “broken” by internal diagonals.
![Page 147: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/147.jpg)
This can be done starting from atrapezoidal decomposition of the polygon.
Connect each cusp with the opposite vertex in itstrapezoid (the upper trapezoid, if the cusp is a localmaximum, the lower one, if it is a local minimum).
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In order to create a monotone partition of a polygon,all cusps need to be “broken” by internal diagonals.
![Page 148: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/148.jpg)
This can be done starting from atrapezoidal decomposition of the polygon.
Connect each cusp with the opposite vertex in itstrapezoid (the upper trapezoid, if the cusp is a localmaximum, the lower one, if it is a local minimum).
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In order to create a monotone partition of a polygon,all cusps need to be “broken” by internal diagonals.
![Page 149: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/149.jpg)
This can be done starting from atrapezoidal decomposition of the polygon.
Connect each cusp with the opposite vertex in itstrapezoid (the upper trapezoid, if the cusp is a localmaximum, the lower one, if it is a local minimum).
Sweep line algorithm
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In order to create a monotone partition of a polygon,all cusps need to be “broken” by internal diagonals.
This gives rise to a correct algorithm:
• The diagonals do not intersect, because theybelong to different trapezoids.
• The polygon ends up decomposed into mono-tone subpolygons.
![Page 150: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/150.jpg)
Sweep line algorithm
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 151: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/151.jpg)
Sweep line algorithm
A straight line (horitzontal, in this case) scans the object (the polygon) and allows detectingand constructing the desired elements (cusps, trapezoids, diagonals), leaving the problem solvedbehind it. The sweeping process is discretized.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 152: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/152.jpg)
Sweep line algorithm
A straight line (horitzontal, in this case) scans the object (the polygon) and allows detectingand constructing the desired elements (cusps, trapezoids, diagonals), leaving the problem solvedbehind it. The sweeping process is discretized.
Essential elements of a sweep line algorithm:
• Events queue
Priority queue keeping the information of the algorithm stops. In our problem, the eventswill be the vertices of the polygon, sorted by their y-coordinate, all known in advance.
• Sweep line
Data structure storing the information of the portion of the object intersected by thesweep line. It gets updated at each event. In our problem, it will contain the informationof the edges of the polygon intersected by the sweep line, sorted by abscissa, as well asthe list of active trapezoids and ther upper vertex.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 153: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/153.jpg)
Updating the sweep line:
• Passing vertex: replace
• Local minimum cusp: delete
• Local maximum cusp: insert
• Initial vertex: insert
• Final vertex: delete
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 154: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/154.jpg)
Updating the sweep line:
• Passing vertex: replace
• Local minimum cusp: delete
• Local maximum cusp: insert
• Initial vertex: insert
• Final vertex: delete
em en
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 155: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/155.jpg)
Updating the sweep line:
• Passing vertex: replace
• Local minimum cusp: delete
• Local maximum cusp: insert
• Initial vertex: insert
• Final vertex: delete
em en
ei−1
ei ej
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 156: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/156.jpg)
Updating the sweep line:
• Passing vertex: replace
• Local minimum cusp: delete
• Local maximum cusp: insert
• Initial vertex: insert
• Final vertex: delete
em en
ei−1ei
ejek
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 157: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/157.jpg)
Updating the sweep line:
• Passing vertex: replace
• Local minimum cusp: delete
• Local maximum cusp: insert
• Initial vertex: insert
• Final vertex: delete
em eneiei−1ek ej
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 158: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/158.jpg)
Updating the sweep line:
• Passing vertex: replace
• Local minimum cusp: delete
• Local maximum cusp: insert
• Initial vertex: insert
• Final vertex: delete
em enei−1ei
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 159: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/159.jpg)
Updating the sweep line:
• Passing vertex: replace
• Local minimum cusp: delete
• Local maximum cusp: insert
• Initial vertex: insert
• Final vertex: delete
em en
ei−1 ei
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 160: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/160.jpg)
Updating the sweep line:
• Passing vertex: replace
• Local minimum cusp: delete
• Local maximum cusp: insert
• Initial vertex: insert
• Final vertex: delete
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In addition, eventually updatethe information of the upper ver-tex of the starting trapezoid.
![Page 161: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/161.jpg)
Updating the sweep line:
• Passing vertex: replace
• Local minimum cusp: delete
• Local maximum cusp: insert
• Initial vertex: insert
• Final vertex: delete
em en
ei−1
ei ej
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In addition, eventually updatethe information of the upper ver-tex of the starting trapezoid.
![Page 162: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/162.jpg)
Updating the sweep line:
• Passing vertex: replace
• Local minimum cusp: delete
• Local maximum cusp: insert
• Initial vertex: insert
• Final vertex: delete
em en
ei−1ei
ejek
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In addition, eventually updatethe information of the upper ver-tex of the starting trapezoid.
![Page 163: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/163.jpg)
Updating the sweep line:
• Passing vertex: replace
• Local minimum cusp: delete
• Local maximum cusp: insert
• Initial vertex: insert
• Final vertex: delete
em eneiei−1ek ej
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In addition, eventually updatethe information of the upper ver-tex of the starting trapezoid.
![Page 164: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/164.jpg)
Updating the sweep line:
• Passing vertex: replace
• Local minimum cusp: delete
• Local maximum cusp: insert
• Initial vertex: insert
• Final vertex: delete
em enei−1ei
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In addition, eventually updatethe information of the upper ver-tex of the starting trapezoid.
![Page 165: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/165.jpg)
Updating the sweep line:
• Passing vertex: replace
• Local minimum cusp: delete
• Local maximum cusp: insert
• Initial vertex: insert
• Final vertex: delete
em en
ei−1 ei
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
In addition, eventually updatethe information of the upper ver-tex of the starting trapezoid.
![Page 166: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/166.jpg)
As for diagonals:
• Passing vertex: nothing
• Local minimum cusp: wait until it can be connect to the final vertex of the startingtrapezoid
• Local maximum cusp: connect it with the initial vertex of the ending trapezoid
• Initial vertex: nothing
• Final vertex: nothing
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 167: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/167.jpg)
As for diagonals:
• Passing vertex: nothing
• Local minimum cusp: wait until it can be connect to the final vertex of the startingtrapezoid
• Local maximum cusp: connect it with the initial vertex of the ending trapezoid
• Initial vertex: nothing
• Final vertex: nothing
em en
ei−1
ei ej
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 168: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/168.jpg)
As for diagonals:
• Passing vertex: nothing
• Local minimum cusp: wait until it can be connect to the final vertex of the startingtrapezoid
• Local maximum cusp: connect it with the initial vertex of the ending trapezoid
• Initial vertex: nothing
• Final vertex: nothing
em en
ei−1ei
ejek
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 169: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/169.jpg)
As for diagonals:
• Passing vertex: nothing
• Local minimum cusp: wait until it can be connect to the final vertex of the startingtrapezoid
• Local maximum cusp: connect it with the initial vertex of the ending trapezoid
• Initial vertex: nothing
• Final vertex: nothing
em eneiei−1ek ej
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 170: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/170.jpg)
As for diagonals:
• Passing vertex: nothing
• Local minimum cusp: wait until it can be connect to the final vertex of the startingtrapezoid
• Local maximum cusp: connect it with the initial vertex of the ending trapezoid
• Initial vertex: nothing
• Final vertex: nothing
em enei−1ei
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 171: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/171.jpg)
As for diagonals:
• Passing vertex: nothing
• Local minimum cusp: wait until it can be connect to the final vertex of the startingtrapezoid
• Local maximum cusp: connect it with the initial vertex of the ending trapezoid
• Initial vertex: nothing
• Final vertex: nothing
em en
ei−1 ei
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 172: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/172.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
1
vertex
sweep line
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e1, e19
v1
![Page 173: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/173.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
18
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e18, e17
e1, e19
v1
v18
![Page 174: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/174.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
3
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e2, e3
e1, e19, e18, e17
v1 v18
![Page 175: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/175.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
3
Diagonal v1− v3
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e2, e3
e1, e19, e18, e17
v1 v18
![Page 176: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/176.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
19
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e1, e2, e3, e19, e18, e17
v3 v3 v18
![Page 177: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/177.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
2
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e1, e2, e3, e17
v3 v19
![Page 178: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/178.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
17
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e3, e17
e16
v19
![Page 179: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/179.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
17
Diagonal v19− v17
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e3, e17
e16
v19
![Page 180: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/180.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
15
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e3, e16
e15, e14
v17
v15
![Page 181: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/181.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
16
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e3, e16, e15, e14
v17 v15
![Page 182: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/182.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
5
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e3, e14
e5, e4
v16
v5
![Page 183: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/183.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
6
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e5, e4, e3, e14
e6
v5 v16
![Page 184: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/184.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
7
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e6, e4, e3, e14
e7
v6 v16
![Page 185: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/185.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
14
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e7, e4, e3, e14
e13
v7 v16
![Page 186: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/186.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
14
Diagonal v16− v14
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e7, e4, e3, e14
e13
v7 v16
![Page 187: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/187.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
4
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e7, e4, e3, e13
v7 v14
![Page 188: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/188.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
9
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e7, e13
e8, e9
v4
![Page 189: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/189.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
9
Diagonal v4− v9
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e7, e13
e8, e9
v4
![Page 190: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/190.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
13
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e7, e8, e9, e13
e12
v9 v9
![Page 191: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/191.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
8
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e7, e8, e9, e12
v9 v13
![Page 192: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/192.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
11
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e9, e12
e10, e11
v13
![Page 193: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/193.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
11
Diagonal v13− v11
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e9, e12
e10, e11
v13
![Page 194: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/194.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
12
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
e9, e10, e11, e12
v11 v11
![Page 195: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/195.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
vertex
sweep line
10
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
v11
e9, e10
![Page 196: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/196.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 197: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/197.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 198: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/198.jpg)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1516
17
18
19Running time:
• Sorting the vertices in the event queue:O(n log n) time.
• On each event, update sweep line: replace,insert or delete vertices or edges in O(log n)time each.
• There are n events.
The algorithm runs in O(n log n) time.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
Monotone partition
![Page 199: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/199.jpg)
Summarizing
Running time of polygon triangulation:
• O(n2) by substracting ears
• O(n2) by inserting diagonals
• O(n log n) by:
1. Decomposing the polygon into monotone subpolygons in O(n log n) time
2. Triangulating each monotone subpolygon in O(n) time
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 200: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/200.jpg)
Summarizing
Running time of polygon triangulation:
• O(n2) by substracting ears
• O(n2) by inserting diagonals
• O(n log n) by:
1. Decomposing the polygon into monotone subpolygons in O(n log n) time
2. Triangulating each monotone subpolygon in O(n) time
Is it possible to triangulate a polygon in o(n log n) time?
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 201: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/201.jpg)
Summarizing
Running time of polygon triangulation:
• O(n2) by substracting ears
• O(n2) by inserting diagonals
• O(n log n) by:
1. Decomposing the polygon into monotone subpolygons in O(n log n) time
2. Triangulating each monotone subpolygon in O(n) time
Is it possible to triangulate a polygon in o(n log n) time?
Yes.There exists an algorithm to triangulate an n-gon in O(n) time, but it is too complicatedand, in practice, it is not used.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 202: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/202.jpg)
STORING THEPOLYGON TRIANGULATION
![Page 203: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/203.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
Possible options, advantages and disadvantages
![Page 204: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/204.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
Possible options, advantages and disadvantages
Storing the list of all the diagonals of the triangulation
![Page 205: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/205.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
Possible options, advantages and disadvantages
Storing the list of all the diagonals of the triangulation
Advantage: small memory usage.
Disadvantage: it suffices to draw the triangulation, but it does not contain the proximityinformation. For example, finding the triangles incident to a given diagonal, or finding theneighbors of a given triangle are expensive computations.
![Page 206: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/206.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
Possible options, advantages and disadvantages
Storing the list of all the diagonals of the triangulation
Advantage: small memory usage.
Disadvantage: it suffices to draw the triangulation, but it does not contain the proximityinformation. For example, finding the triangles incident to a given diagonal, or finding theneighbors of a given triangle are expensive computations.
For each triangle, storing the sorted list of its vertices and edges, as well as the sorted list ofits neighbors.
![Page 207: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/207.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
Possible options, advantages and disadvantages
Storing the list of all the diagonals of the triangulation
Advantage: small memory usage.
Disadvantage: it suffices to draw the triangulation, but it does not contain the proximityinformation. For example, finding the triangles incident to a given diagonal, or finding theneighbors of a given triangle are expensive computations.
For each triangle, storing the sorted list of its vertices and edges, as well as the sorted list ofits neighbors.
Advantage: allows to quickly recover neighborhood information.
Disadvantage: the stored data is redundant and it uses more space than required.
![Page 208: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/208.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
Possible options, advantages and disadvantages
Storing the list of all the diagonals of the triangulation
Advantage: small memory usage.
Disadvantage: it suffices to draw the triangulation, but it does not contain the proximityinformation. For example, finding the triangles incident to a given diagonal, or finding theneighbors of a given triangle are expensive computations.
For each triangle, storing the sorted list of its vertices and edges, as well as the sorted list ofits neighbors.
Advantage: allows to quickly recover neighborhood information.
Disadvantage: the stored data is redundant and it uses more space than required.
The data structure which is most frequently used to store a triangulation is the DCEL (doublyconnected edge list).
The DCEL is also used to store plane partitions, polyhedra, meshes, etc.
![Page 209: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/209.jpg)
Storing the polygon triangulation
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
![Page 210: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/210.jpg)
Storing the polygon triangulation
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
![Page 211: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/211.jpg)
Storing the polygon triangulation
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
v1
v2
v3
v4
v5
v6
v7
v8
v9
![Page 212: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/212.jpg)
Storing the polygon triangulation
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
![Page 213: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/213.jpg)
Storing the polygon triangulation
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
f∞
f5
f4
f1
f3
f6
f2
f7
![Page 214: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/214.jpg)
Storing the polygon triangulation
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
v1
v2
v3
v4
v5
v6
v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
f∞
f5
f4
f1
f3
f6
f2
f7
![Page 215: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/215.jpg)
Storing the polygon triangulation
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
f∞
f5
f4
f1
f3
f6f2
f7
![Page 216: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/216.jpg)
Storing the polygon triangulation
Table of vertices
v x y e
1 x1 y1 12 x2 y2 13 x3 y3 24 x4 y4 105 x5 y5 46 x6 y6 67 x7 y7 108 x8 y8 89 x9 y9 9
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
f∞
f5
f4
f1
f3
f6f2
f7
![Page 217: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/217.jpg)
Storing the polygon triangulation
f e
1 112 43 104 115 16 67 2∞ 9
Table of faces
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
f∞
f5
f4
f1
f3
f6f2
f7
![Page 218: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/218.jpg)
Storing the polygon triangulation
DCEL
e vB vE fL fR eP eN
1 1 2 5 ∞ 9 22 2 3 7 ∞ 13 33 4 3 ∞ 7 4 24 4 5 2 ∞ 15 55 5 6 2 ∞ 4 66 6 7 6 ∞ 15 77 7 8 4 ∞ 11 88 8 9 4 ∞ 7 99 9 1 5 ∞ 12 1
10 4 7 3 6 13 611 9 7 4 1 8 1412 2 9 5 1 1 1113 2 4 3 7 14 314 2 7 1 3 12 1015 4 6 6 2 10 5
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
f∞
f5
f4
f1
f3
f6f2
f7
![Page 219: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/219.jpg)
Storing the polygon triangulation
e
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
![Page 220: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/220.jpg)
Storing the polygon triangulation
e
vE
vB
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
![Page 221: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/221.jpg)
Storing the polygon triangulation
e
vE
vB
fL
fR
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
![Page 222: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/222.jpg)
Storing the polygon triangulation
e
vE
vB
fL
fR
eN
eP
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
![Page 223: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/223.jpg)
Storing the polygon triangulation
DCEL
e vB vE fL fR eP eN
1 1 2 5 ∞ 9 22 2 3 7 ∞ 13 33 4 3 ∞ 7 4 24 4 5 2 ∞ 15 55 5 6 2 ∞ 4 66 6 7 6 ∞ 15 77 7 8 4 ∞ 11 88 8 9 4 ∞ 7 99 9 1 5 ∞ 12 1
10 4 7 3 6 13 611 9 7 4 1 8 1412 2 9 5 1 1 1113 2 4 3 7 14 314 2 7 1 3 12 1015 4 6 6 2 10 5
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
f∞
f5
f4
f1
f3
f6f2
f7
e
vE
vB
fL
fR
eN
eP
![Page 224: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/224.jpg)
Storing the polygon triangulation
DCEL
Storage space
• For each face:
1 pointer
• For each vertex:
2 coordinates + 1 pointer
• For each edge:
6 pointers
In total, the storage space is O(n).
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
f∞
f5
f4
f1
f3
f6f2
f7
![Page 225: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/225.jpg)
Storing the polygon triangulation
DCEL
There are other DCEL variants, as for example:
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
![Page 226: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/226.jpg)
Storing the polygon triangulation
DCEL
There are other DCEL variants, as for example:
ee′
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
![Page 227: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/227.jpg)
Storing the polygon triangulation
DCEL
There are other DCEL variants, as for example:
ee′
e −→ vB , fR, eN , e′
e′ −→ vB , fR, eN , e
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
![Page 228: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/228.jpg)
Storing the polygon triangulation
DCEL
There are other DCEL variants, as for example:
ee′
e −→ vB , fR, eN , e′
e′ −→ vB , fR, eN , e
vB(e)
fR(e)
eN (e)
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
![Page 229: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/229.jpg)
Storing the polygon triangulation
DCEL
There are other DCEL variants, as for example:
ee′
e −→ vB , fR, eN , e′
e′ −→ vB , fR, eN , e
vB(e)
fR(e)
eN (e)vB(e
′)
fR(e′)
eN (e′)
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
![Page 230: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/230.jpg)
Storing the polygon triangulation
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
f∞
f5
f4
f1
f3
f6f2
f7
![Page 231: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/231.jpg)
Storing the polygon triangulation
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
f∞
f5
f4
f1
f3
f6f2
f7
e vB vE fL fR eP eN
1 1 2 5 ∞ 9 22 2 3 7 ∞ 13 33 4 3 ∞ 7 4 24 4 5 2 ∞ 15 55 5 6 2 ∞ 4 66 6 7 6 ∞ 15 77 7 8 4 ∞ 11 88 8 9 4 ∞ 7 99 9 1 5 ∞ 12 1
10 4 7 3 6 13 611 9 7 4 1 8 1412 2 9 5 1 1 1113 2 4 3 7 14 314 2 7 1 3 12 1015 4 6 6 2 10 5
![Page 232: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/232.jpg)
Storing the polygon triangulation
DCEL
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
f∞
f5
f4
f1
f3
f6f2
f7
e vB fR eN e′
1 1 ∞ 2 1’2 2 ∞ 3 2’3 4 7 2 3’4 4 ∞ 5 4’5 5 ∞ 6 5’6 6 ∞ 7 6’7 7 ∞ 8 7’8 8 ∞ 9 8’9 9 ∞ 1 9’
10 4 6 6 10’11 9 1 14 11’12 2 1 11 12’13 2 7 3 13’14 2 3 10 14’15 4 2 5 15’1’ 2 5 9 12’ 3 7 13 23’ 3 ∞ 4 34’ 5 2 15 4
5’ 6 2 4 56’ 7 6 15 67’ 8 4 11 78’ 9 4 7 89’ 1 5 12 9
10’ 7 3 13 1011’ 7 4 8 1112’ 9 5 1 1213’ 4 3 14 1314’ 7 1 12 1415’ 6 6 10 15
![Page 233: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/233.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
![Page 234: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/234.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 1: substracting ears
![Page 235: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/235.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 1: substracting ears
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
f∞
![Page 236: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/236.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 1: substracting ears
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
f∞
Initialize
![Page 237: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/237.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 1: substracting ears
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
f∞
Initialize
Table of vertices
v x y e
1 x1 y1 12 x2 y2 23 x3 y3 34 x4 y4 45 x5 y5 56 x6 y6 67 x7 y7 78 x8 y8 89 x9 y9 9
![Page 238: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/238.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 1: substracting ears
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
f∞
Initialize
f e
∞ 9
Table of faces
![Page 239: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/239.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 1: substracting ears
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
f∞
Initialize
DCEL
e vB vE fL fR eP eN
1 1 2 ∞ 22 2 3 ∞ 33 3 4 ∞ 44 4 5 ∞ 55 5 6 ∞ 66 6 7 ∞ 77 7 8 ∞ 88 8 9 ∞ 99 9 1 ∞ 1
![Page 240: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/240.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 1: substracting ears
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
f∞
Initialize
e vB vE fL fR eP eN
1 1 2 ∞ 22 2 3 ∞ 33 4 3 ∞ 44 4 5 ∞ 55 5 6 ∞ 66 6 7 ∞ 77 7 8 ∞ 88 8 9 ∞ 99 9 1 ∞ 1
DCEL
![Page 241: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/241.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 1: substracting ears
Advance
v1
v2
v9
e1
e9
![Page 242: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/242.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 1: substracting ears
Advance
f5e12
v1
v2
v9
e1
e9
![Page 243: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/243.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 1: substracting ears
Advance
f5e12
v1
v2
v9
e1
e9
f e
5 9
Table of faces
![Page 244: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/244.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 1: substracting ears
Advance
f5e12
v1
v2
v9
e1
e9
f e
5 9
Table of faces
DCEL
e vB vE fL fR eP eN
1 1 2 5 ∞ 9 29 9 1 5 ∞ 12 1
12 2 9 5 1
![Page 245: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/245.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 2: inserting diagonals
![Page 246: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/246.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 2: inserting diagonals
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
f∞
![Page 247: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/247.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 2: inserting diagonals
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
f∞
Initialize
![Page 248: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/248.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 2: inserting diagonals
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
f∞
Initialize
Table of vertices
v x y e
1 x1 y1 12 x2 y2 23 x3 y3 34 x4 y4 45 x5 y5 56 x6 y6 67 x7 y7 78 x8 y8 89 x9 y9 9
![Page 249: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/249.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 2: inserting diagonals
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
f∞
Initialize
f e
∞ 9
Table of faces
![Page 250: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/250.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 2: inserting diagonals
v7
v6
v4
e6
e10f6
e15
Base step
![Page 251: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/251.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 2: inserting diagonals
v7
v6
v4
e6
e10f6
e15
Base step
f e
6 10
Table of faces
![Page 252: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/252.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 2: inserting diagonals
v7
v6
v4
e6
e10f6
e15
Base step
f e
6 10
Table of faces
DCEL
e vB vE fL fR eP eN
6 6 7 6 ∞ 15 1010 7 4 6 ∞ 6 1515 4 6 6 ∞ 10 6
![Page 253: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/253.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 2: inserting diagonals
Merge step
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
f∞
f5
f4
f1
f3
f6f2
f7
![Page 254: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/254.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 2: inserting diagonals
Merge step
DCEL 1
e vB vE fL fR eP eN
1 1 2 5 ∞ 9 1414 2 7 1 ∞ 12 7
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
f∞
f5
f4
f1
f3
f6f2
f7
DCEL 2
e vB vE fL fR eP eN
6 6 7 6 ∞ 15 1414 2 7 ∞ 3 2 10
![Page 255: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/255.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 2: inserting diagonals
Merge step
DCEL 1
e vB vE fL fR eP eN
1 1 2 5 ∞ 9 1414 2 7 1 ∞ 12 7
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
f∞
f5
f4
f1
f3
f6f2
f7
DCEL 2
e vB vE fL fR eP eN
6 6 7 6 ∞ 15 1414 2 7 ∞ 3 2 10
![Page 256: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/256.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 2: inserting diagonals
Merge step
DCEL 1
e vB vE fL fR eP eN
1 1 2 5 ∞ 9 1414 2 7 1 ∞ 12 7
v1
v2
v3
v4
v5
v6v7
v8
v9
e1
e2 e3
e4
e5
e6
e7
e8
e9
e10
e11
e12
e13
e14 e15
f∞
f5
f4
f1
f3
f6f2
f7
DCEL 2
e vB vE fL fR eP eN
6 6 7 6 ∞ 15 1414 2 7 ∞ 3 2 10
Merged DCEL
e vB vE fL fR eP eN
1 1 2 5 ∞ 9 26 6 7 6 ∞ 15 7
14 2 7 1 3 12 10
![Page 257: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/257.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 3:
![Page 258: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/258.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 3:
1. Decompose into monotone polygons
2. Triangulate monotone pieces
![Page 259: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/259.jpg)
Storing the polygon triangulation
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
How to build the DCEL
Algorithm 3:
1. Decompose into monotone polygons
2. Triangulate monotone pieces
Computing the DCEL is done by combining previous strategies:
• Separating ears for triangulating each monotone subpolygon.
• Merging DCELs for putting together the monotone pieces.
![Page 260: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/260.jpg)
WHAT HAPPENS IN 3D?
![Page 261: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/261.jpg)
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
WHAT HAPPENS IN 3D?
A polyhedron that can be tetrahedralized :
![Page 262: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/262.jpg)
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
WHAT HAPPENS IN 3D?
A cube can be decomposed into 6 tetrahedra...
![Page 263: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/263.jpg)
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
WHAT HAPPENS IN 3D?
A cube can be decomposed into 6 tetrahedra...but also into 5!
![Page 264: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/264.jpg)
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
WHAT HAPPENS IN 3D?
A polyhedron that cannot be tetrahedralized:
Schonhardt polyhedron
Photo from pinshape.com (designed by mathgrrl)
Smallest polyhedron that cannot be tetrahedralized
Figure from the book by Devadoss and O’Rourke
![Page 265: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/265.jpg)
TO LEARN MORE
• J. O’Rourke, Computational Geometry in C (2nd ed.), Cambridge University Press,1998.
• M. de Berg, O. Cheong, M. van Kreveld, M. Overmars, Computational Geometry:Algorithms and Applications (3rd rev. ed.), Springer, 2008.
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS
![Page 266: Universitat Politcnica de Catalunya Facultat d'Informatica ...dccg.upc.edu/people/vera/wp-content/uploads/2013/06/GeoC-Triangulating... · the triangle v i 1 v i v i+1. Let v i be](https://reader033.fdocuments.in/reader033/viewer/2022041806/5e54a9a94f8aa626b51b0ff8/html5/thumbnails/266.jpg)
TO LEARN MORE
• J. O’Rourke, Computational Geometry in C (2nd ed.), Cambridge University Press,1998.
• M. de Berg, O. Cheong, M. van Kreveld, M. Overmars, Computational Geometry:Algorithms and Applications (3rd rev. ed.), Springer, 2008.
A NICE APPLICATION
The art gallery theorem
• J. O’Rourke, Art Gallery Theorems and Algorithms, Oxford University Press, 1987.http://maven.smith.edu/∼orourke/books/ArtGalleryTheorems/art.html
Computational Geometry, Facultat d’Informatica de Barcelona, UPC
TRIANGULATING POLYGONS