Solving Systems of Polynomial Equations
Total Page:16
File Type:pdf, Size:1020Kb
Appeared in IEEE Computer Graphics and Applications, March 1994 Solving Systems of Polynomial Equations 1 Dinesh Manocha Department of Computer Science University of North Carolina, Chap el Hill, NC 27599-3175 Abstract: Current geometric and solid mo deling systems use semi-algebraic sets for de ning the b oundaries of solid ob jects, curves and surfaces, geometric constraints with mating rela- tionship in a mechanical assembly,physical contacts b etween ob jects, collision detection. It turns out that p erforming many of the geometric op erations on the solid b oundaries or interacting with geometric constraints is reduced to nding common solutions of the p oly- nomial equations. Current algorithms in the literature based on symb olic, numeric and geometric metho ds su er from robustness, accuracy or eciency problems or are limited to a class of problems only. In this pap er we present algorithms based on multip olynomial resultants and matrix computations for solving p olynomial systems. These algorithms are based on the linear algebra formulation of resultants of equations and in many cases there is an elegant re- lationship b etween the matrix structures and the geometric formulation. The resulting algorithm involves singular value decomp ositions, eigendecomp ositions, Gauss elimination etc. In the context of oating p oint computation their numerical accuracy is well under- stood. We also present techniques to make use of the structure of the matrices to improve the p erformance of the resulting algorithm and highlight the p erformance of the algorithms on di erent examples. 1 Supp orted in part by a Junior FacultyAward and DARPA Contract DAEA 18-90-C-0044 1 Intro duction Geometric and solid mo deling deal with issues of representation and manipulation of phys- ical ob jects. These elds have received much attention throughout the industrial and academic communities for more than three decades. Most of the current formulations of geometric ob jects curves and surfaces are in terms of p olynomial equations and in many application like b oundary computations, the problems are reduced to manipulating a p olynomial systems. Polynomial equations are used for representing semi-algebraic sets. The imp ortance of semi-algebraic sets has b een established in many other applications of geometric computation b esides b oundary representations. For example, the geometric constraints asso ciated with kinematic relationships in a mechanical assembly comp osed of prismatic and revolute joints de ne semi algebraic sets. Other applications include the representations of voronoi diagrams of set-theoretic mo dels [1], formulation of con gura- tion space of a rob ot in motion planning applications [2] etc. A fundamental problem in these geometric computations is that solving systems of p olynomial equations. In particu- lar, the problems of curveintersection, ray tracing curves and surfaces, inverse kinematics of serial or parallel mechanisms, collision detection, computing the distance from a p oint to a curve, nding a p oint on the bisector b etween two curves or a p oint equidistant from three curves and solving geometric constraint systems are reduced to nding ro ots of non- linear p olynomial equations [3, 4, 1]. The need for solving algebraic equations also arises in surface intersection algorithms, for nding starting p oints on each comp onent and lo cat- ing singularities [5, 6 ], manipulating o set curves and surfaces [7] and geometric theorem proving [5]. Most of these problems have b een extensively studied in the literature. The currently known techniques for solving non-linear p olynomial systems can b e classi- ed into symb olic, numeric and geometric metho ds. Symb olic metho ds based on resultants and Gr}obner bases algorithm can b e used for eliminating variables and thereby reducing the problem to nding ro ots of univariate p olynomials. These metho ds have their ro ots in algebraic geometry.However, the current algorithms and implementations are ecient for sets of low degree p olynomial systems consisting of up to three to four p olynomials only. The ma jor problem arises from the fact that computing ro ots of a univariate p oly- nomial can b e ill{conditioned for p olynomials of degree greater than 14 or 15, as shown by Wilkinson [8]. As a result, it is dicult to implement these algebraic metho ds using nite precision arithmetic and that slows down the resulting algorithm. As far as the use of algebraic metho ds in geometric and solid mo deling is concerned, the current viewp ointis that they have led to b etter theoretical understanding of the problems, but their practical impact is unclear [7, 9]. The numeric metho ds for solving p olynomial equations can b e classi ed into iterative metho ds and homotopy metho ds. Iterative techniques, like the Newton's metho d, are go o d for lo cal analysis only and work well if we are given go o d initial guess to each so- 1 lution. This is rather dicult for applications likeintersections or geometric constraint systems. Homotopy metho ds based on continuation techniques have a go o d theoretical background and pro ceed by following paths in the complex space. In theory, each path converges to a geometrically isolated solution. They have b een implemented and applied toavariety of applications [10]. In practice the current implementations have many prob- lems. The di erent paths b eing followed may not b e geometrically isolated and thereby causing problems with the robustness of the approach. Moreover, continuation metho ds are considered to b e computationally very demanding and at the moment restricted to solving dense p olynomial systems only. Recently, metho ds based on interval arithmetic have received a great deal of attention in computer graphics and geometric mo deling. The resulting algorithms are robust, though their convergence can b e relatively slow. For some particular applications, algorithms have b een develop ed using the geometric formulation of the problem. This includes sub division based algorithms for curves and surface intersection, ray tracing. In the general case sub division algorithms have limited applications and their convergence is slow. Their convergence has b een improved byB ezier clipping [11]. However, for low degree curveintersections algebraic metho ds have b een found to b e the fastest in practice. Similarly algorithms based on the geometric prop erties of mechanismshave b een develop ed for a class of kinematics problems, constraint systems and motion planning problems. In this pap er we present an algorithm for nding ro ots of p olynomial equations and demonstrate its p erformance on a numb er of applications. The algorithm uses resultants to eliminate variables from a system of p olynomial equations. The resultant formulations linearize a non-linear p olynomial system and the resultant, therefore, can b e expressed in terms of matrices and determinants. In particular, we show that the resultant of a system of p olynomial equations corresp onds to the determinantofa matrix polynomial and the problem of nding its ro ots can b e reduced to an eigenvalue problem or a generalized eigenvalue of a matrix p encil. There is an elegant relationship b etween the kernels of these matrix p olynomials and the variables b eing eliminated, which is b eing used for computing the rest of the variables and birational maps. We consider algorithms for sparse as well as dense p olynomial systems and illustrate them on the problems of curve and surface intersections, nding distance from a p oint to the curve, birational maps and geometric constraint systems. Later on we make use of the sparsity of the matrices to improve the p erformance of the algorithm. The resulting algorithms are robust in nature and their numerical accuracy is well understo o d. For most of the linear algebra problems, backward stable algorithms are known. This is in contrast with nding ro ots of high degree univariate p olynomials. Furthermore, ecient implementations of backward stable routines are available as part of LAPACK [12] and we used them in our applications. The rest of the pap er is organized in the following manner. In Section 2 we review the 2 results from elimination theory.We consider sparse as well as dense p olynomial systems. In Section 3, we brie y review some of the techniques from linear algebra and matrix computations used in the pap er. In Section 4 we showhow the resultants of p olynomial systems can b e expressed in terms of matrix p olynomials. Furthermore, there is a direct relationship b etween the variables b eing eliminated and the kernels of the matrix p oly- nomials. In Section 5 we illustrate the algorithm on intersection of curves and surfaces, nding distance of a p oint to a curve or a surface, representation of birational maps and geometric constraint systems. In Section 6 we discuss the p erformance and limitations of the current algorithm and highlight future directions for p erformance improvement and nally in Section 7 we conclude the pap er. 2 Background A semi-algebraic set is obtained by a nite numb er of Bo olean set op erations union, inter- section, di erence applied to half spaces de ned by algebraic inequalities. These sets are used to de ne solids and their b oundaries consist of zero, one and two dimensional algebraic sets in 3-space. Algebraic sets are de ned as common zeros of a system of p olynomial equations. Common examples of b oundary sets include parametric curves and surfaces de- ned byB ezier and B-spline formulations. For many op erations likeintersections, o sets and blends on these b oundary sets, the resulting algorithms involve computing common ro ots of p olynomial equations.