Minkowski Sums and Offset Polygons - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

Minkowski Sums and Offset Polygons

Description:

KD-decomposition: adding vertical and horizontal segments. ... by a geometric traits-class. The CGAL Arrangement Package. Common intersection. points ... – PowerPoint PPT presentation

Number of Views:54
Avg rating:3.0/5.0
Slides: 36
Provided by: hezi2
Category:

less

Transcript and Presenter's Notes

Title: Minkowski Sums and Offset Polygons


1
Minkowski Sums and Offset Polygons
  • Ron Wein

2
Computing Minkowski Sums
3
Planar 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

4
The Sum Complexity (I)
  • 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.

5
The Sum Complexity (II)
  • 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 ?(m2n2).

6
The Decomposition Method
  • 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.

7
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.
8
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(r2n log n)
time.
Optimal sum-degrees decomposition minimizing the
sum of squared vertex degrees.
9
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.
10
Computing the Union
  • Given a set of polygons S1, , SM with
    counterclockwise (positive) orientation,
    construct the arrangement of their edges.
  • Set N(fu) 0 for the unbounded face fu. Then
    compute N(f ) for each other face using a
    simple BFS traversal.
  • All faces with N(f ) gt 0 contribute to the
    union.

(1)
(2)
(0)
(0)
(1)
(1)
(2)
11
Convolution of Planar Tracings(Guibas, Ramshaw
and Stolfi, 1983)
  • 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).

12
Convolution of Polygons (I)
  • 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.

13
Convolution of Polygons (II)
  • 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.

14
The Case of a Single Cycle
Q
P
2
0
0
2
2
1
15
The Case of Multiple Cycles
  • 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.

16
The Minkowski-Sum Package of CGAL
17
The CGAL Arrangement Package
  • 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.
  • Handles degenerate cases robustly and
    accurately, relying on the exact
    computation paradigm.

Tangencypoints
Common intersectionpoints
18
The Decomposition Method
  • The Minkowski-sum package re-implements the
    robust algorithms for sum-computations
    using the convex polygon- decomposition
    method (Agarwal, Flato and Halperin, 2000).

19
The Convolution Method
  • 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.

20
Low-Dimensional Features
  • 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.

21
Experimental Input Sets (I)
stars
chain
fork
comb
22
Experimental Input Sets (II)
cavity
random
knife
country
23
Experimental Results Decomposition
24
Experimental Results Convolution
25
Polygon Offsetting
26
Polygon Offsetting using the Convolution Method
Br
P
2
Computing the convolution cycle
Computing the induced arrangement and the winding
numbers
0
0
2
2
1
27
Related Traits Classes
  • Computing the sum of two polygons (objects of
    the type Polygon_2ltKernelgt) is of course
    performed using the Arr_segment_traits_2ltKernelgt
    class and using exact rational arithmetic.
  • 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).

28
Offsetting a Polygon Edge (I)
? ? - 90º
p2 (x2, y2)
p1 (x1, y1)
29
Offsetting a Polygon Edge (II)
  • If the line supporting p1p2 is ax by c
    0, then the line supporting q1q2 is ax by
    (c lr) 0.
  • Problem In the general case, offset arcs are
    not supported by rational lines!

30
Our Approximation Scheme
p2
p1
31
Computing Rational Angles (I)
  • Using the half-angle formulae we have
  • Observation If ? is rational, then sin(?) 2?
    / (1 ? 2) andcos(?) (1 - ? 2) / (1 ? 2) are
    also rational.

32
Computing Rational Angles (II)
33
The Approximation Quality
  • Lemma For any polygon edge connecting (x1, y1)
    and (x2, y2) whose length is l and any ? gt 0, if
    we take an approximation of the edge length that
    satisfiesthen the approximation erroris
    bounded by ?.

q
q2
q1
p2
p1
34
Running Times
?
?
?
?
?
?
?
?
?
(Pentium IV 3 GHz, in milliseconds)
?
35
Thank you!
Write a Comment
User Comments (0)
About PowerShow.com