13
ACS Algorithms for Complex Shapes with Certified Numerics and Topology Algebraic tools for the Voronoi diagram of ellipses, leading to an experimental implementation Ioannis Emiris Elias Tsigaridas George Tzoumas ACS Technical Report No.: ACS-TR-241403-02 Part of deliverable: WP-I/D4 Site: NUA Month: 24 Project co-funded by the European Commission within FP6 (2002–2006) under contract nr. IST-006413

Algebraic tools for the Voronoi diagram of ellipses

Embed Size (px)

Citation preview

ACS

Algorithms for Complex Shapes

with Certified Numerics and Topology

Algebraic tools for the Voronoi diagram ofellipses, leading to an experimental

implementation

Ioannis Emiris Elias Tsigaridas George Tzoumas

ACS Technical Report No.: ACS-TR-241403-02

Part of deliverable: WP-I/D4Site: NUAMonth: 24

Project co-funded by the European Commission within FP6 (2002–2006)under contract nr. IST-006413

Abstract

We study the four predicates required for the Voronoi diagram of ellipsesin the plane, under the Euclidean metric, based on an incremental algorithm.The report concentrates on InCircle, which is the hardest predicate: it de-cides the position of a query ellipse relative to the Voronoi circle of three givenellipses. The implementation of InCircle combines a certified numeric algo-rithm with algebraic computation. The numeric part achieves quadratic con-vergence and leads to a real-time implementation for non-degenerate inputs.To achieve robustness, we develop interval-arithmetic techniques in Maple

and, more efficiently, in C++ based on the package ALIAS. We switch to analgebraic approach for handling the degeneracies fast, applying real solvingand resultant theory. The latter relies on certain symbolic routines whichare efficiently implemented in Maple. Our approach readily generalizes tosmooth convex curves. We conclude with implementation details on all fourpredicates.

1 Introduction

This work finalizes our previous report [4] where we presented algebraic tools forthe predicates required for the Voronoi diagram of ellipses.

Our approach is based on the incremental algorithm of [8]. The algorithm isstructured according to some basic predicates that must be implemented in theexact computation paradigm. The four predicates are:

(κ1) given two ellipses and a point outside of both, decide which is the ellipseclosest to the point.

(κ2) given two ellipses, decide the position of a third one relative to a specificexternal bitangent of the first two.

(κ3) given three ellipses, decide the position of a fourth one relative to one (externaltritangent) Voronoi circle of the first three; this is the InCircle predicate.

(κ4) given four ellipses, compute the part of the bisector that changes due to theinsertion of a fifth ellipse.

In our previous report we studied the first two predicates under a purely algebraicapproach. Predicate κ1 is decided by considering the pencil of a circle and anellipse. The circle is tangent to the ellipse iff the discriminant of the characteristicpolynomial of the pencil vanishes. The smallest real root of the discriminant is thedistance between a circle and an ellipse. Therefore to decide the predicate, twoalgebraic numbers of degree four must be compared. The computed polynomialsare derived from the implicit equation of the ellipse. Predicate κ2 is handled asfollows: Compute the bitangent lines to a pair of ellipses by solving a polynomial ofdegree four. Then decide the relative position of the query ellipse by computing thesign of a polynomial of degree four at an algebraic point of the same degree. Thespeed and efficiency of the implementations is due to the small algebraic degree ofthe involved quantities.

The study of κ3 showed that there are at most 184 tritangent complex circlesto three ellipses and this bound is tight. The bound also holds for three conicsin the plane. Therefore, an algebraic approach will have to do computations withalgebraic numbers of degree up to 184. Hence, a purely algebraic approach is notefficient, with today’s software. On the other hand, the maximum number of realtritangent circles is an open problem. It has not been possible to find an instanceof three non-intersecting ellipses with more than 22 real solutions.

1

