A Theoretical Structure for Computational Geometry

0 downloads 0 Views 2MB Size Report
Key–Words: Point-free, Empty circles, Largest shape, Locations, Generalized Voronoi diagram .... and resize a single disc; for shape-models a specific operation ...
Proceedings of the 9th WSEAS International Conference on SIGNAL PROCESSING, COMPUTATIONAL GEOMETRY and ARTIFICIAL VISION

A Theoretical Structure for Computational Geometry: Regions of Point-free Overlapping Circles Thomas Iwaszko, Mahmoud Melkemi, Lhassane Idoumghar Universit´e de Haute Alsace LMIA - Equipe MAGE 4 rue des fr`eres Lumi`ere, 68093 Mulhouse FRANCE { Thomas.Iwaszko, Mahmoud.Melkemi, Lhassane.Idoumghar }@uha.fr Abstract: Let S be a set of two or more points in the plane. Given an arbitrary configuration of one or more overlapping circles (referred to as shape-models), how to know the locations where the shape-model would not contain any point of S if translated ? A new theoretical structure, which can be seen as a generalized Voronoi diagram, is presented as an answer to this problem. Key–Words: Point-free, Empty circles, Largest shape, Locations, Generalized Voronoi diagram

1

Introduction

In the next section we introduce notations and define shape-models. Thanks to these objects, the Regions of Point-free Shape-models are expressed mathematically in section 3, along with some theoretical results. Then we address the computation of these regions in section 4 and show a 2 D representation of results produced on a realistic example. In the last section we discuss limitations of the implemented solution, possible applications areas, and future work directions.

The Voronoi diagram of a finite set of points in the plane is one of the most useful data structures in computational geometry [1]. It helps to solve many problems, allowing the design of efficient algorithms whenever these ones are based on proximity information of sites. For instance, a property of Voronoi regions allows the solving of the so-called Largest Empty Circle problem; LEC described in [2, 3]. The property in question can be stated: given a set of points S, and any other point x in the plane. If x belongs to a Voronoi region V (p), p ∈ S then there exists a circle centered on x and passing through p, empty of any other site of S. It is the point-free circle of maximal radius centered on x. In this paper we focus on presenting a structure of regions which extends the previous property from circles to configurations of overlapping circles (or shapemodels). Thus, it can be considered as a generalized Voronoi diagram. The overall purpose is to design a structure capable of encoding all the locations of point-free shape-models. Similar topics are: Polygon placement among points or obstacles, largely studied [4, 5]. A particular approach was used by Lee [6], for storing empty 0 of largest squares by using the L∞ metric and computing a Voronoi diagram. In general, numerous generalizations of Voronoi diagram use a non-Euclidean metric. As a result, the unit ball being not a circle in this case, it is possible to store locations for various convex shapes, empty of points with a generalized Voronoi diagram [7]. ISSN: 1790-5109

2 2.1

Shape-models Notations

In the following, k.k denotes the Euclidean metric. We note b(x, r) the open disc of radius r centered on point x. Its boundary is a circle; we note it c(x, r). Mathematically:  b(x, r) = y ∈ R2 ky − xk < r  c(x, r) = y ∈ R2 ky − xk = r We define a shape-model as a set of overlapping circles, one of these circles being chosen as the reference circle. In order to keep simple notations, ordered lists are used and the reference disc is always the first one. Formally: Definition 1 Let M = (C, R) be a shape-model constituted of m circles. The m-tuple C = (c1 , c2 , . . . , cm ) represents the centers. Elements of R = (r1 , r2 , . . . , rm ) represent the associated radii 117

ISBN: 978-960-474-108-3

Proceedings of the 9th WSEAS International Conference on SIGNAL PROCESSING, COMPUTATIONAL GEOMETRY and ARTIFICIAL VISION

4

4

4

4

2

2

2

2

0

0

0

0

-2

-2

-2

-2

-4

-4

