SlideServe
Menu
Préférences
© SlideServe · v2026

Convex hull

cyndi avatar
39 diapositives · 659 Views · Oct 22, 2014

smallest convex set containing all the points. Convex hull. smallest convex set containing all the points. Convex hull. smallest convex set containing all the points. Convex hull. 3. 2. start = 1. 1.next = 2 = 3.prev 2.next = 3 = 4.prev 3.next = 4 = 1.prev 4.next = 1 = 2.prev.

Convex hull - slide 1
01 / 39Convex hull
1 / 17

Télécharger la présentation

Convex hull
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. smallest convex set containing all the points Convex hull

  2. smallest convex set containing all the points Convex hull

  3. smallest convex set containing all the points Convex hull 3 2 start = 1 1.next = 2 = 3.prev 2.next = 3 = 4.prev 3.next = 4 = 1.prev 4.next = 1 = 2.prev 4 1 representation = circular doubly-linked list of points on the boundary of the convex hull

  4. Jarvis march (assume no 3 points colinear) s find the left-most point

  5. Jarvis march (assume no 3 points colinear) s find the point that appears most to the right looking from s

  6. Jarvis march (assume no 3 points colinear) s find the point that appears most to the right looking from p p

  7. Jarvis march (assume no 3 points colinear)

  8. Jarvis march (assume no 3 points colinear)

  9. Jarvis march (assume no 3 points colinear) s  point with smallest x-coord p  s repeat PRINT(p) q  point other than p for i from 1 to n do if i  p and point i to the right of line (p,q) then q  i p q until p = s

  10. Jarvis march (assume no 3 points colinear) Running time = O(n.h)

  11. Graham scan (assume no 3 points colinear) O(n log n) homework start with a simple polygon containing all the points fix it in time O(n)

  12. Graham scan (assume no 3 points colinear)

  13. Graham scan (assume no 3 points colinear)

  14. Graham scan (assume no 3 points colinear)

  15. Graham scan (assume no 3 points colinear)

  16. Graham scan (assume no 3 points colinear)

  17. Graham scan (assume no 3 points colinear)

  18. Graham scan (assume no 3 points colinear) A  start B  next(A) C  next(B) repeat 2n times if C is to the right of AB then A.next  C; C.prev  A B  A A  prev(A) else A  B B  C C  next(C)

  19. Closest pair of points

  20. Closest pair of points

  21. Closest pair of points 2T(n/2)  min(left,right)

  22. Closest pair of points   2T(n/2)  min(left,right)

  23. Closest pair of points    2T(n/2)  min(left,right) 

  24. Closest pair of points pre-processing X  sort the points by x-coordinate Y  sort the points by y-coordinate Closest-pair(S) if |S|=1 then return  if |S|=2 then return the distance of the pair split S into S1 and S2 by the X-coord 1 Closest-pair(S1), 2 Closest-pair(S2)   min(1,2) for points x in according to Y check 12 points around x, update  if a closer pair found

  25. Smallest enclosing disc

  26. Smallest enclosing disc

  27. Smallest enclosing disc Claim #1: The smallest enclosing disc is unique.

  28. Smallest enclosing disc Claim #1: The smallest enclosing disc is unique.

  29. Smallest enclosing disc SED(S) pick a random point x S (c,r)  SED(S-{x}) if xDisc(c,r) then return (c,r) else return SED-with-point(S,x)

  30. Smallest enclosing disc SED(S) pick a random point x S (c,r)  SED(S-{x}) if xDisc(c,r) then return (c,r) else return SED-with-point(S,x) SED-with-point(S,y) pick a random point x S (c,r)  SED-with-point(S-{x},y) if xDisc(c,r) then return (c,r) else return SED-with-2-points(S,y,x)

  31. Smallest enclosing disc SED(S) pick a random point x S (c,r)  SED(S-{x}) if xDisc(c,r) then return (c,r) else return SED-with-point(S,x) SED-with-point(S,y) pick a random point x S (c,r)  SED-with-point(S-{x},y) if xDisc(c,r) then return (c,r) else return SED-with-2-points(S,y,x) SED-with-2-point(S,y,z) pick a random point x S (c,r)  SED-with-2-points(S-{x},y,z) if xDisc(c,r) then return (c,r) else return circle given by x,y,z

  32. Running time ? SED(S) pick a random point x S (c,r)  SED(S-{x}) if xDisc(c,r) then return (c,r) else return SED-with-point(S,x) SED-with-point(S,y) pick a random point x S (c,r)  SED-with-point(S-{x},y) if xDisc(c,r) then return (c,r) else return SED-with-2-points(S,y,x) SED-with-2-point(S,y,z) pick a random point x S (c,r)  SED-with-2-points(S-{x},y,z) if xDisc(c,r) then return (c,r) else return circle given by x,y,z

  33. Running time ? SED(S) pick a random point x S (c,r)  SED(S-{x}) if xDisc(c,r) then return (c,r) else return SED-with-point(S,x) SED-with-point(S,y) pick a random point x S (c,r)  SED-with-point(S-{x},y) if xDisc(c,r) then return (c,r) else return SED-with-2-points(S,y,x) O(n) SED-with-2-point(S,y,z) pick a random point x S (c,r)  SED-with-2-points(S-{x},y,z) if xDisc(c,r) then return (c,r) else return circle given by x,y,z

  34. Running time ? SED(S) pick a random point x S (c,r)  SED(S-{x}) if xDisc(c,r) then return (c,r) else return SED-with-point(S,x) O(n) SED-with-point(S,y) pick a random point x S (c,r)  SED-with-point(S-{x},y) if xDisc(c,r) then return (c,r) else return SED-with-2-points(S,y,x) 2 T(n) = T(n-1) + SED-with-2-points n T(n) = O(n)

  35. Running time ? SED(S) pick a random point x S (c,r)  SED(S-{x}) if xDisc(c,r) then return (c,r) else return SED-with-point(S,x) O(n) 2 T(n) = T(n-1) + SED-with-point n T(n) = O(n)

  36. Smallest enclosing disc md(I,B) = smallest enclosing disc with B on the boundary and I inside Claim #2: if x is inside md(I,B) then md(I  {x},B) = md(I,B)

  37. Smallest enclosing disc md(I,B) = smallest enclosing disc with B on the boundary and I inside Claim #3: if x is outside of md(I,B) then md(I  {x},B) = md(I,B  {x})

  38. Smallest enclosing disc md(I,B) = smallest enclosing disc with B on the boundary and I inside Claim #3: if x is outside of md(I,B) then md(I  {x},B) = md(I,B  {x}) x md(l  {x},B) md(I,B)

  39. Smallest enclosing disc md(I,B) = smallest enclosing disc with B on the boundary and I inside Claim #3: if x is outside of md(I,B) then md(I  {x},B) = md(I,B  {x}) Claim #2: if x is inside md(I,B) then md(I  {x},B) = md(I,B) Claim #1: md(I,B) is unique