In the previous report, we sketched a subdivision scheme for κ3 that workedbetter than generic solvers, although it had linear convergence. In this report, wefocus on the computation of κ3 which is clearly the most challenging predicate andthe only one that is not satisfactorily answered yet. Our main contribution is a newnumeric algorithm that exhibits quadratic convergence in order to approximate theVoronoi circle, by exploiting several geometric properties of the problem. Not only isour method faster than generic solvers and other existing implementations, includingthe one in [6], but also allows us to decide κ3 before full precision has been achieved.An advantage of this method is that it can be generalized to arbitrary parametriccurves and arcs. The algorithm proved to be very efficient, approximating the rootwith precision up to 10−15 in less than 0.1 sec, when using standard floating-pointarithmetic. The subdivision methods and more experimental results are discussedin the sequel. For a more detailed presentation see [5].

Robustness is guaranteed by interval arithmetic, while exactness is guaranteedby root separation bounds. However, we avoid running the subdivision algorithmuntil the (theoretical) separation bound is reached. At near-degenerate or degener-ate configurations, where floating-point (or even arbitrary) precision is not enough,we switch to an exact algebraic method in the parametric space which correspondsto real solving a univariate polynomial and comparing real algebraic numbers. Ourfinal goal is a cgal1 software package for constructing the Voronoi diagram of el-lipses. Notice that exact constructions do not preclude numeric computing as longas the latter certifies its output.

The work coming closest to ours towards a complete Voronoi diagram, is [7].The authors essentially trace the bisectors in order to compute the Voronoi cellsof arbitrary curves up to machine precision. Their algorithm uses floating pointarithmetic and their software Irit 2 works well in practice, with runtimes rangingfrom a few seconds to a few minutes. Although they argue that their algorithmcan be extended to exact arithmetic, it is not clear whether handling the variousdegenerate configurations may lead to a robustness issue.

The report is organized as follows. The next section explains how the InCircle

is modeled with bitangent and tritangent circles. In section 3 we detail our subdi-vision method, while 4 shows how we finally decide InCircle and how degeneratecases are handled. The next section 5 shows how κ4 can be decided by κ3. Sec-tion 6 presents our implementation results along with some implementation details.Finally, section 7 concludes our work and presents some open issues.

2 The InCircle predicate (κ3)

We assume that an ellipse is given in rational parametric form x(t), y(t)), i.e. con-structively in terms of its rational axes, center and rotation. It is more intuitivefor a GUI to offer constructive input rather than require the coefficients of the im-plicit form. The parametric approach is suitable for tracing the boundary of anellipse, which is crucial for the subdivision step of the symbolic-numeric algorithmfor κ3. Moreover, given the parametric form we can derive the implicit one usingonly rational arithmetic [6]. The opposite is not always possible.

Given ellipses Et, Er, Es we want to determine the relative position of ellipse Eh

with respect to the Voronoi circle of the first three. The result of κ3 is whether Eh

is outside, intersects the open Voronoi disk, or is externally tangent to the Voronoicircle of Et, Er, Es.

In order to decide κ3, we need some information about the Voronoi circle ofthree ellipses. The following subsections show how we represent the Voronoi circle

1http://www.cgal.org2http://www.cs.technion.ac.il/˜irit/

2

as the condition where two bitangent circles coincide.

2.1 The bitangent circle

The bisector of two ellipses is the locus of points at equal distance from the twoellipses. Given ellipses Et, Er and points P,Q on each of them, the bisector isobtained as the intersection V of the normal lines at the ellipses, at P , Q, when

|−−→PV | = |

−−→QV |. This expresses all points on the bisector except for a finite number

of them, namely where the two normals are parallel.A point defined by parameter value t will also be referred to as point t, or t ∈ Et.

The bisector B(t, r) of two ellipses is is rational in t, r with denominator Dtr. Thenumerator is a bivariate polynomial of degree six in t and six in r. It can be shownthat it also vanishes when Dtr vanishes. Therefore it includes both bisector pointsat infinity as well as points where the normal vectors of the two ellipses coincide(i.e. at the minimum distance between two ellipses) and we can safely ignore thequantity Dtr. For more information on parametric bisectors see [1].

