Unformatted text preview: onvex hull brute force algorithm
a p9 Extreme points of the
convex polygon
convex
• Consider all the points in the
Consider
polygon as a set. An extreme
point is a point of the set that
point
is not a middle point of any
line segment with end points
in the set. p11
p4 p1 p2 p3 p7
p8 Design and Analysis of Algorithms – Chapter 3 p10 p5 p6 40 Convex hull brute force algorithm
a p9 Extreme points of the
convex polygon
convex
• Consider all the points in the
Consider
polygon as a set. An extreme
point is a point of the set that
point
is not a middle point of any
line segment with end points
in the set. p11
p4 p1 p2 p3 p7
p8 p10 p5 p6 Which pairs of extreme points need to be connected
Which
to form the boundary of the convex hull?
to
Design and Analysis of Algorithms – Chapter 3 41 Convex hull brute force algorithm a A line segment connecting two points Pi and Pj of a
set of n points is a part of its convex hull’s
boundary if and only if all the other points of the
set lies on the same side of the straight line through
these two points.
these Design and Analysis of Algorithms – Chapter 3 42 Convex hull brute force algorithm
a The straight line through two points (x1, y1), (x2,
The
y2) in the coordinate plane can be defined by the
following equation
following
• ax + by = c
where a = y2 – y1, b = x1 – x2, c = x1y2  y1x2
where a Such a line divides t...
View
Full Document
 Fall '12
 yinglu
 Algorithms, Graph Theory, Depthfirst search, mark w

Click to edit the document details