1 / 54

Offset Curve

Offset Curve. Find an inward and outward offset of a polygon Sistemi di elaborazione dell’informazione A.A. 2011/12 Russo Davide - Mat . 209653 Docente: Clementini Eliseo. Index. Definition Outward offset Minkowski sum: definition & examples Theorem Applications

colm
Download Presentation

Offset Curve

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. Offset Curve Findaninward and outward offset of a polygon Sistemi di elaborazione dell’informazione A.A. 2011/12 Russo Davide - Mat. 209653 Docente: Clementini Eliseo

  2. Index • Definition • Outward offset • Minkowski sum: definition & examples • Theorem • Applications • Computing Minkowski sum: algorithm & examples • Non-convexpolygons • Resume • Inward offset • Medialaxis • Applications

  3. Offset curveDefinition Given a smooth curve C, the offset curve is: (Definition) The locus of points offset by a constant distance r along the curve normal; this new curve is offset orthogonal to the original curve C at every point. (Alt. Definition) The envelope (the outer boundary of the union) of a family of disks of radius r whose centers lie on C. [1]

  4. Outward Offset

  5. Outward OffsetMinkowski sum The definition of an offset curve is a special case of a more general concept: Minkowski sum. (Definition) The Minkowski sum : A,B = sets of points in the plane (x,y), counter-clockwise ordered. A ⊕ B ={a + b | a ∈ A, b ∈ B} a + b = ( ax + bx ; ay + by )

  6. Outward Offset Minkowski sum: Example A y AB B x

  7. Outward Offset Minkowski sum: Example 2 A B y x

  8. Outward Offset Minkowski sum: Example 2 AB y x

  9. Outward OffsetConvexPolygonAlghoritm Consider the Minkowski sum of a set A and a point b: A ⊕ b = {a + b | a ∈ A} y b x A A  b

  10. Outward OffsetConvexPolygonAlghoritm Thus A ⊕ B can be seen as the union of copies of A, one for each vertex bi in B. A ⊕ B = ( A ⊕ bi ) y B x A

  11. Outward OffsetConvexPolygonAlghoritm Thus A ⊕ B can be seen as the union of copies of A, one for each vertex bi in B. A ⊕ B = ( A ⊕ bi ) y B The union is computed by the Convex-hull of the points A ⊕ B x A A B

  12. Outward OffsetNon-convexPolygon Method1:Decomposition • decompose in convex polygons • compute the sum of each couple • the final sum is the union of each sub-sum

  13. Outward OffsetNon-convex Polygon Method1:Decomposition • P  R = (P1 + P2)  R = (P1 R) U (P2  R) • P  R = pi  R R p2 p1 P P  R

  14. Outward OffsetNon-convex Polygon • O(n+m) if both polygons are convex. • O(nm) if only one of the polygons is convex. • O(n2 m2) if both polygons are non-convex. Method1:Decomposition

  15. Outward OffsetNon-convex Polygon Method1:Decomposition

  16. Outward OffsetNon-convex Polygon Method 2 : Convolution • Given two planar smooth curves C1 and C2 , theirconvolution curve C is defined by applying the vector sums only to the pairs of curve points that have the same curve tangentvalue: • C1 * C2 = {a + b | a ∈ C1 , b ∈ C2 , T1 = T2 } • where Ti is the curve tangent of Ci(i =1, 2).

  17. P dir(p) Q p Outward OffsetNon-convex Polygon • Method 2 : Convolution of polygons • A polygonal tracing P consists of moves (going along an edge in a fixed direction), and turns (rotating at a vertex). • For a vertex p of P, dir(p) is a continuous range of directions. The convolution P  Q therefore contains the sum of each edge of the polygonal tracing Q, whose direction is in dir(p), with p.

  18. Outward OffsetNon-convex Polygon Method 2 : Convolution of polygons P * R C1 C2

  19. Outward OffsetNon-convex Polygon Method 2 : Convolution winding numbers: • The winding number(p) of a curve C in a point “p”, is equal to the total number of counterclockwise turns that the vector makes around p, where q ∈ C. Windingnumberexample…  (p) = 2

  20. Outward OffsetNon-convex Polygon Method 2 : Convolution winding numbers:

  21. Outward OffsetNon-convex Polygon Method 2 : Convolution • The Minkowski sum of two planar polygons A and B is • the set of points in the plane with positive winding number with respect to the convolution of ∂A with ∂B.

  22. Outward OffsetNon-convex Polygon Method 2 : Convolution steps 1. ComputeA * B. 2. Identify its “convolution cycles”. 3. Retain cycles that have a positive winding number. 4. Merge these to construct ∂(A ⊕ B).

  23. Outward OffsetNon-convex Polygon Method 2 : Convolution

  24. Outward OffsetResume A,B are Convexpolygons: A or B isNon-convexpolygon: Decomposition Convolution

  25. Outward Offset Theorem R(x,y) intersect P  (x,y)P(-R(0,0)) y P R(0,0) x –R(0,0)

  26. Outward Offset Theorem R(x,y) intersect P  (x,y)P(-R(0,0)) y P(-R(0,0)) P R(0,0) x –R(0,0)

  27. Outward Offset Theorem R(x,y) intersect P  (x,y)P(-R(0,0)) y R (x1,y1) y1 P R (x3,y3) y3 R (x2,y2) R(0,0) y2 x x1 x2 x3

  28. Outward Offset Applications • Robot motion planning:

  29. Inward Offset

  30. Inward OffsetDefinition An inward offset curve for a polygon consists of straight segments parallel to each edge and circular arcs centered on each reflex vertex

  31. Inward OffsetMedialaxis The traces of the joins between pairs of straight segments, and between straight segments and circular arcs, form a superset of the medial axis. The traces incident to reflex vertices are not present in the medial axis.

  32. Inward OffsetStraightskeleton If the circular arcs are replaced by miter joins, we have instead the straight skeleton, as shown in figure.

  33. Inward OffsetMinkowski sum A ⊕ B ={a + b | a ∈ A, b ∈ B} A clockwise, B counter-clockwise. Where: 0 -1 B 0 1 -1 0 -2 -1 A

  34. Inward OffsetApplications • Pocket machining.

  35. Minkowski Sum Alghoritm

  36. Minkowski sum:Implemented Algorithm

  37. Minkowski sum: Algorithm example [i,j] = (1,1) 1) 2) 3) 4) w4 Add v1+w1 w3 angle(v1v2) > angle(w1w2) j=2 w2 w1,w5 v3 v2 v1 ,v4

  38. Minkowski sum: Algorithm example [i,j] = (1,2) 1) 2) 3) 4) w4 Add v1+w2 w3 angle(v1v2) < angle(w2w3) i=2 w2 w1,w5 v3 v2 v1 ,v4

  39. Minkowski sum: Algorithm example [i,j] = (2,2) 1) 2) 3) 4) w4 Add v2+w2 w3 angle(v2v3) > angle(w2w3) j=3 w2 w1,w5 v3 v2 v1 ,v4

  40. Minkowski sum: Algorithm example [i,j] = (2,3) 1) 2) 3) 4) w4 Add v2+w3 w3 angle(v2v3) < angle(w3w4) i=3 w2 w1,w5 v3 v2 v1 ,v4

  41. Minkowski sum: Algorithm example [i,j] = (3,3) 1) 2) 3) 4) w4 Add v3+w3 w3 angle(v3v4) > angle(w3w4) j=4 w2 w1,w5 v3 v2 v1 ,v4

  42. Minkowski sum: Algorithm example [i,j] = (3,4) 1) 2) 3) 4) w4 Add v3+w4 w3 angle(v3v4) < angle(w4w5) i=4 w2 w1,w5 v3 v2 v1 ,v4

  43. Minkowski sum: Algorithm example [i,j] = (4,4) 1) 2) 3) 4) w4 Add v4+w4 w3 angle(v4v5) >angle(w4w5) j=5  end LOOP!! w2 w1,w5 v3 v2 v1 ,v4

  44. Minkowski sum: Algorithm example w4 w3 w2 w1,w5 v3 v2 v1 ,v4

  45. Minkowski sum: Application

  46. Minkowski sum: Application

  47. Minkowski sum: Application

  48. Minkowski sum: Application

  49. Minkowski sum: Application

  50. Minkowski sum: Application

More Related