Reporting intersections among thick objects

6
Information Processing Letters 85 (2003) 87–92 www.elsevier.com/locate/ipl Reporting intersections among thick objects Antoine Vigneron Department of Computer Science, TheHong Kong University ofScience and Technology, Clear Water Bay, Kowloon, Hong Kong Received 17 July 2000; received in revised form 6 May 2002 Communicated by F.Y.L. Chin Abstract Let E be a set of n objects in fixed dimension d . We assume that each element of E has diameter smaller than D and has volume larger than V . We give a new divide and conquer algorithm that reports all the intersecting pairs in O(n log n + (D d /V )(n + k)) time and using O(n) space, where k is the number of intersecting pairs. It makes use of simple data structures and primitive operations, which explains why it performs very well in practice. Its restriction to unit balls in low dimensions is optimal in terms of time complexity, space complexity and algebraic degree. 2002 Elsevier Science B.V. All rights reserved. Keywords: Algorithms; Computational geometry; Divide and conquer; Geometric intersection problems; Robustness 1. Introduction We present a new algorithm for the following air or sea traffic control problem: given a set E of n point ve- hicles in 2- or 3-space, find all the pairs that are closer than a given safety distance. The number of these pairs will be denoted by k throughout the paper. Our algo- rithm runs in O(n log n + k) time and uses O(n) space. Its implementation is remarkably fast. For example, if the vehicles are uniformly distributed in a rectan- gle and we chose a small safety distance (such that k<n), our algorithm is only three times slower than quicksort [10]. The two reasons why it is so fast are the following. First, we make use of very simple data This work has been partially supported by the ESPRIT IV LTR Project No 28155 (GALIA), by the Action de Recherche Coopérative Géométrica, and by the Hong Kong Research Grant Council. E-mail address: [email protected] (A. Vigneron). structures, in fact our algorithm was implemented with three static arrays of linear size. Second, our algorithm has low algebraic degree. This complexity measure has been recently developed by Liotta et al. [11] and is defined as the maximum degree of the polynomials evaluated by the algorithm. It is closely related to ro- bustness in the sense that it gives the precision required to perform exact computation. Our algorithm has de- gree two, thus it essentially requires double precision. Therefore it allows to use build-in floating point arith- metics which is far more efficient than software multi- precision. For small values of k , it explains why our algorithm proves much faster than a Voronoi diagram computation whose degree is no less than four. There- fore one of the contributions of this work is to be the first experimental evidence of the validity of algebraic degree as a complexity measure. This problem of finding intersecting pairs in a set of unit balls is known as the Fixed-Radius Near- 0020-0190/02/$ – see front matter 2002 Elsevier Science B.V. All rights reserved. PII:S0020-0190(02)00347-2

Transcript of Reporting intersections among thick objects

Page 1: Reporting intersections among thick objects

Information Processing Letters 85 (2003) 87–92

www.elsevier.com/locate/ipl

Reporting intersections among thick objects✩

Antoine Vigneron

Department of Computer Science, The Hong Kong University of Science and Technology, Clear Water Bay, Kowloon, Hong Kong

Received 17 July 2000; received in revised form 6 May 2002

Communicated by F.Y.L. Chin

Abstract

Let E be a set ofn objects in fixed dimensiond. We assume that each element ofE has diameter smaller thanDand has volume larger thanV . We give a new divide and conquer algorithm that reports all the intersecting pairs inO(n logn + (Dd/V )(n + k)) time and using O(n) space, wherek is the number of intersecting pairs. It makes use of simpledata structures and primitive operations, which explains why it performs very well in practice. Its restriction to unit balls in lowdimensions is optimal in terms of time complexity, space complexity and algebraic degree. 2002 Elsevier Science B.V. All rights reserved.

Keywords:Algorithms; Computational geometry; Divide and conquer; Geometric intersection problems; Robustness

1. Introduction

We present a new algorithm for the following air orsea traffic control problem: given a setE of n point ve-hicles in 2- or 3-space, find all the pairs that are closerthan a given safety distance. The number of these pairswill be denoted byk throughout the paper. Our algo-rithm runs in O(n logn+ k) time and uses O(n) space.Its implementation is remarkably fast. For example,if the vehicles are uniformly distributed in a rectan-gle and we chose a small safety distance (such thatk < n), our algorithm is only three times slower thanquicksort [10]. The two reasons why it is so fast arethe following. First, we make use of very simple data

