Acessibilidade / Reportar erro

Using sentinels to detect intersections of convex and nonconvex polygons

Abstract

We describe finite sets of points, called sentinels, which allow us to decide if isometric copies of polygons, convex or not, intersect. As an example of the applicability of the concept of sentinel, we explain how they can be used to formulate an algorithm based on the optimization of differentiable models to pack polygons in convex sets. Mathematical subject classification: 90C53, 65K05.

sentinels; polygons; intersection; packing; nonlinear programming


Using sentinels to detect intersections of convex and nonconvex polygons

W.F. Mascarenhas; E.G. Birgin

Computer Science Department, Institute of Mathematics and Statistics University of São Paulo, Rua do Matão, 1010, Cidade Universitária 05508-090 São Paulo, SP, Brazil E-mails: walterfm@ime.usp.br/ egbirgin@ime.usp.br

ABSTRACT

We describe finite sets of points, called sentinels, which allow us to decide if isometric copies of polygons, convex or not, intersect. As an example of the applicability of the concept of sentinel, we explain how they can be used to formulate an algorithm based on the optimization of differentiable models to pack polygons in convex sets.

Mathematical subject classification: 90C53, 65K05.

Key words: sentinels, polygons, intersection, packing, nonlinear programming.

1 Introduction

In [1] we propose a nonlinear programming approach to pack arbitrary polygons in convex sets (not necessarily polygons). This approach is based on the observation that if the interior of translated and rotated copies P' and Q' of the polygons P and Q in Figure 1 intersect then either the interior of P' contains one of the points or the interior of Q' contains some . Motivated by this fact, we say that the pi and qi are sentinels for {P,Q} with respect to translationsand rotations.


The observation above leads to the following algorithm to pack translated and rotated copies of P1, P2, ..., PN on a convex set C:

1. We parameterize Pi by the coordinates (xi,yi) of its barycenter and its rotation angle Φi .

2. We define differentiable functions ψij(xi,yi,θi,xj,yj,θj) based on the distance of the sentinels of Pi to Pj so that ψij(xi,yi,θi,xj,yj,θ) is zero if all the sentinels of Pi are outside the interior of Pj and ψij(xi,yi,θi,xj,yj,θ) is positive otherwise. (See [1] for an example of ψij-functions for identical rectangles.)

3. We find approximations to the solution of the feasibility problem

For each solution of problem (1) we obtain a packing of P1, P2, ..., PNin C.

In [1] we describe the nonlinear programming aspects of the approach above in detail, from the theoretical and practical perspectives. In [5, 7, 8], Stoyan's Φ-functions are introduced. A Φ-function for a pair of polygons is defined as a function whose value is positive if the polygons overlap and zero otherwise. Our functions ψ are analogous to Stoyan's Φ-functions in the sense that they are Φ-functions defined through the usage of sentinels. Sentinels can also be used to detect the intersection of rotated and translated copies of polygons [6].Finally, the concept of sentinel leads to packings which are not necessarily lattice-like [3].

In the present work we focus on the geometric aspects of the novel concept of sentinel. We formalize this concept for arbitrary families of polygons and discuss their existence and complexity. Sentinel is a neat concept, but unfortunately some polygons require an infinite number of them. For instance, ifinstead of the polygons P and Q in Figure 1 we consider translated and rotated copies of a single triangle T then no finite set of points {t1,...,tn}, no matterhow large, would be enough to detect all the intersections of T and a translated copy T' of it: see Figure 2; we can always translate T' (maintaining the overlapping with T) in order to have outside T and ta outside of T' no matter how near we define ta from tb and from .


Small internal angles are the main reason why we may need an infinite number of sentinels. More precisely, in the next section we show that if P is a finite family of convex and non-convex polygons P such that all the internal angles of P are bigger than or equal to π/2 then we can assign a finite set S(P)2 to each PP in such way that if T,U: 22 are isometries, P,QP and the interior of T(P) and U(Q) intersect then either T(S(P)) intersects the interior of U(Q) or U(S(Q)) intersects the interior of T(P). In Section 2 we also define the terms we use throughout the paper and present basic results about the existence of sentinels. In Section 3 we discuss sentinel assignments for rectangles, which are the main motivation behind [1]. We present minimal sets of sentinels for the families of rectangles that motivated [1] and lead us to define the concept of sentinel. The last section contains concluding remarks.

2 Sentinels