Among the bitangent circles, the Voronoi circle can be identified using somegeometric arguments that have been presented in [6] and [4]. Below we presentsome of the related lemmas omitting the proofs.

Lemma 2.1 Given two ellipses and a point on the first, there may exist up to sixreal bitangent circles, tangent at the specific point. This bound is tight in the worstcase.

Note that only one such circle is external to both ellipses. We call this uniqueexternal bitangent circle the Apollonius circle of the two ellipses. We denote theApollonius circle of Et and Er tangent at points t and r respectively by Atr(t, r).Since r depends on t, we may omit r and write only Atr(t).

Corollary 2.2 Given a point t0 on Et, it is possible to determine the unique rootri of B(t0, r).

2.2 The tritangent circle

In the parametric space, the intersection of two bisectors involves three variables,so in order to express the Voronoi circle, we need the intersection of three bisectors,namely the system:

B1(t, r) = B2(r, s) = B3(s, t) = 0. (1)

As an alternative, we can consider the system:

Q(t, r, s) = B1(t, r) = B3(s, t) = 0. (2)

Here, Q is the condition that makes the three normals of each ellipse intersect at asingle point. Q is a polynomial of total degree 12, four in each variable t, r, s. To findthe roots, we use resultants, which express the solvability of polynomial systems.Resultant matrices are such that their determinant is a nontrivial multiple of theresultant itself. In particular, we construct a resultant matrix whose determinantis factored. Let ress denote the resultant with respect to s. Then we compute twoSylvester resultants:

R1(t, r) = ress(Q(t, r, s), B3(s, t))

= (at28r24 + . . .)︸ ︷︷ ︸

R′

1

(b12t12 + . . . + b1t + b0)(1 + t2)4

R2(t) = resr(R′

1(t, r), B1(t, r)) (3)

= (a184t184 + . . . + a1t + a0)(c12t

12 + . . . + c1t + c0)6 ·

(1 + t2)28.

3

We have proven that there are factors which have no real roots, or their rootscorrespond to the normals lying on the same line. In every example we have tried,if we eliminate all these factors at appropriate powers, we obtain a polynomial ofoptimal degree (184) that contains all relevant roots. We conjecture that this is thegeneral case. We have proven that the factors exist, but we have no proof for theexponents.

3 Voronoi circle using subdivision

In this section, we present a subdivision scheme to approximate the solution ofsystem (1). Experiments have shown that generic Gradient-based methods runfaster for (1) than for (2), most probably because in the former, only two variablesare involved in each equation. Our algorithm is a simpler method that exhibitsquadratic convergence and exploits the system’s geometric symmetry.

Lemma 3.1 Consider Atr(t, r), which means that B1(t, r) = 0. If we slide this cir-cle along the boundary of the ellipses for a sufficiently small amount, while varyingits radius and keeping it tangent to t′ and r′ respectively, then t′ > t =⇒ r′ < r.

Proof. A proof can be found in [5]. �

The basic idea of our algorithm is the following: Let (t, r, s) be the solution of(1) we are looking for. Now consider the following system:

B1(t1, r2) = B2(r2, s1) = B3(s1, t2) = 0 (4)

B1(t2, r1) = B2(r1, s2) = B3(s2, t1) = 0 (5)

These two systems look like (1). The difference is that we have considered t1 6= t2in the general case and thus we can start solving the above equations in the givenorder. Doing so and keeping solutions that correspond to Apollonius circles, leadsto a construction such that in left fig. 1. That is, if we start from a point that is nota tangency point of the Voronoi circle, we compute two bitangent circles for eachellipse. If we are lucky enough, all bitangent circles coincide with the Voronoi circle(t1 = t = t2). Otherwise, we have found an interval [t1, t2] that contains t. Now thatwe have an enclosing interval [t1, t2] for t, we can refine it by choosing a new pointt′1 inside this interval and computing a new interval [t′1, t

2] (suppose without anyharm that t′1 < t′2). As a consequence of lemma 3.1, t1 approaches t from the left ⇒r2 approaches r from the right ⇒ s1 approaches s from the left ⇒ t2 approaches tfrom the right (see left fig. 1). Therefore t′1 ∈ [t1, t2] =⇒ t ∈ [t′1, t

2] ⊂ [t1, t2]. Notethat computing a smaller interval on dimension t allows us to compute smallerintervals on dimensions r and s as well. Therefore we maintain exactly one boxthat contains our solution, contrary to generic interval-arithmetic techniques thattemporarily maintain a large number of boxes that may contain a solution and laterreject them.

