Minkowski Sum on 2D geometry

7,814 views
7,546 views

Published on

A simple presentation of a the Minkowski Sum applied to 2D geometry.

Published in: Technology, Art & Photos
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
7,814
On SlideShare
0
From Embeds
0
Number of Embeds
138
Actions
Shares
0
Downloads
52
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Minkowski Sum on 2D geometry

  1. 1. The Minkowski sum (applied to 2d geometry) cloderic.mars@gmail.com http://www.crowdscontrol.net clodericmars
  2. 2. Formal definition A and B are two sets A⊕B is the Minkowski sum of A and B A⊕B = {a+b! a∈A, b∈B}
  3. 3. What if A and B are 2D shapes ? Hard to visualize ? Let’s see some examples...
  4. 4. Example 1 A is any polygon B is a convex polygon
  5. 5. A B x y
  6. 6. A⊕B x y
  7. 7. Example 2 A is any polygon B is any disc
  8. 8. A B x y
  9. 9. A⊕B x y
  10. 10. Intuitive definition What is A⊕B ? Take B Dip it into some paint Put its (0,0) on A border Translate it along the A perimeter The painted area is A⊕B
  11. 11. What can you do with that ? Notably, motion planning
  12. 12. Free space A is an obstacle any 2D polygon B is a moving object 2D translation : t shape : a convex polygon or a disc t ∈ A⊕-B collision
  13. 13. Example 1 A is any polygon B is a convex polygon
  14. 14. A B x y -B
  15. 15. A⊕-B x y
  16. 16. x y t t ∉ A⊕-B no collision
  17. 17. x y t t ∈ A⊕-B collision
  18. 18. Example 2 A is any polygon B is any disc
  19. 19. A B=-B x y
  20. 20. A⊕-B x y
  21. 21. A⊕-B x y t t ∉ A⊕-B no collision
  22. 22. A⊕-B x y t t ∈ A⊕-B collision
  23. 23. How is it computed ?
  24. 24. Two convex polygons ConvexPolygon minkowskiSum(ConvexPolygon a, ConvexPolygon b) { Vertex[] computedVertices; foreach(Vertex vA in a) { foreach(Vertex vB in b) { computedVertices.push_back(vA+vB); } } return convexHull(computedVertices); }
  25. 25. Any polygons Method 1 : decomposition decompose in convex polygons compute the sum of each couple the final sum is the union of each sub-sum Method 2 : convolution cf. sources
  26. 26. Polygon offsetting P is a polygon D is a disc of radius r Computing P⊕D = Offsetting P by a radius r Computation Easy for a convex polygon cf. sources
  27. 27. Sources http://www.cgal.org/Manual/3.4/doc_html/ cgal_manual/Minkowski_sum_2/Chapter_main.html http://wapedia.mobi/en/Minkowski_addition

×