1 / 6

Convex Sets & Concave Sets

p. p. R. R. 1. 2. q. q. Concave. Convex. Convex Sets & Concave Sets. A planar region R is called convex if and only if for any pair of points p, q in R , the line segment pq lies completely in R. Otherwise, it is called concave. An Example. 4. 1. 2. 3. Convex Hull.

izzy
Download Presentation

Convex Sets & Concave Sets

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. p p R R 1 2 q q Concave Convex Convex Sets & Concave Sets A planar region R is called convex if and only if for any pair of points p, q in R, the line segment pq lies completely in R. Otherwise, it is called concave.

  2. An Example 4 1 2 3

  3. Convex Hull The convex hull CH(Q) of a set Q is the smallest convex region that contains Q. Rubber band When Q is finite, its convex hull is the unique convex polygon whose vertices are from Q and that contains all points of Q.

  4. p 5 p p p 9 p 6 7 1 p p 2 p p 4 3 10 8 p Output: p , p , p , p , p , p . 5 9 2 8 10 7 The Convex Hull Problem Input: a set P = { p , p , …,p } of points 1 2 n Output: a list of vertices of CH(P) in counterclockwiseorder. Example

  5. All other points in P lie to the same side of the line passing through p and q, or on the line segment pq. Edges of a Convex Hull For every edge both endpoints p, q  P. q r p

  6. q p r 3 Running time (n ) A Slow Convex Hull Algorithm Slow-Convex-Hull(P) E {} // set of directed edges of CH(P) that bounds the // points of P on the right. for every ordered pair (p, q), where p, qP and pq // (n )pairs do valid true for every point rp or q// n 2 such points do ifr lies to the right of pq or collinear with p and q but not on pq then valid false if valid then EE { pq } // pq and qp cannot be both in E From E construct a list L of vertices of CH(P), sorted in counterclockwise order. // O(n ) easily improvable to O(n lg n) return L 2 2

More Related