• Aucun résultat trouvé

Controlled Perturbation: Fixed-Precision Approximation of

Dans le document Mathematics and Visualization (Page 61-64)

The approaches taken in recent years to cope with precision and robustness problems in geometric computing can be roughly categorized in one of the following two archethemes: (i) exact computing and (ii) fixed-precision ap-proximation. The former mimics the real RAM model for certain primitives, whereas the latter adjusts the algorithmic solutions to the standard computer limited-precision arithmetic.

The approach favored by the Cgal project and related projects, as re-flected also in most of this chapter, is exact computing. Exact geometric computing has many advantages, among them is solving the precision and robustness problem, giving the ultimate true results, and enabling the tran-scription of the geometric algorithms in the literature if the input is in general position.

However, exact computing has some disadvantages. In spite of the constant progress, it is still slower than machine arithmetic especially when the objects are non-linear or higher dimensional (beyond curves in the plane). Also, exact computing does not solve the degeneracy problem, and if we anticipate input that is not in general position, as is often the case in practice, degeneracies require special (and often very tedious) treatment.18

Here we outline a method that has been employed for the robust imple-mentation of arrangements of curves and surfaces while using floating-point arithmetic. The scheme seeks to perturb the input objects slightly such that after the perturbation their arrangement is degeneracy free and all the pred-icates that arise in the construction of the arrangement can be accurately computed with the given machine precision. Controlled perturbation has been successfully applied to arrangements of circles [198], spheres [200, 153, 154], polygons [279], polyhedral surfaces [292], and more recently to Delaunay tri-angulations [172].

One can view the goal of controlled perturbation as follows. We look to move the input objects slightly from their original placement such that when constructing the arrangement of the perturbed objects while using a fixed pre-cision floating-point filter (see, e.g., [251, 346]), the filter will always succeed and we will never need to resort to higher precision or exact computation.

18InCgalthough, the implementation of algorithms for two-dimensional arrange-ments do not assume general position and handle degeneracies.

We give an overview of the controlled-perturbation scheme. Although the ideas that we present here could have been described in a more general setting, and have been applied more generally, we concentrate, for ease of exposition, on arrangements of circles.

The input to the perturbation algorithm is a collectionC={C1, . . . , Cn} of circles, each circle Ci is given by the Cartesian coordinates of its center (xi, yi) and its radiusri; we assume that all the input parameters are repre-sentable as floating-point numbers with a given precision. The input consists of three additional parameters: (i) the machine precisionp, namely the length of the mantissa in the floating-point representation, (ii) an upper bound on the absolute value of each input number xi, yi, and ri, and (iii) — the maximum perturbation size allowed.19

For an input circleCi, the perturbation algorithm will output a copyCi with the same radius but with its center possibly perturbed. We define Cj

as the collection of circles {C1, . . . , Cj}, and Cj as the collection of circles {C1, . . . , Cj}. The perturbation scheme transforms the setC=Cninto the set C=Cn.

We carry out the perturbation in an incremental fashion, and if there is a potential degeneracy while adding the current circle, we perturb it so that no degeneracies occur. Once the j-th step of the procedure is completed, we do not move the circles inCj again. We next describe the two key parameters that govern the perturbation scheme—the resolution bound and the perturbation bound.

Resolution Bound

A degeneracy occurs when a predicate evaluates to zero. The goal of the perturbation is to cause all the values of all the predicate expressions (that arise during the construction of the arrangement of the circles) to become

“significantly non-zero”, namely to be sufficiently far away from zero so that our limited precision arithmetic could enable us to safely determine whether they are positive or negative. of circles have a natural geometric characteri-zation asincidences. For example, inouter tan-gency(Fig. 1.17), two circles intersect in a single point. We transform the requirement that the predicates will evaluate to sufficiently-far-from-zero values into a geometric distance require-ment.

An outer tangency between C1 and C2 oc-curs when

(x1−x2)2+ (y1−y2)2=r1+r2.

19The exact size ofdepends on the specific application of the perturbed arrange-ment.

We look for a distance ε >0 such that if we move one circle relative to the otherεaway from the degenerate configuration, we could safely determine the sign of the predicate with our limited precision arithmetic, that is, we look for a relocation (x2, y2) of the center ofC2 such that

|

(x1−x2)2+ (y1−y2)2(r1+r2)| ≥ε .

This is a crucial aspect of the scheme—the transformation of the non-degeneracy requirement into a separation distance. We call the bound on the minimum required separation distance theresolution bound20and denote it by ε. If the separation distance is less thanε, then there is apotential degeneracy.

The bound ε depends on the size of the input numbers (center coordinates and radii) and the machine precision. It is independent of the number n of input circles.

Deriving a good resolution bound is a non-trivial task [198]. Notice how-ever that in order to carry out the scheme successfully, one does not need to know the resolution bound. This bound is only needed in order to derive the perturbation bound (see next paragraph) which gives a guarantee on the max-imum perturbation magnitude, as may be required by some applications. It also allows to determine what precision is necessary in order to accommodate a given maximum on the allowed perturbation. If a user is not concerned about the perturbation magnitude, then the scheme requires very little analysis.

Perturbation Bound

Suppose that εis indeed the resolution bound for all the possible degenera-cies in the case of an arrangement of circles for a given machine precision.

When we consider the current circle Ci to be added, it could induce many degeneracies with the circles in Ci−1 . Just moving it byεaway from one de-generacy may cause it to come closer to other degeneracies. This is why we use a second boundδ, theperturbation bound— the maximum distance by which we perturb the center of any of the circles away from its original placement.

The bound δ depends onε, on the maximum radius of a circle in C, and on a density parameter ρ. The density parameter bounds the number of circles that are in the neighborhood of any given circle or may effect it during the process; clearly,ρ≤n−1.

We say that a pointqis a valid placement for the center of the currently handled circleCiif, when moved toq, this circle will not induce any degeneracy with the circles in Ci1. The bound δ is computed such that inside the disk Dδ of radiusδ centered at the original center of Ci, at least half the points (constituting half of the area ofDδ) are valid placements for the circle. This means that if we choose a point uniformly at random insideDδ to relocate the center of the current circle, it is a valid placement with probability at least 12.

20It would have also been suitable to call it aseparation bound, but we use resolu-tion boundto avoid confusion with separation bounds of exact algebraic computing.

After the perturbation, the arrangementA(C) is degeneracy free. More-over,A(C) can be robustly constructed with the given machine precision. The perturbation algorithm should not be confused with the actual construction of the arrangement. It is only a preprocessing stage. However, it is conve-nient to combine the perturbation with an incremental construction of the arrangement, or more generally, the scheme can be conveniently and efficiently interwoven with geometric Randomized Incremental Construction (RIC) al-gorithms [172]

The full technical details of the method are given for circles in [198]. In all applications to date, even in fairly involved applications such as dynamic maintenance of molecular surfaces under conformational changes [154], the perturbation consumes a very small fraction of the running time of the con-struction algorithm.

Dans le document Mathematics and Visualization (Page 61-64)