✩ This work has been partially supported by the ESPRIT IVLTR Project No 28155 (GALIA), by the Action de RechercheCoopérative Géométrica, and by the Hong Kong Research GrantCouncil.

E-mail address:[email protected] (A. Vigneron).

structures, in fact our algorithm was implemented withthree static arrays of linear size. Second, our algorithmhas lowalgebraic degree. This complexity measurehas been recently developed by Liotta et al. [11] andis defined as the maximum degree of the polynomialsevaluated by the algorithm. It is closely related to ro-bustness in the sense that it gives the precision requiredto perform exact computation. Our algorithm has de-gree two, thus it essentially requires double precision.Therefore it allows to use build-in floating point arith-metics which is far more efficient than software multi-precision. For small values ofk, it explains why ouralgorithm proves much faster than a Voronoi diagramcomputation whose degree is no less than four. There-fore one of the contributions of this work is to be thefirst experimental evidence of the validity of algebraicdegree as a complexity measure.

This problem of finding intersecting pairs in a setof unit balls is known as the Fixed-Radius Near-

0020-0190/02/$ – see front matter 2002 Elsevier Science B.V. All rights reserved.PII: S0020-0190(02)00347-2

Page 2: Reporting intersections among thick objects

88 A. Vigneron / Information Processing Letters 85 (2003) 87–92

Neighbors Search, Dickerson and Eppstein solved itin O(n logn+ k) time in fixed arbitrary dimension [7].Similarly, our algorithm is optimal only when the di-mensiond is constant, but our experimental results arevery good and it extends to the following more generalsetting. LetE be a set ofn objects in fixed dimen-siond . They are supposed to be thick in the sense thateach one of them has diameter smaller thanD and hasvolume larger thanV . We can find thek intersectingpairs of objects ofE in O(n logn + (Dd/V )(n + k))

time and in O(n) space. Our algorithm has optimal al-gebraic degree when a point of each object is given,which is a reasonable assumption in practice. In thereal-RAM model of computation [12], its time com-plexity is optimal whenDd/V = O(1), which meansthat we consider thick objects of roughly the same sizeand in low dimension.

Pairwise geometric intersections reporting has beenextensively studied. On a theoretical standpoint, it iswell understood for line segments in the plane [1,6]and boxes in any dimension [8]. These algorithms,however, are not the best choice in practice, whichmotivated Zomorodian and Edelsbrunner to design apractical intersection algorithm [13] for boxes thatdoes not match the best theoretical bound [8]. Here wegive a practical algorithm too, but for different typesof objects, in particular we do not require them tobe axis-parallel boxes, but we put restrictions on theirvolume and diameter. For curve segments intersection,robustness problems led to the design of low degreealgorithms [3–5], however an�(n

√k ) lower bound

was proven [3] in this context. Our result shows thatit is possible to get around this lower bound, andobtain an efficient low degree algorithm for curvedobjects, if we make assumptions on their volume anddiameter.

2. The algorithm

We consider a setE of n objects inRd , where

d is constant. Each objectA ∈ E has diameter atmost D and volume at leastV . We also assumethat we are given a point of each objectA ∈ E,we call it the reference pointof A. We will presentan efficient algorithm to report all intersecting pairsin E2, assuming that we can decide whether a pair(A,B) ∈ E2 intersects in constant time. The only

other geometric predicates that it uses are comparisonsbetween the coordinates of the reference points. Itsrunning time is O(n logn + (Dd/V )(n + k)), wherek is the number of intersecting pairs. It uses O(n)

space, which means that the intersecting pairs areoutput without necessarily being stored, and each pairis output exactly once.

Note that the intersection predicate is necessary tosolve our problem. Thus our algorithm has optimalalgebraic degree when one point of each object isgiven. For instance, the objects are balls in our trafficcontrol application, so detecting intersection meanscomparing distances, which is a degree two predicate.In this case, our algorithm has degree two.

Our predicates have to be implemented for the par-ticular type of objects that is considered. If these ob-jects do not have constant complexity, for instance, ifthey are polyhedral figures, the intersection predicatemay take more than constant time, so one would needto multiply our time bounds by this quantity in order toobtain the actual complexity of our algorithm in termsof standard arithmetic operations.

2.1. Computation model

The coordinates of the reference point of an objectobject A ∈ E are denoted by(x1(A), x2(A), . . . ,

xd(A)). The first type of geometric predicates that wewill use are of the formxi(A) � xi(B) andxi(A) �xi(B)−2D. We assume that any such comparison canbe made in unit time.