In this section we formalize the concept of sentinel and prove the existence of finite sets of sentinels for relevant families of polygons. We start by defining the basic terms we use:

Notation 1. If u,v2 then we call the segment with extremes u and v by uv.

Convention 1. A polygon P is defined in terms of an integer n > 3 and vertices pi2, for i ∈ , such that

(a) pi + n = pi for all i and pi + jpi if j is not a multiple of n.

(b) pipi-1pi+1 for all i.

(c) If the segments pi pi+1 and pj pj+1 intersect then either

    (i) ij mod n, or

    (ii) ij + 1 mod n and pi pi+1pj pj+1 = {pi}, or

    (iii) i + 1 ≡ j mod n and pi pi+1pj pj+1 = {pj}.

These conditions imply that P is a Jordan curve. We denote the interior of this curve by int(P) and its border by border(P). Moreover, we assume that the points pi are in counterclockwise order and use n(P) to denote n.

Notation 2. Sub(2) denotes the set whose elements are the subsets of 2.

Using this terminology we can formalize the concept of sentinel:

Definition 1. Let P be a family of polygons and let T be a family of transformations T: 22 such that T(P) is a polygon for all P ∈ P. We say that a function S: P → Sub(2) is a sentinel assignment for P with respect to T if for all T, U ∈ T and P, Q ∈ P such that int(T(P)) ∩ int(U(Q)) ≠ Ø we have that either int(T(P)) ∩U(S(Q)) ≠ Ø or int(U(Q)) ∩T(S(P)) ≠ Ø. In this context, we say that the elements of S(P) are the sentinels of P.

In this paper we care only about two families T of transformations:

Notation 3. The isometries of 2 are transformations of the form T(x) = Qx + d, where Q is a 2 ×2 orthogonal matrix and d2. We call the set of such isometries by I2. We define as the set of transformations T above with det Q = 1.

In this section we provide sufficient conditions on the family P of polygons to guarantee the existence of a sentinel assignment S for P with respect to I2 such that S(P) is finite for all PP. In the next section we discuss the analogous question when P is a family of rectangles and the family of transformations is . These conditions are expressed in terms of the parameter α (P):

Notation 4. We call the smallest internal angle of the polygon P by α (P).

The relevance of α (P) is illustrated in Figure 3. According to this figure, we can decide whether b is inside, over or outside the circle with diameter ac by looking at the angle α. This figure is the motivation for the condition α (P) > π/2 used throughout this paper.


Besides α (P) our results are formulated using the sets Δ(P):

Definition 2. Let P be a polygon with n > 4 vertices (remember that we are dealing with convex and nonconvex polygons). We define Δ(P) as the set formed by the positive δ's such that every segment uv connecting disjoint sides of P has length bigger than δ .

Unfortunately, Δ(P) is not as simple as α(P), starting with the fact that it is a set and not a number. Please, pay much attention to this fact, because it does not follow the computational geometry tradition of using numbers to characterize properties of polygons. For instance, the supremum of our sets Δ(P) could be related to the several attempts to quantify the fatness of a polygon (see [4]) but our approach is different: we look at the whole set Δ(P) , not only at its supremum.

If P is convex and α(P) > π/2 then Δ(P) = (0,µ(P)], where µ(P) is the length of P's shortest side. In this particular case the arguments below could be rephrased in terms of µ(P). However, in [1] we care mainly about rectangles and if R is a rectangle then Δ(R) = (0,µ(R)) does not contain µ(R). Therefore, in order to unify the treatment of rectangles and polygons with bigger internal angles we chose to use Δ(P).

Using α(P) and Δ(P) we can state the key results behind most arguments in this paper. Given a family P of polygons and a function S: P → Sub(2), Theorems 1 and 2 give sufficient conditions for S to be a sentinel assignment for P with respect to I2. Lemmas 1, 2 and 3 present technical results used to prove the theorems.

Lemma 1. Let P and Q be polygons with α(P) > π/2 and a(Q) > π/2. Suppose u, v, w ∈ qk qk+1 are such that ║u- qk║ < ║v - qk║ < ║w - qk║ and

(a) u,w ∉ (P), (b) v ∈ int(P) and (c) ║u - w║∈ Δ(P) ∩ Δ(Q).

If no vertex of P is in the interior of Q then there exists a vertex pj of P with pj-1 pj ∩ uv = {x} and pjpj+1 ∩ vw = {y} (see Fig. 4). Moreover, x and y are such that xy - {x,y} ⊂ (P),