3.1 Subdivision

Eliminating r2, s1 from (4) yields R(t1, t2) as a bivariate polynomial equation. Sim-ilarly, eliminating r1, s2 from (5) yields R(t2, t1) as a bivariate polynomial equation.Now we observe that R(t1, t2) = R(t2, t1), since they have been derived from thesame equations with the same coefficients. When t1 6= t2, systems (4) and (5)express a perturbation of the Voronoi circle into bitangent circles of each pair ofellipses, as shown in left figure 1.

4

t1 t2

r1

r2s1

s2

t

r st1

t2

r2

s1t

Figure 1: Left: All-pair bitangent circles; Right: Computing t2 from t1 encloses t

Looking at R(t1, t2) we see that t2 is an implicit function of t1, say f , that isf(t1) = t2. Given value t1, f(t1) is the value of t2 after solving (4), shown in rightfig. 1. Obviously f(t) = t, since we are on a tritangent circle. From lemma 3.1 itfollows that t1 < t′ < t =⇒ f(t1) > f(t′) > f(t). That is, as t1 approaches t fromthe left, t2 approaches t from the right and t ∈ [t1, t2].

Lemma 3.2 In the above notation f ′(t) = −1.

Proof. The proof uses the Implicit Function Theorem and can be found in [5]. �

Theorem 3.3 (Convergence) The above subdivision algorithm converges quadrat-ically.

Proof. The proof uses the above lemma and Taylor expansions around points t1and t. It can be found in [5]. �

3.2 Starting interval

In this subsection we show that it is possible to find a box that contains a uniquesolution. Consider the half-planes l1, l2 (fig. 2) which do not contain the ellipsesand are bounded by the two external bitangents of E1 and E2. Consider also aquery ellipse E that does not intersect the other two. Let |li| = 0 or 1 dependingon whether E ∩ li = ∅ or not. Let C be the interior of the convex hull of E1, E2.Then, the number of Voronoi circles is |l1| + |l2|, if E ∩ C = ∅ and 2 − |l1| − |l2|,otherwise.

We can find a starting interval that contains the tangency point of the Voronoicircle by computing the external bitangents of each pair of ellipses and taking theintersection of the interior of their convex hulls. After computing the initial interval,we can pick any random point t1 to start our algorithm.

It might be necessary (depending on our choice of t1) to normalize our initialintervals, so that they contain the solutions of (4) and (5), shown in left fig. 1. Westart from value t1 and solve equations (4) and (5) in the order they appear. Ata given step, we have computed a value for parameter x, say x and then compute

5

h

l1

l2

Figure 2: The cases on the number of Voronoi circles, depending on the position ofthe third dotted ellipse

t1t2

r2

s1

t1t2

r2

s1

t1 t2

r1r2

s1s2

Figure 3: Left: y ∈ [y1, y2]; Middle: backtracking; Right: normalized intervals

the Apollonius circle at point y of the next ellipse, that is we compute Axy(x, y).If y ∈ [y1, y2], then we update the corresponding endpoint of the box with y (leftfig. 3). The corresponding endpoint depends on how y moves, as x moves from x1

to x2. If y 6∈ [y1, y2] (dotted circle in left fig. 3), then we move backwards, updatingx by computing the Apollonius circle tangent to the corresponding endpoint of the[y1, y2] (middle fig. 3). When all bitangent circles can be computed, we end up withnormalized intervals like in right fig. 3.