We will also need an intersection predicate. In orderto unify the presentation of our algorithm, we willrelax its definition. We will keep two properties ofusual geometric intersection predicates (for objectswith diameter at mostD and volume at leastV ) thatare crucial for our algorithm. First, if two objectA andB intersect, then for alli we have|xi(A) − xi(B)| �2D. Second, ifF ⊂ E is a set of disjoint objects whosereference points lie in an hypercube with edge length4D, then the cardinality ofF is at most(6D)d/V (thiscomes from the fact that these objects all lie within anhypercube of volume(6D)d and are disjoint).

So, a Boolean function inter(·, ·) overE2 is calleda generalized intersection predicateover E withparametersC andD if and only if it has the followingproperties:

Page 3: Reporting intersections among thick objects

A. Vigneron / Information Processing Letters 85 (2003) 87–92 89

(1) if inter(A,B) is true, then for alli we have|xi(A) − xi(B)| � 2D;

(2) for all hypercubeH with edge length 4D and forall F ⊂ E, if inter(A,B) is false for all distinctA,B in F , and if all the reference points ofF are inH , then the cardinality ofF is at mostC.

In particular, if E is a set of geometric objects withdiameters at mostD and volumes at leastV , thenthe geometric intersection predicateA ∩ B = ∅ isa generalized intersection predicate with parameters(6D)d/V and D. So our algorithm will work witha usual geometric intersection predicate as well as ageneralized one. Thus, in the remainder of this note,when we consider a generalized intersection predicateinter(·, ·), we will simply say thatA andB intersect(respectively are disjoint) if and only if inter(A,B) istrue (respectively false).

The reason why we need this relaxed definition isthe following. Our algorithm will make recursive callsto itself in dimensiond − 1, by ignoring the last coor-dinate of the reference points, but still using the inter-section predicate between the originald-dimensionalobjects. If we run thed−1 dimension algorithm in thisway on a subsetE ∩ (Rd−1 × [x, y]) wherey − x �4D, then the induced intersection predicate in dimen-siond − 1 is a generalized intersection predicate withsame parametersC andD.

In short, our computation model means that wecan make simple comparisons between the coordinatesof reference points in unit time, and that we have ageneralized intersection predicate with parametersC

andD that we can evaluate in unit time as well. Withthese assumptions, we will show that we can report allthe intersecting pairs in O(n logn + C(n + k)) time.

2.2. Algorithm in one dimension

In this section, we assume thatd = 1. The idea ofthis algorithm is first to compute a maximal set ofdisjoint objectsEmax by walking from left to rightalong E, and report the intersections with objectsof E \ Emax. Then we apply the same procedure toE \Emax. The following lemma shows how to performa step of the recursion.

Lemma 1. Supposed = 1 andE is sorted accordingto the coordinates of the reference points of its ele-

ments. Then it can be partitioned into(Emax,E′) in

O(C(n′ + k′)) time where|Emax| = n′ > 0 and k′ isthe number of intersecting pairs inEmax × E. Withinthe same time bounds, and usingO(|E|) space, the in-tersecting pairs ofEmax × E can be reported andE′can be sorted in the same order asE.

Proof. Let E = {A1,A2, . . . ,An} where x1(Ai) �x1(Aj ) for all i < j . We process the objectsAi inincreasing order ofi. BothEmaxandE′ are maintainedin a list sorted according to thex1-coordinate. No twoobjects ofEmax intersect. First we insertA1 in Emax.

When we reachAi , we check its intersection withthe objects previously inserted inEmax whose x1-coordinates are at leastx1(Ai) − 2D. By definition ofgeneralized intersection predicates, we do not need tocheck the other elements ofEmax, which are too farfrom Ai to intersect it. Moreover, since these objectsare disjoint, and within distance 2D from Ai , bydefinition of generalized intersection predicates, thereare at mostC of them. Thus this step can be performedin O(C) time by visiting the last elements insertedin Emax from right to left. If no new intersectionis reported, we insertAi in Emax. Otherwise,Ai isinserted inE′ and the intersections are reported.

The algorithm we just described effectively par-titions E as we intended to do, but it only reportsthe intersecting pairs(A,B) ∈ E × Emax such thatx1(A) � x1(B). The other intersections are found byrunning the same algorithm with a slight modifica-tion. Namely, we have constructedEmax already sowe can check the intersections ofAi with the objectsB ∈ Emax such thatx1(B) ∈ [x1(Ai), x1(Ai) + 2D].

