Minkowski Sums and Offsets of Polygons
Seminar Computational Geometry and Geometric Computing
Andreas Bock
Supervisor: Eric Berberich
Minkowski Sums and Offsets of Polygons Seminar Computational - - PowerPoint PPT Presentation
Minkowski Sums and Offsets of Polygons Seminar Computational Geometry and Geometric Computing Andreas Bock Supervisor: Eric Berberich Overview Polygons Minkowski Sums Decomposing into convex sub-polygons Convolution method
Minkowski Sums and Offsets of Polygons
Seminar Computational Geometry and Geometric Computing
Andreas Bock
Supervisor: Eric Berberich
2
Overview
3
What is a polygon?
sequence of straight line segments
polygon's vertices
4
What is a polygon?
A few polygons (source: wiki)
5
Properties
(and not tangent to an edge or corner) meets its boundary exactly twice.
its boundary more than twice.
cross itself. All convex polygons are simple.
6
Minkowski Sums Minkowski Sums
Hermann Minkowski (1864-1909) (adapted by wikipedia)
7
Minkowski Sums
set with the sum of all elements from A and all elements of B
2
A⊕B A⊕B={ab∣a ∈A,b ∈B}
8
Minkowski Sum of 2 triangles (created with math.player)
9
Some properties of Minkowski Sums
a convex set
10
Where are Minkowski sums useful?
11
Configuration Space
point r where
if r – moved along this path – intersects A⊕B' A∩B≠∅ A⊕B'
12
Adapted by Agarwal
13
Adapted by Flato
14
How much effort Minkowski Sums take?
with m, n vertices
segments
P⊕Q
15
How much effort Minkowski Sums take?
is , same as computing time worst case
vertices and with calculation time of O(m+n) P⊕Q Om
2n 2
16
How to calculate the Minkowski Sum ?
We will check two methods here
17
decomposing into convex decomposing into convex sub- sub- polygons polygons
and
does not matter, because even in the worst case running time will not be affected.
P1,P2,...,Ps Q1,Q2,...,Qt P⊕Q=U i , jPi⊕Q j
18
Minkowski Sum Algorithm
and Q into the convex sub-polygons
and for each , compute the Minkowski sub-sum (O(1)) which we denote by . We denote by R the set → O(m,n)
computed in Step 2; the output is represented as a planar map. P1,P2,...,Ps Q1,Q2,...,Qt i∈[1..s] j ∈[1..t] Pi⊕Q j Rij {Rij ∣i ∈[1..s], j ∈[1..t]}
19
Minkowski Sum Algorithm
algorithms for Decomposition
points →
part of original signal
On
3
Or
2nlogn
20
Adapted by Agarwal
21
Minkowski Sum Algorithm
convex sub-polygons
(0, −1), (1, 0), (1, −2)}
A⊕B={ab∣a ∈A,b ∈B}
22
Minkowski Sum Algorithm
Adapted by wiki
23
Algebraic: Summing the vertices (+ convex hull) A+B=(5,0), B+B=(10,0), C+B=(5,5), A+D=(8,0), B+D=(13,0), C+D=(8,5), A+E=(8,3), B+E=(13,3), C+E=(8,8), A+F=(5,3), B+F=(10,3), C+F=(5,8) adapted by Korcz
24
Outline the sets (adapted by Korcz)
25
Minkowski Sum Algorithm
There are several possibilities for step 3:
time
k: the overall number of edges of the polygons in R I: the overall number of intersections between edges of polygons in R
Ok
2log 2k
OIk logk OIk
26
Running time
27
How to calculate the Minkowski Sum ?
We will check two methods here:
28
Convolution method Convolution method
Main Idea:
P and Q
29
Convolution
Concept of convolutions of general planar tracings by Guibas:
turns
30
Convolution
from to
this assumption p0,...,pm−1 and q0,...,qn−1
pi o pi o1 pi
pi−1 pi
pi pi1
31
Convolution
Convolution P*Q
who's vector lies between and
who's vector lies between
piq jpi1q j
pi pi1
q j−1q j and q jq j1
piq jpiq j1
q jq j1
pi−1 pi and pi pi1
32
Outline the sets (adapted by Korcz)
33
Adapted by Wein (!)
34
Convolution cycles
number of closed polygonal curves [Wein] → convolution cycles
polygonal tracing → one cycle, non-intersection
single cycle (maybe not simple) -> one cycle + intersection
comprised of several cycles → n cycles + x
35
Winding number
in a counter-clockwise direction around the geometrical face minus
in a clockwise direction around the geometrical face
36
Convolution method
is the set of points having a non-zero winding number with respect to the convolution cycles [Wein]
method is superior to decomposition on almost cases
P⊕Q
37
Fork example (adapted by Wein)
38
Adapted by Wein
39
Adapted by Wein
40
Adapted by Wein
41
Offsets of polygons Offsets of polygons
42
What is an offset?
the r-offset is a super-set of A: with Minkowski sum and disk A⊕B={ab∣a ∈A,b ∈B} A⊆ℝ
2
2∣d p , Ar }=A⊕Dr
Dr={p∈ℝ
2∣d
O ,pr }
43
Offset polygons
Idea:
with a disc
use both seen methods; Wein chooses the convolution method
44
Offset polygons
Construction of the Minkowski sum of a polygon with a disc with different radii (created with math.player)
45
Complexity
combinatorially complex
with n vertices with a disc is always O(n).
combinatorial, it is numerical, therefore
46
Offsetting a polygon
, the Minkowski sum of P with a disc of radius r, r is rational
package in CGAL p0,..., pn−1 Pr
47
Offsetting a polygon
P is a convex polygon: 1.Computing the offset by shifting each polygonal edge by r away from the polygon 2.Results in a collection of n disconnected offset edges, each pair of adjacent offset edges is connected by circular arc of radius r, whose supporting circle is centred at
pi
48
Offsetting a polygon
P is a non-convex polygon:
polygons
cycle is needed there → segments + arcs P1,...,P m
49
Adapted by Wein2
50
Exact representation of the offset edges
circular arcs
circles, as their centre points (polygonal vertices) always have rational coordinates and their radii equal [Wein2]
radius r are in general irrational [Wein2] r ∈ℚ
51
Problem
points quadratic equations with rational coefficients are solved
supported by a line of irrational coefficients
, then the line supporting where l is an irrational number p1 p2 is axbyc=0 where a ,b,c ∈ℚ p1 p2 is axbyclr =0
52
Problem
segments
53
Conic curve
edges
lying at distance r from the line ax+by+c = 0 axbyc2 a
2b 2
=r
2
54
the offset polygon
Problem:
Remedy:
lines, circles and arcs by using one-root numbers
arithmetic
55
The solution of is now a one-root number
exact manner
sign of a one-root number and comparing two
using only exact rational arithmetic [Wein2] ax
2bxc=0, with a,b,c∈ℚ,c≥0
, with ,,∈ℚ,≥0
56
With properties of one-root numbers:
for the arrangement construction and maintenance are using only exactly rational arithmetic
57
Remedy
expensive computation with algebraic numbers
58
Approximation scheme
its length l is a rational number [Wein2]
manner
y 1=y 2 x1=x2 y 1≠y 2 and x1≠x 2
59
Approximation scheme
segments by finding two points with rational coefficients
v ' 1 and v ' 2 v ' j shall lie on the circle x−x j
2y−y j 2=r 2
60
Adapted by Wein2
61
Summary
62
Content based on
Minkowski Sums
Sums
Sums using the Convolution Method