Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann...
-
Upload
louise-york -
Category
Documents
-
view
216 -
download
2
Transcript of Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann...
![Page 1: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/1.jpg)
Convex Hulls
Computational Geometry, WS 2007/08Lecture 2 – Supplementary
Prof. Dr. Thomas Ottmann
Algorithmen & Datenstrukturen, Institut für InformatikFakultät für Angewandte WissenschaftenAlbert-Ludwigs-Universität Freiburg
![Page 2: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/2.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 2
Area of Triangle
• Underlying idea:– For every edge, compute between it and a given line (or
point).– Sum the area in a predetermined order.
• Generalizable for any polygon.
![Page 3: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/3.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 3
Area of Triangle
• Use x-axis line as reference.
• Compute in clockwise order.
(x0,y0)
(x1,y1)
(x2,y2)
![Page 4: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/4.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 4
Area of Triangle
½ (x1 – x0 )(y0 + y1 )
(x0,y0)
(x1,y1)
(x2,y2)
![Page 5: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/5.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 5
Area of Triangle
½ (x1 – x0 )(y0 + y1 )
+
½ (x2 – x1 )(y1 + y2 )
(x0,y0)
(x1,y1)
(x2,y2)
![Page 6: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/6.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 6
Area of Triangle
½ (x1 – x0 )(y0 + y1 )
+
½ (x2 – x1 )(y1 + y2 )
+
½ (x0 – x2 )(y2 + y0 )(x0,y0)
(x1,y1)
(x2,y2)
![Page 7: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/7.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 7
Area of Triangle
½ (x1 – x0 )(y0 + y1 )
+
½ (x2 – x1 )(y1 + y2 )
+
½ (x0 – x2 )(y2 + y0 )
(x0,y0)
(x1,y1)
(x2,y2)
= ½ [(x1 – x0 )(y0 + y1 ) + (x2 – x1 )(y1 + y2 ) + (x0 – x2 )(y2 + y0 )]
= ½ [ x1y0 + x1y1 – x0y0 – x0y1 + x2y1 + x2y2 – x1y1 – x1y2
+ x0y2 + x0y0 – x2y2 – x2y0 ]
= ½ [ x1y0 + x2y1 + x0y2 – x0y1 – x1y2 – x2y0 ]
![Page 8: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/8.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 8
Area of Triangle
(x0,y0)
(x1,y1)
(x2,y2)
| x0 y0 1 |
| x1 y1 1 |
| x2 y2 1 |Area of triangle = ½
![Page 9: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/9.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 9
Convex Hull – Divide & Conquer
• Split set into two, compute convex hull of both, combine.
![Page 10: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/10.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 10
Convex Hull – Divide & Conquer
• Split set into two, compute convex hull of both, combine.
![Page 11: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/11.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 11
Convex Hull – Divide & Conquer
• Split set into two, compute convex hull of both, combine.
![Page 12: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/12.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 12
Convex Hull – Divide & Conquer
• Split set into two, compute convex hull of both, combine.
![Page 13: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/13.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 13
Convex Hull – Divide & Conquer
• Split set into two, compute convex hull of both, combine.
![Page 14: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/14.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 14
Convex Hull – Divide & Conquer
• Split set into two, compute convex hull of both, combine.
![Page 15: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/15.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 15
Convex Hull – Divide & Conquer
• Split set into two, compute convex hull of both, combine.
![Page 16: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/16.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 16
Convex Hull – Divide & Conquer
• Split set into two, compute convex hull of both, combine.
![Page 17: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/17.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 17
Convex Hull – Divide & Conquer
• Split set into two, compute convex hull of both, combine.
![Page 18: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/18.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 18
Convex Hull – Divide & Conquer
• Split set into two, compute convex hull of both, combine.
![Page 19: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/19.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 19
Convex Hull – Divide & Conquer
• Split set into two, compute convex hull of both, combine.
![Page 20: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/20.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 20
Convex Hull – Divide & Conquer
• Merging two convex hulls.
![Page 21: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/21.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 21
Convex Hull – Divide & Conquer
• Merging two convex hulls: (i) Find the lower tangent.
![Page 22: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/22.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 22
Convex Hull – Divide & Conquer
• Merging two convex hulls: (i) Find the lower tangent.
![Page 23: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/23.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 23
Convex Hull – Divide & Conquer
• Merging two convex hulls: (i) Find the lower tangent.
![Page 24: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/24.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 24
Convex Hull – Divide & Conquer
• Merging two convex hulls: (i) Find the lower tangent.
![Page 25: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/25.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 25
Convex Hull – Divide & Conquer
• Merging two convex hulls: (i) Find the lower tangent.
![Page 26: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/26.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 26
Convex Hull – Divide & Conquer
• Merging two convex hulls: (i) Find the lower tangent.
![Page 27: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/27.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 27
Convex Hull – Divide & Conquer
• Merging two convex hulls: (i) Find the lower tangent.
![Page 28: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/28.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 28
Convex Hull – Divide & Conquer
• Merging two convex hulls: (i) Find the lower tangent.
![Page 29: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/29.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 29
Convex Hull – Divide & Conquer
• Merging two convex hulls: (i) Find the lower tangent.
![Page 30: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/30.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 30
Convex Hull – Divide & Conquer
• Merging two convex hulls: (ii) Find the upper tangent.
![Page 31: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/31.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 31
Convex Hull – Divide & Conquer
• Merging two convex hulls: (ii) Find the upper tangent.
![Page 32: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/32.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 32
Convex Hull – Divide & Conquer
• Merging two convex hulls: (ii) Find the upper tangent.
![Page 33: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/33.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 33
Convex Hull – Divide & Conquer
• Merging two convex hulls: (ii) Find the upper tangent.
![Page 34: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/34.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 34
Convex Hull – Divide & Conquer
• Merging two convex hulls: (ii) Find the upper tangent.
![Page 35: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/35.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 35
Convex Hull – Divide & Conquer
• Merging two convex hulls: (ii) Find the upper tangent.
![Page 36: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/36.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 36
Convex Hull – Divide & Conquer
• Merging two convex hulls: (ii) Find the upper tangent.
![Page 37: Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.](https://reader030.fdocuments.in/reader030/viewer/2022032722/56649cef5503460f949bdac5/html5/thumbnails/37.jpg)
Computational Geometry, WS 2007/08Prof. Dr. Thomas Ottmann 37
Convex Hull – Divide & Conquer
• Merging two convex hulls: (iii) Eliminate non-hull edges.