Each object ofE is processed in O(C) time so thisalgorithm runs in O(Cn) time. Besides, each elementof E′ intersects at least one element ofEmax so n �n′ + k′. Therefore the running time of our algorithm isO(C(n′ + k′)). ✷Lemma 2. If d = 1 and E is sorted according tothe coordinates of the reference points, then thek

intersecting pairs ofE can be reported inO(C(n+k))

time and usingO(n) space.

Proof. Partition E as in Lemma 1 and report theintersections inEmax× E. If E′ = ∅, setE = E′ andapply the same procedure recursively. To analyze thisalgorithm, we note that at each step we pay O(C)

Page 4: Reporting intersections among thick objects

90 A. Vigneron / Information Processing Letters 85 (2003) 87–92

time either to put an object inEmax or to reportan intersection involving an element ofEmax. Theseobjects and intersections will not be considered atdeeper levels of recursion sinceEmax is discarded.Therefore the overall time complexity is O(C(n +k)). ✷Corollary 1. If d = 1, then the intersecting pairs inE2 can be reported inO(n logn+ C(n + k)) time andO(n) space, wherek is the number of these pairs.

2.3. Generalization to any dimension

Our algorithm can be generalized to any fixeddimensiond . The idea is essentially that we can handlea set of objects that are close to an hyperplaneP byprojecting the reference points intoP and runningthe (d − 1)-dimensional algorithm. So we can usethe following divide and conquer approach: chosea horizontal hyperplaneP that splits the referencepoints evenly, find the intersecting pairs among objectswhose distance toP is less than 2D, and recurs onboth sides ofP . In the remainder of this section, wewill prove the following result:

Theorem 1. Let E be a set ofn objects in fixeddimensiond . We assume thatE is associated witha generalized intersection predicate with parametersC and D. We can report all the intersecting pairs inO(n logn + C(n + k)) time and usingO(n) space,wherek is the number of reported pairs.

2.3.1. Description of the algorithmBy Corollary 1 we have an algorithm ford = 1.

So we will proceed by induction ond . We assumethat d > 1 and that in dimensiond − 1, there is anO(n logn + C(n + k)) time and O(n) space algorithmto report generalized intersections, and we will showhow to use it to obtain an algorithm with the same timebound in dimensiond .

We follow a divide and conquer approach. Wedistinguish between four cases. If the height ofE isat most 4D (which we call Case 1), we can ignorethe last coordinates of the reference points and thusreduce the problem to dimensiond − 1. If it doesnot occur, then we distinguish between three exclusivecases. In the main case (that we call Case 2) we splitE evenly by a horizontal hyperplane, recurs on both

sides and handle the neighborhood of the splittinghyperplane with the(d − 1)-dimensional algorithm.The remaining two cases (Cases 3 and 4) are boundarycases that we introduce for technical reasons.

For anyF ⊂ E, we denote by max(F ) (respectivelymin(F ), respectively med(F )) the maximum (respec-tively minimum, respectively median) value ofxd(A)

over allA ∈ F .Case1: max(E) − min(E) � 4D. We can use the

(d − 1)-dimensional algorithm in the following way.For allA ∈ E, we construct a new(d −1)-dimensionalobject A′ with reference point(x1(A), x2(A), . . . ,

xd−1(A)). Let E′ be the set of all such objects. For all(A,B) ∈ E2, we denote inter(A′,B ′) = inter(A,B).The reference point ofA′ ∈ E′ is in ad − 1 dimensionhypercubeH if and only if the reference point ofAis in H × [min(E),max(E)], therefore the extensionof the predicate inter(·, ·) to E′ is a generalizedintersection predicate with parametersC and D indimensiond −1. So we can report in O(|E′| log|E′|+C(|E′| + k′)) the k′ (generalized) intersecting pairsin E′2. By construction ofE′, they coincide with theintersecting pairs inE2. Since|E′| = n andk′ = k, thetime bound for this case can be rewritten O(n logn +C(n + k)).

Case2: min(E) + 2D < med(E) < max(E) − 2D.Let E1 (respectivelyE2) be the set of allA ∈ E

such thatxd(A) < med(E) (respectivelyxd(A) >

med(E)). Let Em be the set of allA ∈ E such thatxd(A) ∈ [med(E) − 2D,med(E) + 2D]. We computeE1, E2 andEm in O(|E|) time by brute force. Notethat max(Em) − min(Em) � 4D, so, as in Case 1,we can report thekm intersecting pairs inE2