There is also the case where two Voronoi circles exist. In this case the overallalgorithm (for the Voronoi diagram) indicates which one is needed and therefore wepick a proper sub-interval.

3.3 Generalization

The presented methods can be readily generalized in order to compute the Voronoicircle of arbitrary parametric curves, as shown in left fig. 4, with the preconditionthat a normal line is defined at any point of the curve. The parametric bisectorof two rational or polynomial curves is a rational or polynomial function [1] anda system like (1) can be defined. If some Bi is rational, we can replace it by itsnumerator and keep the denominator as an extra condition (to be nonzero). Thus,we get a polynomial system where the resultant is defined and the subdivisionmethod in sec. 3 applies unchanged. The geometric filtering presented in section 2also extends to generic smooth convex shapes, although more effort is required toproperly adapt to non-convex shapes, where a tangent line does not leave the wholeshape on the same hyperplane. If a fast geometric filtering (that provides us with

6

Figure 4: Left: Voronoi circle of three arbitrary curves; Right: Voronoi circle of anellipse, a parabola and an arbitrary curve

an interval that isolates the appropriate root of the bisector polynomial) is hardto derive, we can use slower algebraic evaluations (i.e. computing all roots of thebisector polynomial and then perform sign evaluations of appropriate quantities tochoose the externally bitangent circle).

4 Deciding κ3

This section shows how we can decide κ3. Let (t, r, s) be the solution of (1) whichcorresponds to the Voronoi circle Vtrs of Et, Er, Es. Let ρxy(x) be the radius of theAxy(x). To decide the predicate, we consider the radius ρth(t).

Property 4.1 If ρth(t) < ρtr(t) then the query ellipse intersects the Voronoi diskof Et, Er, Eh. If ρth(t) > ρtr(t) then the query ellipse lies outside the Voronoi circleof Et, Er, Eh. If ρth(t) = ρtr(t) then the query ellipse is externally tangent to theVoronoi circle.

Proof. The proof, though intuitive, can be found in [5]. �

Consider the difference of the radii of the above Ath(t) and Atr(t). These circlesshare one tangency point. Therefore, to compare their radii, it suffices to comparethe x-coordinates of their centers (provided that the tangency point and the centerdo not define a vertical line), denoted by Vx(Ath) and Vx(Atr) respectively (seefig. 5). The center of A is defined as the solution of a system of two linear equationsthat express the normal lines at the tangency points. Therefore,

Vx(Ath) − Vx(Atr) = −dy(t)

dtQthr(t, h, r)

Dth(t, h)Dtr(t, r),

where Q is defined in (2), and D corresponds to the determinant that appears asdenominator, when solving the linear system. If dy(t)/dt|t=t > 0, then ρth(t) <ρtr(t) =⇒ Vx(Ath) < Vx(Atr). Similarly, if dy(t)/dt|t=t < 0, then ρth(t) <ρtr(t) =⇒ Vx(Ath) > Vx(Atr). Therefore, in order to compare the radii it sufficesto compute the sign of the following quantity, which is equivalent to computing thesign of each factor separately:

S = −Qthr(t, h, r) · Dth(t, h) · Dtr(t, r).

Consequently, κ3 can be decided as follows:

7

t

r

s

h

t

r

s

h

Figure 5: Comparing the radii of two Apollonius circles. Left: query ellipse outsideVoronoi circle; Right: query ellipse intersects Voronoi circle

sign(S) the query ellipse. . .- intersects the Voronoi disk (fig. 5 right)+ lies outside the Voronoi circle (fig. 5 left)0 is externally tangent to the Voronoi circle

4.1 Degeneracies

If the query ellipse is tangent to the Voronoi circle, then the previous sign evalua-tions will fail for arbitrary small intervals, since Qthr evaluates to zero at the solutionof the system. The same also happens with near-degenerate configurations, whenour run-time precision is not enough. For near-degenerate configurations, we couldalways run the algorithm with arbitrary-high precision. This however doesn’t elim-inate the problem, since there will always be near-degenerate configurations whereour precision is not enough to handle. If we do computations with dynamic preci-sion, then we may end up doing operations with very big bitsizes which slows downthe overall algorithm considerably. If we are not interested in exact computation,we could just report all these configurations as degenerate. But in applicationswhere exact computation is vital, more work has to be done.

