E cient and Reliable Computation with Algebraic

0 downloads 0 Views 260KB Size Report
Mar 24, 1998 - degree algebraic numbers for geometric applications. Such computations fre ..... First, we approximate only algebraic numbers with rectangular.
Ecient and Reliable Computation with Algebraic Numbers for Geometric Algorithms S. Krishnany D. Manocha T. Culver Department of Computer Science University of North Carolina Chapel Hill, NC 27599-3175 fkeyser,krishnas,dm,[email protected] March 24, 1998

J. Keyser

Abstract: Many geometric algorithms involve dealing with numeric data corresponding to high degree algebraic numbers. They come up in computing generalized Voronoi diagrams of lines and planes, medial axis of a polyhedron and geometric computation on non-linear primitives described using algebraic functions. Earlier algorithms dealing with algebraic numbers either use xed precision arithmetic or techniques from symbolic computation. While the former can be inaccurate, the latter is too slow in practice. We present ecient representations and algorithms for reliable computations with algebraic numbers. We use these representations to eciently perform geometric queries like inside/outside tests, which-side or orientation tests. The overall approach combines di erent techniques from symbolic computation based on exact arithmetic with oating point arithmetic. We demonstrate its applications to ecient and reliable computation of curve and surface intersections. In practice, it is about one order of magnitude faster as compared to earlier implementations that produce reliable results.  Supported in part by a Sloan fellowship, ARO Contract P-34982-MA, NSF grant CCR-9319957, NSF grant CCR-9625217 and ONR Young Investigator Award. y Currently at AT & T Research Labs

1

1 Introduction Most geometric algorithms are based on the \Real RAM" model of computation, which assumes unit cost operations on real numbers. In practice, most computer programs replace the exact real arithmetic of this model by xed precision arithmetic. However, geometric algorithms are known to be highly sensitive to numerical inaccuracies produced due to xed precision arithmetic. Many approaches have been proposed in the literature to handle this problem. These include the design of geometric algorithms such that robust implementations can be obtained using only the xed precision hardware [DSB92, For95, Hof89, Mil89, Sug89]. However, designing such algorithms is quite involved and has been restricted to only a few problems. A second approach advocates the use of exact real arithmetic. However, a naive implementation of exact arithmetic can be quite slow and a number of techniques have been proposed in the literature to speed it up. One proposed solution has been to compute certain predicates exactly [BKM+95, EM90, FV93, Yap97]. This may involve computing a few algebraic expressions to a high enough precision to answer queries [FV93, Yap97] or using an algorithm that performs a speci c test exactly. In the latter category, most of the work has been on computing the sign of a multivariate polynomial with integer coecients or the sign of a determinant of a matrix with integer entries. In this paper, we focus on ecient and accurate computations with high degree algebraic numbers for geometric applications. Such computations frequently come up in many geometric problems. The set of problems includes:

 Computing generalized Voronoi diagrams of con gurations of lines and

planes.  Computing the medial axis transform of a polyhedron.  Geometric computations on non-linear primitives described using algebraic functions. The primitives include rational spline curves and surfaces, NURBS, algebraic sets and their boolean combinations. The set of geometric algorithms include computing convex hulls, intersections, boundary evaluation of a primitive de ned using CSG operations, etc.

It is rather dicult to design robust algorithms based on xed precision arithmetic or iterative numerical methods for such problems [Hof89, KKM97]. An accurate algorithm involves computing an exact representation of geometric entities (e.g. vertices, curves or surfaces) and performing geometric queries (e.g. inside/outside tests, which-side or orientation tests) with these representations. In many cases, such tests cannot be reduced to computing sign of a single algebraic predicate (such as the sign of a determinant). A number of algorithms have been proposed in the symbolic computation literature to represent and compute high degree algebraic numbers [Buc89, Can88, Col75, CKL89, Reg95]. Many of them have been implemented, however, their performance is too slow for most geometric applications. For example, computing Grobner bases of an algebraic system of small total degree (e.g. an ideal de ned using three degree-two polynomials) can at times take many minutes on a current high-end workstation. Main Contribution: We present ecient algorithms for exact representation, computation and geometric queries with algebraic numbers. Our contributions include:

 A hybrid approach to compute algebraic numbers combining techniques

from symbolic computation based on exact arithmetic with oating point arithmetic. The resulting approach is reliable as well as ecient.  A representation for points, curves and surfaces for ecient and reliable computations. In this paper, we restrict ourselves to algebraic sets in