Download presentation
Presentation is loading. Please wait.
Published byLouise York Modified over 9 years ago
1
Convex Hulls Computational Geometry, WS 2007/08 Lecture 2 – Supplementary Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für Angewandte Wissenschaften Albert-Ludwigs-Universität Freiburg
2
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann2 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.
3
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann3 Area of Triangle Use x-axis line as reference. Compute in clockwise order. (x0,y0)(x0,y0) (x1,y1)(x1,y1) (x2,y2)(x2,y2)
4
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann4 Area of Triangle ½ ( x 1 – x 0 )( y 0 + y 1 ) (x0,y0)(x0,y0) (x1,y1)(x1,y1) (x2,y2)(x2,y2)
5
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann5 Area of Triangle ½ ( x 1 – x 0 )( y 0 + y 1 ) + ½ ( x 2 – x 1 )( y 1 + y 2 ) (x0,y0)(x0,y0) (x1,y1)(x1,y1) (x2,y2)(x2,y2)
6
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann6 Area of Triangle ½ ( x 1 – x 0 )( y 0 + y 1 ) + ½ ( x 2 – x 1 )( y 1 + y 2 ) + ½ ( x 0 – x 2 )( y 2 + y 0 ) (x0,y0)(x0,y0) (x1,y1)(x1,y1) (x2,y2)(x2,y2)
7
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann7 Area of Triangle ½ ( x 1 – x 0 )( y 0 + y 1 ) + ½ ( x 2 – x 1 )( y 1 + y 2 ) + ½ ( x 0 – x 2 )( y 2 + y 0 ) (x0,y0)(x0,y0) (x1,y1)(x1,y1) (x2,y2)(x2,y2) = ½ [( x 1 – x 0 )( y 0 + y 1 ) + ( x 2 – x 1 )( y 1 + y 2 ) + ( x 0 – x 2 )( y 2 + y 0 )] = ½ [ x 1 y 0 + x 1 y 1 – x 0 y 0 – x 0 y 1 + x 2 y 1 + x 2 y 2 – x 1 y 1 – x 1 y 2 + x 0 y 2 + x 0 y 0 – x 2 y 2 – x 2 y 0 ] = ½ [ x 1 y 0 + x 2 y 1 + x 0 y 2 – x 0 y 1 – x 1 y 2 – x 2 y 0 ]
8
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann8 Area of Triangle (x0,y0)(x0,y0) (x1,y1)(x1,y1) (x2,y2)(x2,y2) | x 0 y 0 1 | | x 1 y 1 1 | | x 2 y 2 1 | Area of triangle = ½
9
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann9 Convex Hull – Divide & Conquer Split set into two, compute convex hull of both, combine.
10
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann10 Convex Hull – Divide & Conquer Split set into two, compute convex hull of both, combine.
11
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann11 Convex Hull – Divide & Conquer Split set into two, compute convex hull of both, combine.
12
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann12 Convex Hull – Divide & Conquer Split set into two, compute convex hull of both, combine.
13
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann13 Convex Hull – Divide & Conquer Split set into two, compute convex hull of both, combine.
14
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann14 Convex Hull – Divide & Conquer Split set into two, compute convex hull of both, combine.
15
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann15 Convex Hull – Divide & Conquer Split set into two, compute convex hull of both, combine.
16
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann16 Convex Hull – Divide & Conquer Split set into two, compute convex hull of both, combine.
17
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann17 Convex Hull – Divide & Conquer Split set into two, compute convex hull of both, combine.
18
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann18 Convex Hull – Divide & Conquer Split set into two, compute convex hull of both, combine.
19
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann19 Convex Hull – Divide & Conquer Split set into two, compute convex hull of both, combine.
20
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann20 Convex Hull – Divide & Conquer Merging two convex hulls.
21
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann21 Convex Hull – Divide & Conquer Merging two convex hulls: (i) Find the lower tangent.
22
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann22 Convex Hull – Divide & Conquer Merging two convex hulls: (i) Find the lower tangent.
23
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann23 Convex Hull – Divide & Conquer Merging two convex hulls: (i) Find the lower tangent.
24
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann24 Convex Hull – Divide & Conquer Merging two convex hulls: (i) Find the lower tangent.
25
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann25 Convex Hull – Divide & Conquer Merging two convex hulls: (i) Find the lower tangent.
26
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann26 Convex Hull – Divide & Conquer Merging two convex hulls: (i) Find the lower tangent.
27
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann27 Convex Hull – Divide & Conquer Merging two convex hulls: (i) Find the lower tangent.
28
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann28 Convex Hull – Divide & Conquer Merging two convex hulls: (i) Find the lower tangent.
29
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann29 Convex Hull – Divide & Conquer Merging two convex hulls: (i) Find the lower tangent.
30
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann30 Convex Hull – Divide & Conquer Merging two convex hulls: (ii) Find the upper tangent.
31
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann31 Convex Hull – Divide & Conquer Merging two convex hulls: (ii) Find the upper tangent.
32
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann32 Convex Hull – Divide & Conquer Merging two convex hulls: (ii) Find the upper tangent.
33
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann33 Convex Hull – Divide & Conquer Merging two convex hulls: (ii) Find the upper tangent.
34
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann34 Convex Hull – Divide & Conquer Merging two convex hulls: (ii) Find the upper tangent.
35
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann35 Convex Hull – Divide & Conquer Merging two convex hulls: (ii) Find the upper tangent.
36
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann36 Convex Hull – Divide & Conquer Merging two convex hulls: (ii) Find the upper tangent.
37
Computational Geometry, WS 2007/08 Prof. Dr. Thomas Ottmann37 Convex Hull – Divide & Conquer Merging two convex hulls: (iii) Eliminate non-hull edges.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.