Proof of Lemma 1. Let xy be the biggest segment contained in qkqk+1 such that v ∈ xy and xy - {x,y} ⊂ int(P) and consider the sides pi pi+1 and pj pj+1 such that xpi pi+1 and y ∈ pj pj+1. Items (a) and (b) imply that xyuw. Item (c) shows that ║x -y║ < ║u - w ║ ∈ Δ(P). Since x ∈ pipi+1 and ypj pj+1, the definition of Δ implies that pi pi+1pj pj+1≠ Ø.

Let p ∈ {pj,pj+1} be the common vertex of pi pi+1 and pj pj+1. According to Figure 3, p belongs to the disk D = { z2 with ║2 z - (x + y) ║ < ║x - y║ }. If L and R are the open half planes on the left and right sides of the line qk qk+1 then, in principle, we have the two possibilities regarding p described in Figure 4. However, the situation on the left side of this figure does not occur, because DL ⊂ (Q) and there is no vertex of P in int(Q) by hypothesis.In fact, notice that D L cannot intersect sides of Q which are nonconsecutive to qk qk+1 because (c) implies that the distances from such sides to qk qk+1is bigger than the radius of D. Moreover, D L does not intersect the sides qk-1 qk and qk+1 qk+2 either, because the internal angles of Q are at least π/2. This implies that DL is contained in the interior of Q and, thus, p ∉ D L as we claimed. Therefore, we must have p = pj = pi+1DR as described in the right side of Figure 4 and the bounds in (2) holds because the diameter of D is at most ║u - w║. (For further reference, as pi+1pj, we will referto pipi+1 as pj-1pj.)

Lemma 2. Let P, Q and {x} = qkqk+1∩ pj-1 pj as in Lemma 1. Assume that x ≠ qk and let c ∈ border(P) ∩ border(Q) be the first point different from x encountered when walking x pj-1 from x to pj-1 (see Fig. 5)1 1 Note that pj-1pj ∩ uv = pj-1pj ∩ qkqk+1 = { x} ≠ qk implies that the segments qkqk+1 and pj-1pj are not colinear and the point c is well defined. . Then, either

or


Proof of Lemma 2. Let qm qm+1 be the side of Q containing c. We will first show that qm qm+1qk qk+1 and qmqm+1qk+1 qk+2. Since xqk qk+1 -{ qk}, cqm qm+1 and Ø ≠ xc -{x,c} ⊂ (Q) we have that x and c are in different sides of Q and, in consequence, qm qm+1qk qk+1. Considering the triangle with vertices xpjy (right hand side of Fig. 4) and knowing that xpjy = pj-1pjpj+1 > π /2 we have that qk x c ≅ pj x y < p/2. Then qk x c < π/2 implies that qk+1 xc > π /2. This and qk qk+1qk+2> π/2 imply that the half lines x + γ1 (c - x) and qk+1+ γ2 (qk+2- qk+1), γ12> 0, never intersect. Thus, cqk+1qk+2 and qmqm+1qk+1 qk+2.

Therefore, we have only these two possibilities regarding qmqm+1:

  • qm qm+1 = qk-1qk. In this case ║x - c║ > max{║c - qk║, ║qk - x║} because xc is the biggest side in the (nonempty) triangle with vertices x qk c, since the angle x qk c is equal to qk+1qk qk-1, which is at least π/2.

  • qm qm+1qk-1qk. In this case, by definition of Δ, ║x - c║ > δ for all δ ∈ D(Q). This implies that ║x - c║ > sup Δ(Q).

Clearly, a symmetric result can be obtained for {y} = qk-1qkpjpj+1 defined in Lemma 1.

Part of the hypothesis of the main theorem in this section requires that each polygon in P has an internal sentinel outside the forbidden region F(P,δ) that we now describe. Suppose P is a polygon and δ > 0 satisfies δ < ║pi+1 - pi║ for all i. For each vertex pi of P we define the forbidden corner FC(P,i,δ ) as FC(P,i,δ) = { x = λu + (1 -λ)v for λ ∈ (0,1), upi-1pi, vpipi+1, uv - {u,v}⊂ int(P) and ║u - v║ < δ}

(see Fig. 6) and we define the forbidden region


The next lemma shows that we can always find internal sentinels outside the forbidden regions for any polygon with n > 3 vertices.

Lemma 3. If P is a polygon with n > 3 vertices and δ Δ(P) then the set int(P) - F(P,δ) is not empty.

