Table of Contents
Fetching ...

Nesting of Touching Polygons

Carsten R. Seemann, Peter F. Stadler, Marc Hellmuth

TL;DR

The paper addresses nesting of polygons with non-overlapping interiors that may touch, extending a prior sweep-line framework to accommodate boundary contacts. It introduces maximal outstretched segments and a parity-based sweep-line mechanism to determine inside/outside relationships, and develops an ordering scheme that allows building the nesting forest in $O(n+N\log N)$ time, where $n$ is the total number of vertices and $N$ the total number of maximal outstretched segments. The main contributions are the generalization to touching polygons, the formalization of segment parities and sweep-adjacency, and the concrete algorithm and analysis showing asymptotic optimality in common cases such as convex polygons. The approach enables efficient nesting computation for complex polygon sets and lays groundwork for extensions to touching point localization and connected-component nesting.

Abstract

Polygons are cycles embedded into the plane; their vertices are associated with $x$- and $y$-coordinates and the edges are straight lines. Here, we consider a set of polygons with pairwise non-overlapping interior that may touch along their boundaries. Ideas of the sweep line algorithm by Bajaj and Dey for non-touching polygons are adapted to accommodate polygons that share boundary points. The algorithms established here achieves a running time of $\mathcal{O}(n+N\log N)$, where $n$ is the total number of vertices and $N<n$ is the total number of "maximal outstretched segments" of all polygons. It is asymptotically optimal if the number of maximal outstretched segments per polygon is bounded. In particular, this is the case for convex polygons.

Nesting of Touching Polygons

TL;DR

The paper addresses nesting of polygons with non-overlapping interiors that may touch, extending a prior sweep-line framework to accommodate boundary contacts. It introduces maximal outstretched segments and a parity-based sweep-line mechanism to determine inside/outside relationships, and develops an ordering scheme that allows building the nesting forest in time, where is the total number of vertices and the total number of maximal outstretched segments. The main contributions are the generalization to touching polygons, the formalization of segment parities and sweep-adjacency, and the concrete algorithm and analysis showing asymptotic optimality in common cases such as convex polygons. The approach enables efficient nesting computation for complex polygon sets and lays groundwork for extensions to touching point localization and connected-component nesting.

Abstract

Polygons are cycles embedded into the plane; their vertices are associated with - and -coordinates and the edges are straight lines. Here, we consider a set of polygons with pairwise non-overlapping interior that may touch along their boundaries. Ideas of the sweep line algorithm by Bajaj and Dey for non-touching polygons are adapted to accommodate polygons that share boundary points. The algorithms established here achieves a running time of , where is the total number of vertices and is the total number of "maximal outstretched segments" of all polygons. It is asymptotically optimal if the number of maximal outstretched segments per polygon is bounded. In particular, this is the case for convex polygons.
Paper Structure (12 sections, 47 theorems, 7 equations, 5 figures, 1 algorithm)

This paper contains 12 sections, 47 theorems, 7 equations, 5 figures, 1 algorithm.

Key Result

Lemma 3.2

For a segment $S$, the following three conditions are equivalent:

Figures (5)

  • Figure 1: Decompositions of polygons into segments. In all examples, $S_i$ is maximal outstretched and $S_i$ and $S_{i+1}$ are consecutive. According to \ref{['lem:bSPp']}, all maximal outstretched segments $S_i$ and $S_j$ are edge-disjoint and intersect at most in their terminal vertices. If they intersect, $\min(S_j)=\min(S_i)$ or $\max(S_j)=\max(S_i)$ must hold, and $S_i$ and $S_j$ are consecutive. Otherwise, two consecutive maximal outstretched segments $S_i$ and $S_j$ are separated by a single vertical segment and $\min(S_j)_x=\min(S_i)_x$ or $\max(S_j)_x=\max(S_i)_x$ must hold. Left: The vertical segment $S'$ is not contained in a maximal outstretched segment. The maximal outstretched segments $S_2$ and $S_3$ are consecutive with distinct terminal vertices. However, $\min(S_2)_x = \min(S_3)_x$ and the terminal vertices $\min(S_2)$ and $\min(S_3)$ are connected by a path consisting of vertical edges, namely the vertical segment $S'$. All other consecutive maximal outstretched segments intersect in precisely one vertex. Middle and Right: In the middle example the two consecutive segments $S_1$ and $S_2$ are vertex-disjoint. In contrast, the example on the right shows two consecutive outstretched segments $S_1$ and $S_2$ with $|V(S_1)\cap V(S_2)|=2$ and thus, according to \ref{['lem:bSPp']}, $S_1\cup S_2 = P$.
  • Figure 2: Relationships between the parity of maximal outstretched segments and location of points. The Polygon $P$, which bounded by the gray area, contains four maximal outstretched segments $S_1$, $S_2$, $S_3$, and $S_4$. Three sweep-lines are indicated at positions $\xi$, $\xi'$, and $\xi"$. We observe $\xi,\xi',\xi"\in I[S_4)$ and $\mathcal{N}_{\xi,S_4} = \mathcal{N}_{\xi',S_4} = \{S_1,S_4\} \neq \{S_1,S_2,S_3,S_4\}=\mathcal{N}_{\xi",S_4}$. Nevertheless, the the cardinality of these sets is always even, and thus we have $\varpi(S_4)=0$. In particular, the blue segments $S_2$ and $S_4$ have the parity $\varpi(S_2)=\varpi(S_4)=0$, while the red segments $S_1$ and $S_3$ have the parity $\varpi(S_1)=\varpi(S_3)=1$. Note that parities of consecutive segments necessarily alternate. For the three points $p\in \mathop{\mathrm{Int}}\nolimits(P)$ and $p',p"\in\mathop{\mathrm{Ext}}\nolimits(P)$, we observe the following: (1) $p_x\in I[S_1)$ and $p_y<y(S_1,p_x)$, (2) there is no maximal outstretched segment $S_i$ of $P$ with $p_x\in I[S_i)$ and $p_y<y(S_i,p_x)<y(S_3,p_x)$, and (3) $\varpi(S_1)=1$, see \ref{['prop:ibp']}. No such segment exists for $p'\notin \mathop{\mathrm{Int}}\nolimits(P)$ and $p"\notin \mathop{\mathrm{Int}}\nolimits(P)$, respectively.
  • Figure 3: A "crossing" pair of maximal outstretched segment $S_1$ and $S_2$ implies that the corresponding polygons $P_1$ and $P_2$ overlap. In particular, there are two positions $\xi,\xi' \in I[S_1)\cap I[S_2)$ such that $y(S_1,\xi)>y(S_2,\xi)$ and $y(S_1,\xi')<y(S_2,\xi')$. Thus, $S_1$ and $S_2$ intersect (illustrated by the dashed line), and \ref{['lem:mos-le-1']} implies that $P_1$ and $P_2$ are overlapping.
  • Figure 4: Sweep-adjacency in a set $\mathcal{P}=\{P_1,P_2,P_3,P_4,P_5\}$ of polygons. We have $\mathop{\mathrm{Int}}\nolimits(P_5)\subsetneq \mathop{\mathrm{Int}}\nolimits(P_4)$, and $\mathop{\mathrm{Int}}\nolimits(P_i)\cap\mathop{\mathrm{Int}}\nolimits(P_j)=\emptyset$ for all $i,j \in \{1,\ldots,5\}$ with $\{i,j\}\ne\{4,5\}$. The parities of their maximal outstretched segments $S_i$ are colored red if there is a polygon $P_j$ with $\varpi(S_i,P_j)=1$, and are colored blue if there is a polygon $P_j$ with $\varpi(S_i,P_j)=0$. Note that the parity of segment depends on the segments to which it belongs: The $S_2$ appears in both $P_1$ and $P_2$ with distinct parities $\varpi(S_2,P_1)=1\neq 0=\varpi(S_2,P_2)$. Such (parts of) segments are shown as blue-red-dashed lines. Note, furthermore, that $S_4\subseteq S_3$ with $(S_3,P_2),(S_4,P_3)\in (\mathcal{S},\mathcal{P})$. Sweep-adjacency of maximal outstretched segments is determined for pairs of polygons: First, $(S_2,P_2)$ is only sweep-adjacent to $(S_2,P_1)$ (witnessed by $\xi_1$) but not to any other $(S_i,P_j)\in(\mathcal{S},\mathcal{P})$. In contrast, $(S_2,P_1)$ is sweep-adjacent to $(S_2,P_2)$ and $(S_4,P_3)$ (witnessed by $\xi_1$). Moreover, $(S_5,P_3)$ and $(S_6,P_4)$ (resp., $(S_9,P_3)$ and $(S_8,P_4)$) are sweep-adjacent (witnessed by $\xi_2$). Hence, $(*,P_i)$ and $(*,P_j)$ with $i\ne j$, which are sweep-adjacent, are not necessarily unique. Finally, note that $(S_8,P_5)$ and $(S_{11},P_3)$ are sweep-adjacent witnessed by $\xi_3$. However, their sweep-adjacency is neither witness by $\xi_2$ (since \ref{['def:adjacent']} (2) is violated) nor by $\xi_4$ (since \ref{['def:adjacent']} (1) is violated).
  • Figure 5: Intersection of maximal outstretched segments does not imply sweep-adjacency as shown by the maximal outstretched segments $S_1$ of $P_1$ and $S_2$ of $P_2$. We observe $\mathop{\mathrm{Int}}\nolimits(P_1)\cap \mathop{\mathrm{Int}}\nolimits(P_2)=\emptyset$ and $I[P_1)=I[P_2)$, and $V(S_1)\cap V(S_2)\ne \emptyset$ and $E(S_1)\cap E(S_2)\ne\emptyset$. It is easy to verify that for every $\xi \in I[S_1)\cap I[S_2)$, we have either $y(S_1,\xi)>y(S'_1,\xi)>y(S_2,\xi)$ (if $p_x\le \xi$), or $y(S_1,\xi)>y(S'_2,\xi)>y(S_2,\xi)$ (otherwise). Hence, for all $\xi\in I[S_1)\cap I[S_2)$, the condition of \ref{['def:adjacent']} is not satisfied; and thus, $(S_1,P_1)$ and $(S_2,P_2)$ cannot be sweep-adjacent. Hence, neither $V(S_1)\cap V(S_2)\ne \emptyset$ nor $E(S_1)\cap E(S_2)\ne\emptyset$ is not sufficient to imply sweep-adjacency.

Theorems & Definitions (103)

  • Remark 2.1
  • Definition 3.1
  • Lemma 3.2
  • proof
  • Definition 3.4
  • Lemma 3.5
  • proof
  • Lemma 3.6
  • proof
  • Definition 3.7
  • ...and 93 more