At a degenerate configuration, given that we are able to do computations witharbitrary high precision (changing dynamically) the algorithm does not terminate.To overcome this obstacle, we have to use the separation bound theory, whichroughly states that given a specific input bitsize, degenerate and non-degenerateconfigurations are separated by a (very small) constant. Therefore, we could runthe algorithm knowing that it will terminate when it reaches this constant which isprecomputed in advance. The problem is that it might need quite many iterationsto achieve this constant and we have to do computations with numbers of hugebitsize. An analysis on the required number of iterations for a subdivision-basedalgorithm to decide κ3 can be found in [6]. It states that if the input coefficientshave τ bits, then and the order of convergence of our method is φ > 1, then thenumber of iterations needed for κ3 is logφ (1508 + 181944τ) and that for 10-bit inputcoefficients, a linear convergence scheme will need almost two million iterations. Onthe other hand, quadratic convergence requires about 20 iterations. Note that thesetheoretic bounds are quite pessimistic.

As an alternative to the separation bound theory, we can solve the problemusing resultants. Given three ellipses Et, Er, Es and a query one Eh, we computethe resultants of system (2), i.e. R(t) and R′(t), with respect to the two tripletst, r, s and t, r, h, respectively. The steps of this computation are shown in (3).

8

case κ3(Et, Er, Es, Eq) condition κ3(Et, Er, Eh, Eq) κ4

10 ∨ False

tq 6∈ [ts, th]0 ∨ False

NoConflict

2 tq ∈ [ts, th] Interior

3 True (⇒ tq ∈ [ts, th]) 0 ∨ False 123-Vertex

4 0 ∨ False (⇒ tq ∈ [ts, th]) True 124-Vertex

5True

tq ∈ [ts, th]True

TwoVertices

6 tq 6∈ [ts, th] EntireEdge

Table 1: Deciding κ4

According to [6], G(t) = gcd(R(t), R′(t)) together with R(t), R′(t) allow us toobtain the actual separation bound. Now, we may run the subdivision schemeup to this bound, which in all practical cases, is a lot larger than the theoreticalone. This way we avoid operations with numbers of large bitsize. In practice werun the subdivision scheme for a prescribed number of steps, in order to decide alleasy (non-degenerate) cases. If we do not get the answer then we switch to thealgebraic approach that is presented above. If R and R′ do not have common realroots, i.e G(t) = 1, then we continue the subdivision algorithm until it halts, sincewe know that the subdivision process stops. If they have common real roots, i.eG(t) 6= 1, then we refine the subdivision interval either until it contains only onereal root of G(t) and no other root of R and R′, which means that we are in adegenerate configuration, or until it contains no real root of G(t), which means thatthe subdivision process stops and answers the predicate.

5 Conflict region type (κ4)

This predicate takes as input ellipses Et, Er, Es, Eh and determines the type ofconflict of ellipse Eq with the Voronoi edge whose vertices are the centers of theVoronoi circles Vtrs and Vtrh respectively. The conflict region is the set of points Von the Voronoi edge where an Apollonius circle of Et, Er centered at V intersects Eq,and it may fall into one of 6 cases [2, 8]: NoConflict, Interior, 123-Vertex,

124-Vertex, TwoVertices, EntireEdge (fig. 6).Le ts, th be the tangency points of Vtrs and Vtrh on Et and assume ts < th. Let

tq be the tangency point of Vtrq on Et. Then, table 1 shows how we can decide κ4

by applying κ3. The case ts > th is treated symmetrically.The (degenerate) case where ts = th implies there is a unique Voronoi circle