Proof of Lemma 3. We analyze convex and non-convex polygons separately.

Let us start with P convex. For each i = 0,...,n-1 let Pi be the convex polygon with vertices {p0,...,pn-1} - {pi}. Note that

PiPj∩ Pk⊃ {p0,...,pn-1} - {pi, pj,pk} ≠ Ø

for every triplet i, j, k. Therefore, Radon's theorem implies that

The set A does not contain vertices or sides of P. Thus, A ⊂ int(P). Moreover, the interior of the ears of P do not intersect A. It is clear then that int(P) - F(P,δ) ⊃ A ≠ Ø and we are done with the convex case.

If P is not convex then there exists at least one i such that the anglepi-1pi pi + 1 is bigger than π. Let ε ∈ (0, δ/4) be such that

belongs to int(P). Geometrically (see Fig. 7), s is a point in the bisectrix of the angle pi-1pi pi + 1 very close to pi:


To complete this proof we will show that s ∈ int(P) -F(P, δ ), i.e., it does not belong to any forbidden corner FC(P,j,δ) with pj-1pj pj+1 < π. Consider a forbidden corner FC(P,j,δ) as above. Let upj-1 pj and vpj pj+1 be such that suv, uv - {u,v} ∈ int(P). To prove that sFC(P,j,δ) is enough to show that ║u - v║ > δ. Noticing that pj-1 pjpj+1 < π < pi-1pi pi+1 implies i ≠ j, we are left with the three cases:

(i) j = i + 1 (described in Fig. 7a),

(ii) j = i - 1 (described, after reflection, in Fig. 7a),

(iii)j ∉ {i - 1, i, i + 1} (described in Fig. 7b).

Cases (i) and (ii) differ only by a reflection and we will threat both as case (i).

Let us start with case (i). Since P has more than three vertices, we have that pi-1pi and pi+1pi+2 are not consecutive. Thus, by definition of Δ(P) we have that ║pi - v║ > δ. Now,

v pi u > s pi u = pi-1pi pi+1 / 2 > π/ 2.

This implies that ║u - v║ > ║pi - v║ > δ and we are done with cases (i) and (ii).

Finally, let us handle case (iii). In this case the sides pipi+1 and pj pj +1 are not consecutive. Thus, by definition of δ, ║pi - v║ > δ. As a consequence,

Analogously, since the sides pi-1pi and pj-1pj are not consecutive we get that ║pi - u ║ > δ and then

Combining (6) and (7) we get

u - v║ = ║u - s║ + ║ s - v ║ > δ/2 + δ/ 2 = δ

and the proof is complete.

Now we can address the main question of this section: Given a family P of polygons and a function S: P → Sub(2), give sufficient conditions for S to be a sentinel assignment for P with respect to I2.

Theorem 1. Let P be a family of polygons such that, for each P ∈ P, α(P) > π/2. Let S be a function from P to Sub(2). Assume that for all P ∈ P

(a) S(P) contains the vertices of P;

and that there exists δ ∈ ∩PPΔ(P) for which

(b) for each side pi pi+1 of P there exist ni and sj≡ pi + (γj / Γ) (pi+1-pi) ∈ S(P), where Γ = ║pi+1-pi║, such that γj∈ [0,Γ] for j = 1,...,ni, if ni ≠ 0 then γ1 = δ and γni = Γ- δ, γjj+1 and | γj - γj+1 | < δ for j = 1,...,ni-1;

(c) he set S(P) contains a point in int(P) -F(P, δ).

Then S is a sentinel assignment for P with respect to I2.

Proof of Theorem 1. Consider members A and B of P and T, UI2. Define P = T(A), Q = U(B), (P) = T(S(A)) and (Q) = U(S(B)). Since T and U are isometries, hypotheses (a), (b) and (c) also apply to P and (P) and Q and (Q). To prove Theorem 1, we assume that there exists a point z ∈ (P) ∩ int(Q) and show that either

Hypothesis (c) implies that there exists s(P) ∩ (int(P) - F(P,δ)). If s ∈ int(Q) then the first condition in (8) is satisfied and we are done. Thus, we assume that s∉ int(Q). Since s and z are in the interior of the Jordan curve P, there exists a continuous path contained in the interior of P connecting s to z. This path intersects border(Q) at some point v because s ∉ int(Q) and z ∈ int(Q). If v(Q) then the second condition in (8) is satisfied and we are done again. Thus, we only need to care about the case in which v(Q) and v is the first intersection of the path above and border(Q), that is, there exists a continuous function Φ:[0,1] → 2 such that