m inO(|Em| log|Em| + C(|Em| + km)) time.

Now, we handle recursivelyE1 and E2, that is,we call recursively onE1 andE2 the d-dimensionalalgorithm to report intersecting pairs. A problem hereis that we may report intersection pairs that have beenalready reported because they belong toE2

m. This canbe fixed by passing a flag and the value of med(E) atthe recursive calls to report intersections inE1 andE2.The flag will tell the program not to report pairs(A,B)

such that{xd(A), xd(B)} ⊂ [med(E)−2D,med(E)+2D].

Case3: med(E) � min(E) + 2D < max(E) − 2D.Let E2 (respectivelyEm) be the set of allA ∈ E suchthat xd(A) > min(E) + 2D (respectivelyxd(A) �min(E) + 4D). As in Case 1 we can report all

Page 5: Reporting intersections among thick objects

A. Vigneron / Information Processing Letters 85 (2003) 87–92 91

the intersecting pairs inEm by using the(d − 1)-dimensional algorithm. Then we handleE2 by callingrecursively thed-dimensional algorithm. We can avoidthe output of duplicates using the same approach as inCase 2.

Case4: min(E) + 2D < max(E) − 2D � med(E).Let E1 (respectivelyEm) be the set of allA ∈ E suchthat xd(A) < max(E) − 2D (respectivelyxd(A) �max(E) − 4D). As in Case 1 we can report allthe intersecting pairs inEm by using the(d − 1)-dimensional algorithm. Then we handleE2 by callingrecursively thed-dimensional algorithm. We can avoidthe output of duplicates using the same approach as inCase 2.

2.3.2. AnalysisHere we consider the(d − 1)-dimensional algo-

rithm as a black box, that is, its internal data (for in-stance, the setsE1,E2,Em of objects ind − 1 dimen-sion) are not considered, we only use its overall run-ning time.

In Cases 2–4, we have|E1| � |E|/2 and |E2| �|E|/2, therefore the time spent for splittingE into E1,E2 andEm over all recursive calls is O(n logn). Anyobject can be handled at most once by Case 1, as itis a terminal case, so the overall contribution of Case1 is O(n logn + C(n + k)) time. The only remainingcontribution we need to study is the contribution of thecalls to the(d − 1)-dimensional algorithm in Cases 2–4. It is O(logn + C) time for each occurrence of anobject in a setEm, and O(C) time for each occurrenceof an intersecting pair.

So, in order to prove our time bound, it suffices toprove that a given object can appear in two setsEm

at most during the course of the algorithm. AssumethatA appears in a setEm for the first time during thecourse of the algorithm. If it is not inE1 or E2, thenit will not be handled recursively, so it will not appearagain inEm. So assume, without loss of generality,that A ∈ Em ∩ E2. Then xd(A) � min(E2) + 2D,so afterwards, in any recursive call, we will havexd(A) � min(E) + 2D. Assume thatA appears againin Em in a recursive call. It cannot appear again inE2 sincexd(A) � min(E) + 2D. If it is not in E1either, then it will not be handled recursively andso we are done. So we assume thatA ∈ E1 ∩ Em.Then xd(A) � max(E1) − 2D, and remember thatxd(A) � min(E1) + 2D, so it follows that max(E1) −

min(E1) � 4D, therefore the next recursive call willbe terminal andA will not appear in a setEm again.

This completes the proof that our algorithm runs inO(n logn+C(n+k)) time. It is easy to see that it usesO(n) space.

Corollary 2. Let E be a set ofn objects in fixeddimensiond . We assume that each element ofE hasdiameter at mostD and has volume at leastV . Wealso assume that we can detect pairwise intersectionin unit time and that we know one point of eachobject. Then we can report all the intersecting pairsin O(n logn + (Dd/V )(n + k)) time and usingO(n)

space, wherek is the number of reported pairs.

We note that we could have achieved the same timebound without using our one dimension algorithm,by using brute force in dimension zero, and useit as a base for induction. This would shorten ourproof, however, we still described the one-dimensionalalgorithm. The main reason is that our implementationuses it, and it performs very well. This way, ourexperimental results can be replicated. We suspectthat, using the reduction to dimension zero, it wouldbe slower in practice. Besides, our one dimensionalgorithm is new (to our knowledge) and may beinteresting in its own rights.