tangent to the 4 given ellipses, which can be detected by κ3. Then, the Voronoiedge degenerates to a vertex and κ4 reduces to κ3 with arguments any 3 of the 4ellipses and Eq. The possible outcomes are NoConflict, EntireEdge.

case 1,2 Eq is outside both Voronoi circles. It lies in the region between the Voronoicircles and ellipses Et, Er, iff the tangency points of the Voronoi circles (thereare two of them) of Et, Er, Eq lie in [ts, th] (Interior). Otherwise, Eq doesnot conflict with the bisector (NoConflict). Note that it is not possible tohave both κ3 equal to 0.

case 3,4 The query ellipse conflicts with only one of the Voronoi circles, namely Et, Er, Es

(or Et, Er, Eh). The center of the (unique) Voronoi circle of Et, Er, Eq lieson the Voronoi edge, therefore the predicate answers 123-Vertex (or 124-

Vertex), respectively.

9

(1)-NoConflict (3)-123-Vertex (5)-TwoVertices

(2)-Interior (4)-124-Vertex (6)-EntireEdge

Figure 6: All cases of κ4, where the query ellipse is shaded

case 5,6 Eq conflicts with both Voronoi circles. It has no common points with theregion between Et, Er, Es, Eh, iff the tangency points of the Voronoi circles ofEt, Er, Eq lie in [ts, th]. In this case, there is a part of the Voronoi edge thatdoes not conflict with Eq (TwoVertices). Otherwise, Eq conflicts with theentire edge (EntireEdge).

6 Implementation

We have implemented predicates κ1, κ2 in C++ using the specialized algorithmsof [3], which are implemented in the Synaps3 library. The real algebraic numbersare in isolating interval representation, that is by a square free integer polynomialand an interval with rationals endpoints. Since predicates κ1 and κ2 involve com-putations with real algebraic number of degree up to 4 we used the implementationbased on the algorithms of [3], which avoids subdividisions both for real solving andcomparison.

We used extended integer arithmetic from gmp. We also performed tests withthe CGAL filtered type Lazy exact nt, but the results were not better. The reasonis that the size of the various quantities is rather large and the filter almost alwaysfailed. This implies that geometric filters may be used.

For each test we randomly generated 1000 instances (point and 2 ellipses, or3 ellipses), with the coefficients uniformly distributed between 1 and 2B , B ∈{10, 30, 100, 300}. Table 2 summarizes average timings; for κ1 and κ2 runtimesgrow sub-quadratically in B. Note that for κ2 half of the time is spent for thesolution of the bivariate system and the other half is spent for the computation ofthe the relative position of the third ellipse. All tests ran on a P4 2.6GHz-CPUwith 1GB of RAM, using Debian Linux with a 2.6.10 kernel.

For κ3, the implementation of the numeric part is in C++ using the interval-arithmetic library Alias. At each iteration we have to solve the bisector polynomialB(t0, r). Fortunately Alias provides a fast univariate polynomial solver for thistask. Note that the geometric arguments presented in section 2 are needed only inthe very beginning of the iteration scheme (typically two or three iterations), before

3http://www-sop.inria.fr/galaad/software/synaps/

10

B predicate κ1 [ms] predicate κ2 [ms]10 0.45 6.1530 0.94 16.46100 3.68 73.21300 17.3 396.82

Table 2: Timings from our implementation in C++ utilising the implicit approach

the intervals become small enough to contain only one root of the bisector polyno-mial. Consequently subsequent iterations run faster than the first ones. Computingthe diameter of the approximating intervals during each iteration of the algorithmverified its quadratic convergence. For instance, a diameter sequence was: [3.01679,0.978522, 0.303665, 0.0381727, 0.000628676, 1.70776e-07, 1.17684e-14]. Our exper-iments show that about eight iterations are enough to approximate the roots of thesystem with a precision of 10−15 in about 80 msec. When deciding κ3, we have todo some extra computations with the query ellipse. But in this case, we may beable to decide the predicate at a lower precision. Thus, the average running time isagain about 80 msec.

A straightforward implementation of the subdivision scheme in Maple applied