If qk qk+1 is the side of Q that contains v, then by hypotheses (a) and (b) thereexist u,w(Q) ∩qk qk+1 such that vuw, ║u- w║ < δ and ║ u - qk ║ < ║ w - qk ║. If u or w belong to int(P) then the second condition in (8) is satisfied and we are done. To complete this proof, let us now derive a contradiction from the assumption that hypothesis (c) holds and neither u nor w belong to int(P). In this case Lemma 1 implies that there exist pj-1, pj and pj+1, vertices of P, and {x} = uvpj-1pj, {y} = vwpj pj+1 and xy - {x,y} ⊂ int(P) like the ones in Figure 8.


This figure is also accurate regarding the fact that s is in the interior of the triangle τ = x pj y. In fact, (9) implies that the path Φ([0,1]) does not cross x pj nor pj y and Φ([0,1)) does not touch yx. Moreover, if ε is small Φ(1 - ε) is close to v and outside Q. This implies that Φ(1 - ε) ∈ int(τ) for e small. Since Φ([0,1)] does not touch border(τ) we have that Φ([0,1)) ⊂ int(τ). In particular, s = Φ(0) ∈ int(τ). However, equation (2) shows that ║x -pj║ < δ and ║pj - y║ < δ. This implies that int(τ) ⊂ FC(P,j,δ) and we deduce that sF(P). This conclusion contradicts our choice of s at the beginningof this proof.

Theorem 1 implies that if P is a finite family of polygons P with α(P) > π/2 then there exists a sentinel assignment S for P with respect to I2 such that S(P) is finite for all PP: take an arbitrary choice of δ ∈ ∩ PP Δ(P), for example,

and for each PP choose a finite set S(P) of sentinels that satisfy the conditions (a)-(c) in Theorem 1. Lemma 3 guarantees that it is possible to find a point satisfying condition (c) of Theorem 1.

Using Theorem 1 you can prove the following corollary to justify our claim regarding the intersections of rotated and translated copies of the pentagon and the hexagon in the first page of this paper:

Corollary 1. Let δ > 0 and let P be a family of convex polygons such that, for all P ∈ P we have that α(P) > π/2 and all sides of P have length δ. For P ∈ P take s ∈ int(P) - F(P,δ) and define S(P) = {s,p1,p2,...,pn(P)}. The function S is a sentinel assignment for P regarding I2. (S satisfies hypotheses (a) and (c) by definition and hypothesis (b) with ni = 0.)

We have seen that Theorem 1 can be used to construct sentinel assignments for certain families of polygons or to verify that a given assignment S that satisfies the hypotheses of Theorem 1 is a sentinel assignment. However, there is a simple and important case that is not covered by Theorem 1. Consider a family P of identical squares P of side d. In this case we have that Δ(P) = (0,d) for all PP. Let δ = Consider a sentinel assignment S for P such that, for each PP, S(P) is given by a sentinel in each vertex of P, a sentinel in the middle of each side of P and a sentinel in int(P)- F(P,δ). This S satisfies hypotheses (a) and (b) but does not satisfy hypothesis (c) of Theorem 1. Therefore, Theorem 1 can not be used to certify that S is, in fact, a sentinel assignment for P.The theorem below is similar to Theorem 1 except for the fact that hypothesis (c) is replaced by a couple of other hypotheses satisfied by the sentinel assignment described above.

Theorem 2.

Let P be a family of polygons such that, for all P ∈ P, α(P) > π/2. Let S be a function from P to Sub(2). Assume that for all P ∈ P

(a) >S(P) contains the vertices of P;

and that there exists δ ∈ ∩PPΔ(P) that satisfies

(b) for each side pi pi+1 of P there exist ni and sj≡ pi + (γj / Γ) (pi+1-pi) ∈ S(P), where Γ = ║pi+1-pi║, such that γj∈ [0,Γ] for j = 1,...,ni, if ni ≠ 0 then γ1 = δ and γni = Γ- δ, γjj+1 and | γj - γj+1 | < δ for j = 1,...,ni-1;

(c) S(P) ∩ int(P) ≠ Ø; and

(d) ║pi+1 - pi> 2δ for all i ∈ .

Then S is a sentinel assignment for P with respect to I2.

Proof of Theorem 2. This proof follows very closely the proof of Theorem 1. Thus, we will assume that there exists a point z ∈ int(P) ∩ int(Q) and show that either

