Minkowski Sums and Offset Polygons Ron Wein. Computing Minkowski Sums.

Slides:



Advertisements
Similar presentations
Approximation algorithms for geometric intersection graphs.
Advertisements

TEL-AVIV UNIVERSITY FACULTY OF EXACT SCIENCES SCHOOL OF MATHEMATICAL SCIENCES An Algorithm for the Computation of the Metric Average of Two Simple Polygons.
Polygon Triangulation
UNC Chapel Hill Lin/Foskey/Manocha Steps in DP: Step 1 Think what decision is the “last piece in the puzzle” –Where to place the outermost parentheses.
Incremental Linear Programming Linear programming involves finding a solution to the constraints, one that maximizes the given linear function of variables.
Orthogonal Drawing Kees Visser. Overview  Introduction  Orthogonal representation  Flow network  Bend optimal drawing.
Map Overlay Algorithm. Birch forest Wolves Map 1: Vegetation Map 2: Animals.
Approximations of points and polygonal chains
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
Brute-Force Triangulation
UNC Chapel Hill M. C. Lin Polygon Triangulation Chapter 3 of the Textbook Driving Applications –Guarding an Art Gallery –3D Morphing.
I. The Problem of Molding Does a given object have a mold from which it can be removed? object not removable mold 1 object removable Assumptions The object.
1 Voronoi Diagrams. 2 Voronoi Diagram Input: A set of points locations (sites) in the plane.Input: A set of points locations (sites) in the plane. Output:
The Divide-and-Conquer Strategy
By Groysman Maxim. Let S be a set of sites in the plane. Each point in the plane is influenced by each point of S. We would like to decompose the plane.
Computational Geometry
Tutorial 2 – Computational Geometry
Visibility Computations: Finding the Shortest Route for Motion Planning COMP Presentation Eric D. Baker Tuesday 1 December 1998.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2010 Lecture 2 Polygon Partitioning Thursday,
17. Computational Geometry Chapter 7 Voronoi Diagrams.
Steps in DP: Step 1 Think what decision is the “last piece in the puzzle” –Where to place the outermost parentheses in a matrix chain multiplication (A.
2. Voronoi Diagram 2.1 Definiton Given a finite set S of points in the plane , each point X of  defines a subset S X of S consisting of the points of.
Convex Hulls Computational Geometry, WS 2006/07 Lecture 2 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Offset of curves. Alina Shaikhet (CS, Technion)
By Dor Lahav. Overview Straight Skeletons Convex Polygons Constrained Voronoi diagrams and Delauney triangulations.
1 An Exact, Complete and Efficient Computation of Arrangements of Bézier Curves Iddo Hanniel – Technion, Haifa Ron Wein – Tel-Aviv University.
Area 1: Algorithms Dan Halperin, School of Computer Science, Tel Aviv University.
Duality and Arrangements Computational Geometry, WS 2007/08 Lecture 6 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
A Combinatorial Maximum Cover Approach to 2D Translational Geometric Covering Karen Daniels, Arti Mathur, Roger Grinde University of Massachusetts Lowell.
1 Efficient decomposition for Minkowski computation Eyal Flato and Dan Halperin.
Mark Waitser Computational Geometry Seminar December Iterated Snap Rounding.
Lecture 8 : Arrangements and Duality Computational Geometry Prof. Dr. Th. Ottmann 1 Duality and Arrangements Duality between lines and points Computing.
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
NUS CS 5247 David Hsu Minkowski Sum Gokul Varadhan.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Voronoi Diagrams.
Spring 2007 Motion Planning in Virtual Environments Dan Halperin Yesha Sivan TA: Alon Shalita Basics of Motion Planning (D.H.)
Planning High-Quality Paths and Corridors Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin.
Duality and Arrangements Computational Geometry, WS 2006/07 Lecture 7 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät.
Lection 1: Introduction Computational Geometry Prof.Dr.Th.Ottmann 1 History: Proof-based, algorithmic, axiomatic geometry, computational geometry today.
Brute-Force Triangulation
Geometric Algorithms1 segment intersection orientation point inclusion simple closed path.
CSE53111 Computational Geometry TOPICS q Preliminaries q Point in a Polygon q Polygon Construction q Convex Hulls Further Reading.
9/7/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Triangulations and Guarding Art Galleries Carola Wenk.
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
Planning Near-Optimal Corridors amidst Obstacles Ron Wein Jur P. van den Berg (U. Utrecht) Dan Halperin Athens May 2006.
Line Arrangement Chapter 6. Line Arrangement Problem: Given a set L of n lines in the plane, compute their arrangement which is a planar subdivision.
5 -1 Chapter 5 The Divide-and-Conquer Strategy A simple example finding the maximum of a set S of n numbers.
Robustness in Numerical Computation I Root Finding Kwanghee Ko School of Mechatronics Gwnagju Institute of Science and Technology.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
1 Triangulation Supplemental From O’Rourke (Chs. 1&2) Fall 2005.
TEL-AVIV UNIVERSITY RAYMOND AND BEVERLY SACKLER FACULTY OF EXACT SCIENCES SCHOOL OF MATHEMATICAL SCIENCES An Algorithm for the Computation of the Metric.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
Arrangements Efi Fogel Tel Aviv University. Outline Arrangements Algorithms based on Arrangements Boolean Set Operations Minkowski Sums and Polygon Offset.
1/29/15CMPS 3130/6130 Computational Geometry1 CMPS 3130/6130 Computational Geometry Spring 2015 Triangulations and Guarding Art Galleries Carola Wenk.
1 Point Location Strategies Idit Haran
9/8/10CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2010 Triangulations and Guarding Art Galleries Carola Wenk.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 9 Line Arrangements.
Polygon Triangulation
CMPS 3130/6130 Computational Geometry Spring 2017
Computability and Complexity
Convex Hull obstacle start end 11/21/2018 4:05 AM Convex Hull
Depth Estimation via Sampling
Convex Sets & Concave Sets
I. The Problem of Molding
The Visibility– Voronoi Complex and Its Applications
Computational Geometry
Convex Hull obstacle start end 4/30/2019 5:21 PM Convex Hull
Ch09 _2 Approximation algorithm
Computational Geometry
Presentation transcript:

Minkowski Sums and Offset Polygons Ron Wein

Computing Minkowski Sums

Given two sets A and B in the plane, their Minkowski sum, denoted A  B, is: A  B = {a + b | a  A, b  B} Planar Minkowski Sums  =

We are given two polygons P and Q with m and n vertices respectively. If both polygons are convex, the complexity of their sum is m + n, and we can compute it in  (m + n) time using a very simple procedure. The Sum Complexity (I)

If only one of the polygons is convex, the complexity of their sum is  (mn). If both polygons are non-convex, the complexity of their sum is  (m 2 n 2 ). The Sum Complexity (II)

The prevailing method for computing the sum of two non- convex polygons: Decompose P and Q into convex sub- polygons, compute the pair-wise sums of the sub-polygons and obtain the union of these sums. The Decomposition Method P Q P1P1 P2P2 Q1Q1 Q2Q2 P  QP  Q

Convex Decomposition Schemes (I) Naïve triangulation.Optimal max-degree triangulation: minimizing the maximum degree. Optimal sum-degrees triangulation: minimizing the sum of squared vertex degrees.

Convex Decomposition Schemes (II) Greedy convex decomposition: add diagonals until eliminating all reflex vertices. Optimal polygon decomposition: minimizing the number of convex sub-polygons. Takes O(r 2 n log n) time. Optimal sum-degrees decomposition: minimizing the sum of squared vertex degrees.

Convex Decomposition Schemes (III) (with Steiner Points) Slab decomposition: add vertical segments from each reflex vertex. Angle bisection: add an angle bisector for each reflex vertex. KD-decomposition: adding vertical and horizontal segments.

Given a set of polygons S 1, …, S M with counterclockwise (positive) orientation, construct the arrangement of their edges. Set N(f u ) = 0 for the unbounded face f u. Then compute N(f ) for each other face using a simple BFS traversal. All faces with N(f ) > 0 contribute to the union. Computing the Union (0) (1) (2) (0)

A planar tracing T comprises a continuous set of points. Each point t  T is associated with a direction dir(t). The convolution of two planar tracings S and T, denoted S  T, comprises the pair-wise sum of all points s  S and t  T such that dir(s) = dir(t). Convolution of Planar Tracings (Guibas, Ramshaw and Stolfi, 1983) S T s t

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. Convolution of Polygons (I) p dir(p) P Q

At the worst case, the convolution of two polygons P  Q consists of  (mn) line segments. Guibas and Seidel (1987) gave an output-sensitive algorithm for computing the convolution segments in O(m + n + K) time. The convolution segments form closed cycles. The Minkowski sum P  Q contains all points whose winding number with respect to any of the convolution cycles is positive. Convolution of Polygons (II) (0) (1)(2)

The Case of a Single Cycle P Q P  QP  Q

We compute the first cycle, starting from the two bottommost vertices in P and Q. If P or Q are convex, we are done. Otherwise, while it is possible to locate two vertices p  P and q  Q that should be in the convolution, construct an additional convolution cycle. The Case of Multiple Cycles

The Minkowski-Sum Package of CGAL

Supports the construction of maintenance of 2D arrangements – planar subdivisions induced by a set of planes. Handles a variety of curves. Each family of curves (line segments, poly-lines, circular arcs, conic arcs, etc.) is handled by a geometric traits-class. The CGAL Arrangement Package Common intersection points Tangency points Handles degenerate cases robustly and accurately, relying on the exact computation paradigm.

The Minkowski-sum package re-implements the robust algorithms for sum-computations using the convex polygon- decomposition method (Agarwal, Flato and Halperin, 2000). The Decomposition Method Available decomposition methods: Optimal. Hertel-Mehlhorn’s approximation scheme. Greene’s approximation scheme. The small-side angle-bisector approximation scheme. Implemented in the Partition_2 package

The first software that robustly implements the convolution algorithms for polygons. Uses the same infrastructure for multi-way polygon union, used by the decomposition method. The same algorithm also works for the case of closed convolution cycles. The Convolution Method

The Minkowski sum of two polygons may contain low- dimensional features (isolated vertices and antennas). The package can treat them as follows: discard them (output the regularized sum), or give access to them through the underlying arrangement. Low-Dimensional Features

Experimental Input Sets (I) chain stars comb fork

Experimental Input Sets (II) cavity random knife country

Experimental Results: Decomposition Running time (ms.)Arrangement sizeT dec (ms.)Slk Input set SSABGre.HMOpt.|F||F||E||E||V||V| chain stars comb fork cavity random knife country

Experimental Results: Convolution Running time (ms.)Arrangement sizeT conv (ms.)KNCNC Input set LEDADecomp.Conv.|F||F||E||E||V||V| chain stars comb fork cavity random knife country

Polygon Offsetting

Polygon Offsetting using the Convolution Method P BrBr Computing the convolution cycle … Computing the induced arrangement and the winding numbers … P  BrP  Br

Computing the sum of two polygons (objects of the type Polygon_2 ) is of course performed using the Arr_segment_traits_2 class and using exact rational arithmetic. Related Traits Classes In case of offsetting we should consider the following traits classes: Arr_circle_segment_traits_2 – handles line segments and circular arcs using exact rational arithmetic. Arr_conic_traits_2 – handles bounded conic arcs using exact algebraic numbers (based on CORE).

Offsetting a Polygon Edge (I) p 1 = (x 1, y 1 ) p 2 = (x 2, y 2 )  =  - 90º q1q1 q2q2

If the line supporting p 1 p 2 is ax + by + c = 0, then the line supporting q 1 q 2 is ax + by + (c + ℓ r) = 0. Offsetting a Polygon Edge (II) Problem: In the general case, offset arcs are not supported by rational lines! Solution no. 1: Represent the offset edge as a segments of a (degenerate) conic curve with rational coefficients:

Our Approximation Scheme p1p1 p2p2 1. Find  ’ 1   and  ’ 2   such that sin(  ’ j ), cos(  ’ j ) are rational. ’1’1 ’2’2 3. Compute the intersection q’ of the two tangents at q’ 1 and q’ 2. Use the polyline q’ 1 q’q’ 2 as an approximation. q’q’ q’1q’1 q’2q’2 2. Compute q’ j = (x j + r  cos(  ’ j ), y j + r  sin(  ’ j ) ).

Using the half-angle formulae we have: Computing “Rational” Angles (I) Observation: If  is rational, then sin(  ) = 2  / (1+  2 ) and cos(  ) = (1 -  2 ) / (1 +  2 ) are also rational.

Computing “Rational” Angles (II) If x 1 > x 2 we take a rational approximation : If x 1 < x 2 we approximate the edge length from above (that is, we take a rational ). We use the good old Babylonian method for approximating square roots ( ).

The Approximation Quality Lemma: For any polygon edge connecting (x 1, y 1 ) and (x 2, y 2 ) whose length is ℓ and any  > 0, if we take an approximation of the edge length that satisfies: then the approximation error is bounded by . p1p1 p2p2 q’q’ q’1q’1 q’2q’2

Running Times (Pentium IV 3 GHz, in milliseconds) Approximated offsetExact offset SizeInput polygon  = r  = r (14)Wheel (40)Knife (19)Random (24)Comb (37)Chain (24)Country ❶ ❺ ❹ ❸ ❷ ❶ ❷ ❸ ❹ ❺

Thank you!