on the bisector polynomials of an ellipse(

855t2+3307500(1+t2) , −9(13t2−11t+13)

50(1+t2)

)

, a parabola(

12r2 + 8, r

)and an arbitrary curve of degree three

(− 1

2s3 − 15s2 + 1, 3s

)(shown in

right fig. 4) successfully computed the Voronoi circle in 0.36 sec with a precisionof 30 digits. The interval diameter sequence was: [0.2456, 0.179254771e-1, 0.973e-4, 0.287e-8, 0.2495783e-17,0.11e-28]. Preliminary experiments indicate that theruntime depends linearly on the number of precision digits.

The algebraic part is efficiently implemented in Maple. We compute the re-sultant of (2) for the two triplets of ellipses as described in sec. 4.1. The resultantcomputation is performed by computing two Sylvester resultants, as shown in (3).For 10-bit input coefficients, the resultant computation takes about six sec, there-fore, for both triplets we spend around 12 sec. Then we isolate the roots of the re-sultant polynomials in less than a second using the Maple package GB-Rs4. Othersolvers could also be used here. The total running time is about 13 sec. Since weperform exact arithmetic, the input bitsize is an important factor on the runningtime of the symbolic algorithm. When generic curves are used, the computation ofthe resultant depends on the degree of the involved polynomials. Therefore, verycomplex curves might yield impractical runtimes. On the other side, use of simplercurves like circles or circular arcs supersedes the subdivision approach, as we cananswer the predicate quickly performing only exact algebraic computations.

7 Conclusion

This report provides algebraic tools for the Voronoi diagram of ellipses. In a com-plete C++ implementation, we will have to develop efficient symbolic routines tocompute the resultant of system (2). In this direction, we plan to develop C++

code using the either the Synaps library or a provided Algebriac Kernel that willfinally lead to a complete cgal package. Such a package would extend the library’scapabilities to compute the Voronoi diagram of ellipses and more generic curveslong-term.

4http://fgbrs.lip6.fr/salsa/Software/index.php

11

References

[1] G. Elber and M.-S. Kim. Bisector curves of planar rational curves. Computer-Aided Design, 30:1089–1096, 1998.

[2] I. Emiris and M. Karavelas. The predicates of the Apollonius diagram: algorith-mic analysis and implementation. Comp. Geom.: Theory & Appl., Spec. Issue onRobust Geometric Algorithms and their Implementations, 33(1-2):18–57, 2006.

[3] I. Emiris and E. Tsigaridas. Real solving of bivariate polynomial systems. InV. Ganzha, E. Mayr, and E. Vorozhtsov, editors, Proc. Computer Algebra inScientific Computing (CASC), LNCS, pages 150–161. Springer Verlag, 2005.

[4] I. Emiris, E. Tsigaridas, and G. Tzoumas. Algebraic tools for the Voronoi dia-gram of ellipses. Tech. Rep. ACS-TR-241403-01, National University of Athens,2006.

[5] I. Emiris and G. Tzoumas. A real-time and exact implementation of the pred-icates for the Voronoi diagram of parametric ellipses. To appear in Proc. 2007ACM Symp. Solid and phys. modeling, Beijing, China. Manuscript availablefrom http://www.di.uoa.gr/∼geotz/.

[6] I. Z. Emiris, E. P. Tsigaridas, and G. M. Tzoumas. The predicates for the voronoidiagram of ellipses. In Proc. ACM 22th Annual Symposium on ComputationalCeometry (SoCG), pages 227–236, New York, NY, USA, 2006. ACM Press.

[7] I. Hanniel, R. Muthuganapathy, G. Elber, and M.-S. Kim. Precise Voronoi cellextraction of free-form rational planar closed curves. In Proc. 2005 ACM Symp.Solid and phys. modeling, pages 51–59, Cambridge, Massachusetts, 2005. (Bestpaper award).

[8] M. Karavelas and M. Yvinec. Voronoi diagram of convex objects in the plane.In Proc. ESA, pages 337–348, 2003.

12