By hypothesis (c), there exists s(P) ∩ int(P) and let v ∈ int(P) be the first point that belongs to border(Q) encountered when walking the continuous path from s to z trought the interior of P. If s ∈ int(Q) or if v (Q) then (10) holds and we are done. Therefore, we only need to care about the case in which there exists a continuous function Φ:[0,1] → 2 such that

Let qk qk+1 be the side of Q that contains v. Then, hypotheses (a) and (b) imply that there exist u,w (Q) ∩ qk qk+1 such that vuw, ║u- w║ < δ and ║ u - qk ║ < ║ w - qk║. If (Q) ∩ int(P) ≠ Ø we are done. So, we assume that u,w ∉ int(P). In this case Lemma 1 implies that there exist pj-1, pj and pj+1, vertices of P, and {x} = uv pj-1pj and {y} = vwpj pj+1 like the ones in right hand side of Figure 4. Hypothesis (d) and the fact that ║u - w║ < δ imply that either uqk or wqk+1. By symmetry, assume that u qk which implies that x ≠ qk (in fact, it implies that ║x - qk║ > δ). In this case, by Lemma 2, there exists c ∈ border(P) ∩border(Q), the first point different from x encountered when walking x pj-1 from x to pj-1 (see Fig. 5), such that either (3) or (4) holds. By (3) and the fact that ║x - qk║ > δ or by (4) and the fact that δ ∈ Δ(Q), we have that ║x - c║ > δ.So, we have xc ⊂ int(Q) ∩pj-1 pj and ║x - c║ > δ. By hypothesis (b) there exists txc (P) and, thus, we have verified (10).

3 Sentinels for rectangles

In this section we present optimal sentinel assignments for rectangles with respect to . We assume that a = a(R) = ║r0 - r1║ is the longest side of the rectangle R and b = b(R) = ║r0 - r3║ is the smallest side. We define sentinel assignments that depend on two parameters δ and ρ: given a rectangle R we define Sδρ(R) as the set of points indicated by circles in Figure 9.


Formally, given a rectangle R and δ and ρ with 0 < δ, ρ < ║r3 - r0║ we define Sδρ(R) as the set formed by:

1. The vertices r0, r1, r2, r3 of R.

2. The points si = ri + δ(ri + 1 - ri)/║ri+1 -ri║ for i = 0,1,2 and 3.

3. If b > 2δ, the points xi= s3+ i (r0 - s3) /nγ and yi = s1 + i (r2 - s1) / nγfor 1 < i < nγ ,with nγ = ⌈(b - δ) / δ⌉ .

4. If a > 2δ, the points ti = ρ(r3 - r0)/b + (s0 -r0) + i Δ/ nτ, for 1 < i < nτ, with Δ = r1 - r0- 2 (s0 - r0) and nτ= é⌈║Δ║ /δ⌉.

5. If a < 2 δ, the point s = (r0 + r1 + r2 + r3)/4.

The following theorem is the main result in this section:

Theorem 3. Let R be a family of rectangles and suppose δ ∈ ∩RRΔ(R). If for all RR we have ρ(R) ∈ (0,b(R)) such that

then the function S: R → Sub(2) given by S(R) = Sδρ(R)(R) is a sentinel assignment for R with respect to .

If all rectangles in RR have δ < b(R) < 2δ then the sets Sδρ(R)(R) contain only one element in each smaller side of R and the sentinel assignment S above in Theorem 3 is optimal, i.e., if S' is another sentinel assignment for R with respect to then S'(R) has at least as many elements as S(R). In fact, S'(R) must contain the vertices of R and at least one element in each side of R. Moreover, if S'(R) does not contain as many elements as S(R) then it is possible to superimpose a copy of R rotated by π/2 and R in order to contradict the definition of sentinel assignment.

We end this paper with the proof of Theorem 3:

Proof of Theorem 3. The sets Sδρ(R) and the condition (12) are invariant under , in the sense that if Tand R ∈ R then Sδρ(T(R)) = T( Sdr(R)) and b(R) = b(T(R)). Therefore, to prove Theorem 3 it is enough to show that if H and R are rectangles with ║h0 - h3║ > ║h1 - h2║, ║r0 - r3║ > ║r1 - r2║ and

and (H) ∩ int(R) ≠ Ø then