3. Experimental results

I implemented this algorithm in two dimensions.The program reports each intersecting pair exactlyonce, in other words, it does not produce duplicates.For sake of simplicity, and because I expect it to be farmore efficient, I implemented a simpler randomizedversion. The only modification I made was to choosean object at random instead of choosing the object withmediany-coordinate to splitE into E1 andE2. Theaverage time analysis of this randomized algorithmis essentially the same as quicksort [10] and yieldsthe same O(n logn + (D2/V )(n + k)) time bound inexpectation.

I tried it with a personal computer based onan AMD K6-333 MHz processor. The followingresults concern same radius disks whose centers areuniformly distributed within a rectangle. I assume thecoordinates to be given in single precision, then I can

Page 6: Reporting intersections among thick objects

92 A. Vigneron / Information Processing Letters 85 (2003) 87–92

simply use built-in hardware double precision for theintersection predicate. Whenn = 106 and I chose (bytrying a few values) a radius such thatk is smaller thann, the running time is about 15 s. The initial sortingtakes 5 s, which means that for small values ofk,our algorithm is only about three times slower thanquicksort.

First I compared it with the naive algorithm thatchecks all then(n − 1)/2 pairs of disks. When theradius is large, and thereforek = n(n − 1)/2, ouralgorithm is four times slower. Of course, whenE issparse our algorithm is far more efficient. Then I triedit against a Voronoi diagram computation. I believeit to be an interesting comparison for two reasons.First, no experimental result has been published for theprevious fixed-radius near neighbors algorithms [2,7].Second, Dickerson and Eppstein algorithm [7] startsby computing a Delaunay triangulation, which isequivalent to computing a Voronoi diagram. Whenk < n, my program is about 100 times faster than anexact Voronoi diagram computation with CGAL [9].

4. Conclusion

The main weakness of our approach is that it onlyworks well for objects that have roughly the samesize, namely whenDd/V is small. So it would beinteresting to try to reduce this factor in our timebound. A more specific question is the following: wegave an optimal degree-two algorithm for reportingintersections among unit disks or 3-balls. Can we findfind an efficient degree-two algorithm for disks or 3-balls of different radius?

References

[1] I.J. Balaban, An optimal algorithm for finding segment in-tersections, in: Proc. 11th Annual ACM Sympos. Comput.Geom., 1995, pp. 211–219.

[2] J.L. Bentley, D.F. Stanat, E.H. William Jr., The complexity offinding fixed-radius near neighbors, Inform. Process. Lett. 6(1977) 209–212.

[3] J.-D. Boissonnat, J. Snoeyink, Efficient algorithms for lineand curve segment intersection using restricted predicates,Comput. Geom. Theory Appl. 16 (1) (2000) 35–52.

[4] J.-D. Boissonnat, A. Vigneron, Elementary algorithms forreporting intersections of curve segments, Comput. Geom.Theory Appl. 21 (2002) 167–175.

[5] T.M. Chan, Reporting curve segment intersections using re-stricted predicates, Comput. Geom. Theory Appl. 16 (4) (2000)245–256.

[6] B. Chazelle, H. Edelsbrunner, An optimal algorithm for inter-secting line segments in the plane, J. ACM 39 (1) (1992) 1–54.

[7] M.T. Dickerson, D. Eppstein, Algorithms for proximity prob-lems in higher dimensions, Comput. Geom. Theory Appl. 5(1996) 277–291.

[8] H. Edelsbrunner, A new approach to rectangle intersections,Part II, Internat. J. Comput. Math. 13 (1983) 221–229.

[9] A. Fabri, G.-J. Giezeman, L. Kettner, S. Schirra, S. Schönherr,On the design of CGAL a computational geometry algorithmslibrary, Softw. Pract. Exp. 30 (11) (2000) 1167–1202.

[10] C.A. Hoare, Quicksort, Comput. J. 5 (1) (1962) 10–15.

[11] G. Liotta, F.P. Preparata, R. Tamassia, Robust proximityqueries: An illustration of degree-driven algorithm design,SIAM J. Comput. 28 (3) (1998) 864–889.

[12] F.P. Preparata, M.I. Shamos, Computational Geometry: AnIntroduction, 3rd edn., Springer, Berlin, 1990.

[13] A. Zomorodian, H. Edelsbrunner, Fast software for box in-tersections, in: Proc. 16th Annual ACM Sympos. Comput.Geom., 2000, pp. 129–138.