Download presentation

Presentation is loading. Please wait.

Published byAlicia Campbell Modified over 6 years ago

1
Convex Hull Problem Presented By Erion Lin

2
Outline Convex Hull Problem Voronoi Diagram Fermat Point

3
Outline

4
Convex Hull Problem Definitions Algorithm

5
Definitions

6
Concave Polygon

7
Convex Polygon

8
A Convex Hull The convex hull of a set of planar points is defined as the smallest convex polygon containing all of the points.

9
Algorithm

10
An algorithm to Construct a Convex Hull Input ： A set S of planar points Output ： A Convex hull of S

11
Initial Points

12
An algorithm to Construct a Convex Hull(Cont’d) Step 1. If S contains no more than five points, use exhaustive searching to find the convex hull and return. Step 2. Find a median line perpendicular to the x-axis which divides S into S L and S R.

13
An algorithm to Construct a Convex Hull(Cont’d) Step 3. Recursively construct convex hulls for S L and S R. Denote these convex hulls by Hull by Hull(S L ) and Hull(S R ) respectively.

14
Convex Hulls after Step 3

15
An algorithm to Construct a Convex Hull(Cont’d) Step 4. Find an interior point P of S L. Find the vertices v1 and v2 of Hull(S R ) which divide the vertices of Hull(S R ) into two sequences of vertices which have increasing polar angles with respect to P. Without loss of generality, let us assume that v1 has y-value greater than v2. Then form three sequences as follows ：

16
An algorithm to Construct a Convex Hull(Cont’d) (a) Sequence 1 ： all of the convex hull vertices of Hull(S L ) in counterclockwise direction. (b) Sequence 2 ： the convex hull vertices of Hull(S R ) from v2 to v1 in counterclockwise direction. (c) Sequence 3 ： the convex hull vertices of Hull (S R ) from v2 to v1 in clockwise direction

17
Graham Scan

18
An algorithm to Construct a Convex Hull(Cont’d) Merge these three sequences and conduct the Graham scan. Eliminate the points which are reflexive and the remaining points from the convex hull.

19
Graham Scan(Cont’d)

20
Convex Hull

21
Algorithm Analysis T(n)=2T(n/2) + O(n) = O(nlogn)

22
Outline

23
Voronoi Diagram Definitions Algorithms Applications

24
Definitions

25
The Voronoi diagram is, as the minimal spanning tree, a very interesting data structure, and it can be used to store important information about nearest neighbor of points on a plane.

26
A Voronoi Diagram for Two Points

27
A Voronoi Diagram for Three Points

28
A Voronoi Diagram for Sex Points

29
Definitions(Cont’d) The Voronoi polygon associated with P i is a convex polygon region having no more than n-1 sides, defined by V(i)=H(P i, P j )

30
A Voronoi Polygon

31
Definitions(Cont’d) The Delaunay triangulation is a line segment connecting P i and P j if and only if the Voronoi polygons of Pi and Pj share the same edge.

32
A Delaunay Triangulation for Six Points

33
Algorithms

34
An algorithm to Construct Voronoi Diagrams Input: A Set S on n planar points. Output: The Voronoi Diagram of S

35
Initial Points

36
An algorithm to Construct Voronoi Diagrams(Cont’d) Step 1. If S contains only one point, return. Step 2. Find a median line L perpendicular to the x-axis which divides S into S L and S R such that S L (S R ) lies to the left(right) of L and the sizes of S L and S R are equal.

37
An algorithm to Construct Voronoi Diagrams(Cont’d) Step 3. Construct Voronoi diagrams of S L and S R recursively. Denote these Voronoi diagrams by VD(S L ) and VD(S R ).

38
An algorithm to Construct Voronoi Diagrams(Cont’d) Step 4. Construct a dividing piece-wise linear hyperplane HP which is the locus of points simultaneously closest to a point in S L and a point S R. Discard all segments of VD(S L ) which lie to the right of HP and all segments of VD(S R ) that lie to the left of HP. The resulting graph is the Voronoi diagram of S.

39
Voronoi Diagrams Step 4-1

40
Voronoi Diagrams Step 4-2

41
Voronoi Diagrams

42
Algorithm Analysis T(n)=2T(n/2) + O(n) = O(nlogn)

43
An algorithm to Merge Two Voronoi Diagrams Input: (a)S L and S R where S L and S R are divided by a perpendicular line L. (b)VD(S L ) and VD(S R ). Output: VD(S) where

44
Initial Voronoi Diagrams

45
An algorithm to Merge Two Voronoi Diagrams(Cont’d) Step 1. Find the convex hulls of S L and S R. Let them be denoted as Hull(S L ) and Hull(S R ) respectively. Step 2. Find segments and which join Hull(S L ) and Hull (S R ) into a convex hull (P a and P c belong to S L and P b and P d belong to S R.) Assume that lies above.Let x=a, y=b,

46
An algorithm to Merge Two Voronoi Diagrams(Cont’d) Step 3. Find the perpendicular bisector of SG. Denote it by BS. Let. If, Go to Step5; otherwise, Go to Step4. Step 4. Let BS first intersect with a ray from VD(S L ) or VD(S R ). This ray must be a perpendicular bisector of either or for some z. If this ray is the perpendicular bisector of, then let ; otherwise, let. Go to Step 3.

47
Voronoi Diagram after Step 3 、 4

48
An algorithm to Merge Two Voronoi Diagrams(Cont’d) Step 5. Discard the edges of VD(S L ) which extend to the right of HP and discard the edges of VD(S R ) which extend to the left of HP. The resulting graph is the Voronoi diagram of

49
The Resulting Voronoi Diagram

50
Applications

51
Constructing a Convex Hull from a Voronoi Diagram

52
Time Complexity Analysis Preprocessing Time ： O(nlogn) Constructing Time ： O(n)

53
Euclidean Nearest Neighbor Searching Problem Definition ： We are given a set of n planar points: P 1, P 2, …P n and a testing point P. Our problem is to find a nearest neighbor of P among Pi.

54
Euclidean Nearest Neighbor Searching Problem(Cont’d)

55
Time Complexity Analysis Preprocessing Time ： O(nlogn) Searching Time ： O(logn)

56
Euclidean All Nearest Neighbor Problem Definition ： The Euclidean all nearest neighbor problem is to find a nearest neighbor of every P i.

57
Euclidean All Nearest Neighbor Problem (Cont’d)

59
Time Complexity Analysis O(nlogn)

60
Outline

61
Fermat Point To find the shortest distance between A 、 B 、 C

62
Fermat Point (Cont’d) Prove ：

63
Fermat Point (Cont’d)

64
Thanks for Your Listening

Similar presentations

© 2021 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google