If a(H) < 2δ and a(R) < 2δ then (14) is a consequence of Theorem 1 applied to P = {H,R}. Thus, we can assume that a(H) = ║h1 - h0║ > 2δ. Moreover, if si are the sentinels described in Figure 9 for H and {h0,h1,h2,h3, s0,s1,s2,s3}∩ int(R) ≠ Ø then (14) is satisfied. Therefore, we only need to analyze the case

We leave to the reader, the verification of the fact that if h0 h1 and r0 r1 are parallel then (14) is satisfied2 2 when doing that, do not forget hypothesis (12). . From now on we analyze the case in which H is horizontal and R is a rotated rectangle as in Figure 10 or a rotated rectangle with a(R) < 2 δ.


To avoid conflicting names, we rename R's sentinels as in Figure 10: the s sentinels for R are called z's and the t sentinels are called w. Notice that in all polygons R in Figure 9 if ri is a vertex of R then there exists a sentinel zi at a distance δ from ri in the counterclockwise direction along R. Repeating the argument in the second paragraph of the proof of Theorem 1 with u = h0, w = s0and qk+1 = h1, we deduce that if int(R) ∩h0s0 ≠ Ø then {z0,z1,z2,z3} ∩int(H) ≠ Ø and (14) is satisfied. Therefore, from now on we assume that int(R) ∩ h0 s0= Ø. If R ∩ (h0 s0- {h0,s0}) ≠ Ø then we have only two possibilities:

  • h0 s0 and r1 r2 are parallel. In this case h0 s0 must be contained in the line r1 r2 and you can check that either (a) s1 ∈ int(R), (b) z2∈ int(H) or (c) s1 = z2 and t1∈ int(R).

  • h0 s0and r1 r2 are not parallel. In this case, since we are assuming that r0r1and h0 h1 are not parallel and that int(R) ∩ h0 s0 = δ, there is a vertex rih0s0 - {h0,s0} and (15) implies that zi ∈ int(H).

Thus, if R ∩ (h0 s0 - {h0,s0}) ≠ Ø then (14) is satisfied and we can assume that

Now let us analyze the intersections of R with the side h3 h0 of H. Since this side is populated with the sentinels h3, s3, xi and h0, which are at most δ apart, Lemma 1 yields that if int(R) ∩ h3 h0 ≠ Ø then we have a situation like the one in the right side of Figure 4, with qk = h3, qk+1 = h0 and qk+2 = h1 and pj as one vertex ri of R. We claim that in this case zi ∈ int(H). In fact, since ║zi - pi║ = δ is at least as big as the diameter of D we have that zi ∉ riy. Let δ be the point defined in items (iv)-(vi) of Lemma 1. We have this three possibilities:

  • d satisfies (iv): This case case contradicts (16) and need not to be considered.

  • d satisfies (v). In this case we have that

    and ║ri - d ║ >δ. This inequality combined with zizi y and ║zi - ri║ = δ implies that ziyd -{y,d} ⊂ int(H). Thus, zi ∈ int(H) in case (v).

  • d satisfies (vi): In this case dh0 h1R and since R(h0 s0 - {h0,s0}) = Ø we must have d s0 h1. This implies that ║d - h0║ > δ and, since qk+1 = h0 in our context, (iv) implies that ║y - d║ > δ. We can then use the same argument following (17) and conclude that zi ∈ int(H).

In summary, we have shown that if int(R) ∩ h3 h0 ≠ Ø then (14) holds. Let us then assume that int(R) ∩ h3 h0 = Ø. Using this assumption and (16) it is easy to show that if R ∩ (h3 h0 -{h3,h0}) ≠ Ø then there exists ri ∈ (h3 h0 -{h3,h0}) and zi ∈ int(H). Thus, we can assume that R ∩ (h3 h0 - {h3,h0}) ≠ Ø. This assumption, the fact that int(H) ∩ int(R) ≠ Ø and (16) imply that R ∩ (h3 h0h0 s0 - {h3,s0}) = Ø. Using symmetry we can resume our conclusions up to this point as the statement that either

or (14) is satisfied and we assume (18) from now on.

Equation (18) shows that if {r0,r1,r2,r3} ∩ int(H) = Ø and int(H) ∩ int(R) ≠ Ø then one of the sides r0 r1 or r2r3 crosses both segments s0h1 and s2h3,at points e and f, say. Since ║f - e║ > δ we conclude that if R is "short", i.e., if b(R) < 2 δ, then {z0,s2} ∩ int(H) ≠ Ø. Therefore, we can assume that