-4

-2

0

2

4

(a) shape-model M0

-4

-4

-2

0

2

-4

-4

4

(b) hf (M0 , (0, 0), 1)

-2

0

2

-4

4

(a) shape-model M0

-2

0

2

4

(b) region sf (M0 )

Figure 1: The handling function hf .

Figure 2: The synthesis function sf .

(real numbers). Moreover, M must satisfy the “overlapping circles property” :

function simply considers maximal open discs interior to circles composing the shape-model and computes the union of these discs. If M is composed of m circles: m [ sf (M ) = b(ci , ri )

(m > 1) implies ∀i ∈ {1, . . . , m}, ∃j 6= i such that b(ci , ri ) ∩ b(cj , rj ) 6= ∅

i=1

An example of a simple shape-model constituted of four circles is given in Fig. 1a. In the case of the Voronoi diagram, point-free circles of maximal radius were mentioned in the introduction. The idea could be illustrated by an animation: for a point set S and given p ∈ S, a unit circle passing through p can be drawn. Let us translated this circle freely across the plane and simultaneously 3 it in order to keep p on its boundary. It is easily demonstrated the circle is free of other points of S iff its center belongs to V (p). In the same manner, we would like to be able to manipulate shape-models we defined, moving it across the plane and resizing it simultaneously. While it is pretty simple to translate and resize a single disc; for shape-models a specific operation is needed. The next sub-section describe the expected transformation.

2.2

3

Regions of Empty Shape-models

Shape-models have been defined and two functions are available to use them. This preliminary work allows the geometric problem stated in the introduction to be examined algebraically. This approach has been chosen to define the new structure described below. The link between Voronoi diagrams and Regions of Point-free Shape-models is emphasized further.

3.1

Proposed Structure

Given a set S of points in the plane, and given any shape-model M . For each p ∈ S: Definition 2 The Region of point-free shape-model generated by p ∈ S is defined by

Handling Function

We introduce hf , the handling function that allows to perform translations and/or hometheties on a shapemodel. It takes three arguments; a shape-model M = (C, R) with C = (c1 , . . . , cm ) and R = (r1 , . . . , rm ) as said previously, a point p and a scalar λ. The function translates whole M by a vector − c→ 1p and re-scales it by a factor (λ/r1 ). Hence, the resulting shape-model is noted hf (M, p, λ). The reference circle of M is c(c1 , r1 ) (see previous subsection) whereas the one of hf (M, p, λ) is c(p, λ). An example of transformation with hf is given in Fig. 1.

Intuitively, RM (p) represents the locations x ∈ R2 where M can be translated (ie. its reference circle center becomes x) and expanded until it has p on its boundary, while remaining point-free of S. A Region of Point-free Shape-models is always defined for a given shape-model M , here noted in subscript, and a site p as an argument; RM (p).

2.3

3.2

RM (p) =  x ∈ R2 | sf (hf (M, x, kx − pk)) ∩ S = ∅

Synthesis Function

Finally, let sf be the synthesis function, which builds a 2 D region from a shape-model as shown Fig. 2. The ISSN: 1790-5109

Link with Voronoi diagrams

It has been already said the proposed structure is a generalized Voronoi diagram. Indeed, we can show 118

ISBN: 978-960-474-108-3

Proceedings of the 9th WSEAS International Conference on SIGNAL PROCESSING, COMPUTATIONAL GEOMETRY and ARTIFICIAL VISION

◦ Let us define a “cut function” cf : given a shapemodel M composed of m circles it removes the k last elements, 0 ≤ k ≤ (m − 1). The resulting shape-model is noted cf (M, k). Therefore:

the later concept is a particular case of Regions of Point-free Shape-models. Let us consider M1 the simplest existing shape-model, which is the unit disc: M1 = (((0, 0), 1)). The region returned by function sf (M1 ) is a single open disc. Therefore from the previously given definition, RM1 (p) is equivalent to the classic Voronoi region of p, V (p):  x ∈ R2 | sf (hf (M1 , x, kx − pk)) ∩ S = ∅  ⇔ x ∈ R2 | b(x, kx − pk) ∩ S = ∅  ⇔ x ∈ R2 | kx − pk ≤ kx − qk, q ∈ S

Rcf (M,0) ⊂ Rcf (M,1) ⊂ . . . ⊂ Rcf (M,m−1) N . B : cf (M, 0) is M ; identity. Fig. 5 illustrates this property very well.

p2

t u p1

3.3

Illustration

Let S0 = {p1 , p2 , p3 } be a set of random points. Let M2 be a 2-disc shape-model, represented on Fig. 3a. The Fig. 3 gives an example of the belonging concept to Region of Point-free Shape-models generated by M2 and p1 . Two points of the plane x1 , x2 are considered. x1 belongs to RM2 (p1 ) because M2 can be translated to x1 and expanded until “touching” p1 while remaining point-free. It is not the case for x2 therefore it does not belong to the region. Fig. 4 represents the whole region RM2 (p1 ), automatically computed. Thus the frontiers of the region are visible and an interpretation is given. Regions of Point-free Shape-models posses 3 kinds of frontier. More details are given in section 4.1.

3.4

p3

(a) shape-model M3

(b) RM3 (S) p2 p1

p3

(c) cf (M3 , 1)

(d) Rcf (M3 ,1) (S)

Properties

p2

The newly-defined regions possess numerous remarkable properties. Especially, keeping the same notations, it has been shown (proofs available in [8]): ◦ Contrary to the Voronoi diagram, if (m > 1), {R(p) | p ∈ S} is not a partition of the plane. There exist uncovered regions of the plane. It means: there are locations where if the reference circle of M pass through p, ∀p ∈ S then the shape-model has necessarily one or more site(s) in its interior; M is not point-free.

p1

p3

(e) cf (M3 , 2)

(f) Rcf (M3 ,2) (S) p2 p1

p2

p2

p1

p3

p1

´ ´

p3

(a) shape-model M2 (b) x1 ∈ RM2 (p1 )

(g) cf (M3 , 3)

p3

Figure 5: The inclusion property. Removing discs from M3 fills the plane with new possible point-free locations.

(c) x2 ∈ / RM2 (p1 )

Figure 3: Two sample points x1 , x2 illustrate the belonging or non-belonging to RM2 (p)

ISSN: 1790-5109

(h) Rcf (M3 ,3) (S)

119

ISBN: 978-960-474-108-3

Proceedings of the 9th WSEAS International Conference on SIGNAL PROCESSING, COMPUTATIONAL GEOMETRY and ARTIFICIAL VISION

p2

p2

p1

p2

p1 ´

p1

´

´

p3 (a) the shape-model is placed on a “standard” line. The line is the same as the bisector of a Voronoi region. It means the shape-model has a supplementary point pj 6= p1 on the boundary of its first disc.

p3

p3

(b) the shape-model is placed on a “reflected line” involving its own center p1 . Then two discs of the shape-model have p1 on their boundary at the same time.

(c) the shape-model is placed on a “special” curve involving a point pj 6= p1 and any circle of the shape-model except the first. Then the considered circle has pj on its boundary.

Figure 4: Interpretation of frontiers of the Region of Point-free Shape-models RM2 (p1 )

4

Computation and First Results

ht(M, x, kp − xk) then:

This paper intends mainly to bring a theoretical contribution to computational geometry. A new geometric structure has been defined mathematically which is at authors opinion worthy of interest. At this point we do not claim to have a full algorithm with complexity study. Yet we can explain how we succeeded to program a first implementation and present first results obtained.

4.1

RM (p) =

V (p) = {x ∈ R2 | kx − pk ≤ kx − qk, q ∈ S} Thus, V (p) can be decomposed into an intersection of n half-planes. If S is written {p1 , . . . , pn } each halfplane is by a pair of points (p, pj ) with 1 ≤ j ≤ n. Therefore:

+ (X 2 + Y 2 )g = 0 with a, b, c, d, e, f, g ∈ IR constants depending on the shape-model and two sites of S coordinates.

hyp(p, pj ), with

4.2

j=1

Implementation

In the previous section we said every Region of Pointfree Shape-models is constituted of the intersection of many sub-regions. Each sub-region is defined with an inequality. So R(p) the Region of Point-free Shapemodels can be expressed in the form of an algebraic system of (m × n) inequations. The difficulty left is to solve the system and to encode the appropriate “side” of each boundary. At

hyp(p, pj ) = {x ∈ R2 | kx − pj k ≥ kx − pk} Using the same approach, the definition given for a Region of Point-free Shape-models can be decomposed into m × n simpler sub-regions, denoted sub. Given a point p ∈ S and a shape-model M , if we note 0 the data in the shape-model c01 , . . . , c0m and r10 , . . . , rm ISSN: 1790-5109

= {x ∈ R2 | kc0i − pj k ≥ ri0 }

This idea of collecting constraints is illustrated using the same example as in sub-section 3.3 i.e. given the 2-disc shape-model M2 and the point set S0 we study RM2 (p1 ). A sub-region is associated to each proximity constraint, Fig. 6. The final Region of Point-free Shape-models ; the intersection of all subregions is shown on Fig. 7. A sub-region can have one of three kinds of frontier ( Fig. 6). Two of them are lines the third one is a curve, which is defined in Cartesian implicit representation f (X, Y ) = 0, in the form: p (aX + bY + c) + X 2 + Y 2 (dX + eY + f )

In the definition of a Voronoi region V (p), p ∈ S a point x belongs to the region iff it satisfies a certain number of proximity constraints. In fact if card(S) = n then there are n constraints:

V (p) =

sub(p, c0i , ri0 , pj ), with

i=1 j=1

sub(p, c0i , ri0 , pj )

Breaking up regions

n \

m \ n \

120

ISBN: 978-960-474-108-3

Proceedings of the 9th WSEAS International Conference on SIGNAL PROCESSING, COMPUTATIONAL GEOMETRY and ARTIFICIAL VISION

p2

p2

p1

p2

p1

p1

p3

p3

(a) 1st disc & p1

p3

(b) 1st disc & p2

p2

(c) 1st disc & p3

p2

p1

4.3

p1

p3

p3

p3

(e) 2nd disc & p2

(f) 2nd disc & p3

Figure 6: In gray, regions satisfying a constraint on x generated by a certain pair (disc of M2 , point of S). Thus if we place M2 (ie. its reference center) in the gray region then the considered disc is empty of the considered point.

5

p1

p3

Figure 7: RM2 (p1 ) the Region of Point-free Shapemodels is the intersection of all the constraints generated by pairs (disc of M2 , point of S). If M2 is placed in the gray region then it is point-free.

4

2

0

-2

-4

-2

0

2

4

Figure 8: An instance of a 7-circle shape-model, M4

ISSN: 1790-5109

Conclusion

To sum up, we presented a theoretical structure generalizing the Voronoi diagram. It is based on configurations of overlapping circles; a shape-model. The purpose of this structure is to store locations of pointfree shape-models. A Mathematical model was presented to describe the problem properly. An algebraic approach allows to break up regions, and by this mean simplify the “algorithmization” of structure definition. Finally some results were presented, mainly to illustrate the concepts. Concerning the implementation, most of the algebraic representations required have been successfully programmed. Intersections between frontiers of sub-regions are computed with good precision by help of resultants of polynomials. In the end, an interface with a computational software is used to regroup informations and plot the data. The possible applications might be numerous, as for the classic Voronoi diagram. Indeed, problems involving proximity constraints are found in many of areas of science. In particular, we think the presented structure could be worth of interest for robotics path planning problems, patterns detection, machine learning, etc. The future work will focus on completing the algorithm by encoding regions properly. Thus we aim at a full Region of Point-free Shape-models construction on a stand-alone application. The efficiency could be also improved by selecting an appropriate subset of S before running the algorithm and/or discovering ad-

p2

-4

Results

The first implementation produced all the trivial examples (with a few points and circles) presented throughout this paper for illustration. Now we show its relevance on a more realistic dataset. In this example, we use 10 random points in the interval [−5, 5] × [−5, 5] for S. We also use a 7disc non-convex shape-model. Regions of Point-free Shape-models computed are shown Fig. 9. Note the shape-models are not limited except by the overlapping property. A shape-model could contain holes for example.

p2

p1

(d) 2nd disc & p1

this point of our work, the implemented solution is based in part on C software (using GNU Scientific Library [9] for polynomial calculus and intersection of bisectors). The computational software Mathematica is then automatically used for high-level regions structures and plotting. Communication is made communicate through the C/C++ MathLink interface [10, 11].

121

ISBN: 978-960-474-108-3

Proceedings of the 9th WSEAS International Conference on SIGNAL PROCESSING, COMPUTATIONAL GEOMETRY and ARTIFICIAL VISION

ditional mathematical properties about presented regions.

p4

Acknowledgements: The research was supported by the Universit´e de Haute Alsace. Authors would like to thank M.Elkadi from Universit´e de Nice for his advices concerning algebra problems.

p1

´

p5

References:

p6

p9

p3

p10

[1] Atsuyuki Okabe, Barry Boots, and Kokichki Sugihara, editors. Spatial Tessellations: Concepts and Applications of Voronoi Diagrams. John Wiley & Sons, 1992.

p2 p7

p8

[2] Michael Ian Shamos. Computational geometry. PhD thesis, New Haven, CT, USA, 1978. p4

[3] F. P. Preparata and M. I. Shamos. Computational Geometry: An Introduction. Springer-Verlag, 1985.

p1

[4] Francis Avnaim and Jean-Daniel Boissonnat. Polygon placement under translation and rotation. In STACS ’88: Proceedings of the 5th Annual Symposium on Theoretical Aspects of Computer Science, pages 322–333, London, UK, 1988. Springer-Verlag.

p5 p6

p9

´

p3

p10

p2 p7

[5] L. P. Chew and K. Kedem. Placing the largest similar copy of a convex polygon among polygonal obstacles. In SCG ’89: Proceedings of the fifth annual symposium on Computational geometry, pages 167–173, New York, NY, USA, 1989. ACM.

p8

p4

[6] D. T. Lee. Two-dimensional voronoi diagrams in the lp-metric. J. ACM, 27(4):604–618, 1980.

p1

[7] L.P. Chew and R.L. Drysdale III. Voronoi diagrams based on convex distance functions. SCG, 85:235–244.

p5 p6

p9

p3

p10

[8] T. Iwaszko, M. Melkemi, and L. Idoumghar. A theoretical structure for computational geometry: an extended version, 2009. Technical Report, MAGE-LMIA.

p2 p7

´

p8

[9] M. Galassi et al. Gnu scientific library reference manual (3rd ed.).

Figure 9: Regions of Point-free Shape-models for the shape-model M4 and 10 random points. Colors are used to differentiate R(p) and R(p0 ), p, p0 two different elements of S. An instance of M4 is drawn in a few locations belonging to R(p) to ease the interpretation of R(p) frontiers.

ISSN: 1790-5109

[10] Santanu K. Maiti. Mathematica: A system of computer programs, Oct 2008. [11] Mufid Abudiab and Michael Starek. Integrating mathematica with c++ for the development of a computational geometry problem solver. J. Comput. Small Coll., 18(4):70–78, 2003.

122

ISBN: 978-960-474-108-3