b(R) > 2 δ and {r0,r1,r2,r3,z0,z2} ∩ int(H) = Ø

and that z0 is on or above the line h2h3 and z2 is on or below the line h0h1 (These details are illustrated in Fig. 10.) We then have our three final possibilities:

(i) If r0 r1 ∩(s'0 h3 - {s'0}) ≠ Ø then R must be inclined to the left as illustrated in Figure 10, because r0 r1h0 s0 - {s0} = Ø. As a result, the point 0 is above h2h3 and 0 is below h0 h1 and if ef = 01∩ H then ║e - f║ > δ. Since the segment ef - {e,f} is populated with sentinels wi which are less δ apart and ║0- w1║ < δ and ║2 - wnw ║ < δ at least one wi belongs to int(H) and (14) is satisfied.

(ii) The case r2 r3 ∩(s'2 h1 - {s'2}) ≠ Ø is symmetric to item (i).

(iii) If r0 r1 ∩ (s'0 h3 - {s'0}) = Ø and r2 r3 ∩ (s'2 h1 - {s'2}) = Ø then we are in the situation described on the right of Figure 10. In this case we can exchange H and R and repeat the argument in item (i).

4 Concluding remarks

We defined the concept of sentinels and found finite sentinel assignments for finite families of polygons with internal angles bigger than or equal to π/2. We presented optimal assignments for some families of rectangles. It would be interesting to characterize optimal sentinel assignments for more general families of polygons. For instance, the sentinel assignments for the rectangles suggest that by locating sentinels along well chosen lines in the interior of the polygons it is possible to produce smaller sentinel assignments.

The concept of sentinel provides a new approach, based on nonlinear programming, for solving a large variety of packing problems to optimality. Defining sentinels for a given set of polygons may be a hard task. Modelling the problem of finding the sentinels set as a mathematical programming problem will be the subject of future research. It may allow the straightforward application of sentinels-based packing techniques on real applications.

5 Acknowledgments

We would like to thank Professor I. Bárány for his suggestions and for encouraging us to improve our initial work on sentinels and obtain the proofs we present in this work.

Received:02/XI/09

Accepted: 19/I/10

#CAM-144/09.

  • [1] E.G. Birgin, J.M. Martínez, W.F. Mascarenhas and D.P. Ronconi, Method of sentinels for packing items whitin arbitrary convex regions. Journal of the Operational Research Society, 57 (2006), 735-746.
  • [2] H. Edelsbrunner, Geometry and Topology for Mesh Generation. Cambridge Univ. Press, England (2001).
  • [3] G. Fejes Tóth, Densest Packing of Typical Convex Sets are Not Lattice-Like. Discrete & Computational Geometry, 14 (1995), 1-8.
  • [4] M. van Kreveld, On fat partition, fat covering and the union size of polygons. Computational Geometry Theory and Applications, 9 (1998), 197-210.
  • [5] A. Mahadevan, Optimization in computer aided pattern packing. Ph.D. Thesis, North Carolina State University (1984).
  • [6] V.J. Milenkovic, Rotational polygon containment and minimum enclosure using only robust 2D constructions. Computational Geometry, 13 (1999), 3-19.
  • [7] Yu G. Stoyan, On the generalization of the dense allocation function. Reports Ukrainian SSR Academy of Sciences, Ser. A., 8 (1980), 70-74 (in Russian).
  • [8] Yu, G. Stoyan, M.V. Novozhilova and A.V. Kartashov, Mathematical Model and method for searching a local extremum for the non-convex oriented polygons allocation problem. European Journal of Operational Research, 92 (1996), 193-210.
  • 1
    Note that
    pj-1pj
    uv =
    pj-1pj
    qkqk+1 = {
    x} ≠
    qk implies that the segments
    qkqk+1 and
    pj-1pj are not colinear and the point
    c is well defined.
  • 2
    when doing that, do not forget hypothesis (12).
  • Publication Dates

    • Publication in this collection
      22 July 2010
    • Date of issue
      June 2010

    History

    • Received
      02 June 2009
    • Accepted
      19 Jan 2010
    Sociedade Brasileira de Matemática Aplicada e Computacional Sociedade Brasileira de Matemática Aplicada e Computacional - SBMAC, Rua Maestro João Seppe, nº. 900 , 16º. andar - Sala 163, 13561-120 São Carlos - SP Brasil, Tel./Fax: 55 16 3412-9752 - São Carlos - SP - Brazil
    E-mail: sbmac@sbmac.org.br