Lecture Notes Series on Computing Vol. 11
editors
Falai Chen Dongming Wang
lacuivic i mi— I_I-JIVII—I_I i r\ 1IUIV
LECTURE NOTES SERIES ON COMPUTING Editor-in-Chief: D T Lee {Northwestern Univ., USA)
Published Vol. 1:
Computing in Euclidean Geometry Eds. D-Z Du&F Hwang
Vol. 2:
Algorithmic Aspects of VLSI Layout Eds. DTLee&M Sarrafzadeh
Vol. 3:
String Searching Algorithms G A Stephen
Vol. 4:
Computing in Euclidean Geometry (Second Edition) Eds. D-Z Du&F Hwang
Vol. 5:
Proceedings of the Conference on Parallel Symbolic Computation — PASCO '94 Ed. H Hong
Vol. 6:
VLSI Physical Design Automation: Theory and Practice S M Sait & H Youssef
Vol. 7:
Algorithms: Design Techniques and Analysis Ed. M H Alsuwaiyel
Vol. 8:
Computer Mathematics Proceedings of the Fourth Asian Symposium (ASCM 2000) Eds. X-S Gao & D Wang
Vol. 9:
Computer Mathematics Proceedings of the Fifth Asian Symposium (ASCM 2001) Eds. K Yokoyama & K Shirayanagi
Vol.10:
Computer Mathematics Proceedings of the Sixth Asian Symposium (ASCM 2003) Eds.ZLi& WSit
l i i i J lliiiii liiiiiiiiip 1 W 1 d i
I
1 m 1
LJIWII—'LJ i A i ILJIIH ^pPSfflSfflWfflflfflB^
SHE!
^SSHCT
«ral
SHSB
^saBSBSSaBB^JBS*"
BBSS
JS»
^BBSft.
SS88
88889
'^8888SiB888^iMi»8iB^
8KSS
'g&ss&SSft
editors
Falai Chen University of Science and Technology of China, China
Dongming Wang Universite Pierre et Marie Curie - • CNRS, France
l|jp World Scientific NEW JERSEY * LONDON • SINGAPORE * BEIJING • SHANGHAI • HONG KONG • TAIPEI • CHENNAI
Published by World Scientific Publishing Co. Pte. Ltd. 5 Toh Tuck Link, Singapore 596224 USA office: Suite 202,1060 Main Stteet, River Edge, NJ 07661 UK office: 57 Shelton Street, Covent Garden, London WC2H 9HE
British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library.
GEOMETRIC COMPUTATION Copyright © 2004 by World Scientific Publishing Co. Pte. Ltd. All rights reserved. This book, or parts thereof, may not be reproduced in any form or by any means, electronic or mechanical, including photocopying, recording or any information storage and retrieval system now known or to be invented, without written permission from the Publisher.
For photocopying of material in this volume, please pay a copying fee through the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, USA. In this case permission to photocopy is not required from the publisher.
ISBN 981-238-799-4
Editor: Tjan Kwang Wei
Printed in Singapore.
PREFACE
Algebraic methods have remarkable applications in the areas of automated geometric reasoning, computer aided geometric design and modeling, and computer graphics. These methods have been developed mostly in the area of computer algebra. The interaction between algebraic computation and the above-mentioned areas of modern engineering geometry has existed for several decades, yet in a loose form. To facilitate this interaction, an informal Seminar on Geometric Computation was held in Hefei, China in April 2002 (see http://www-calfor.lip6.fr/~wang/SGC2002). It brought together active researchers working on different subjects to survey their work, to present their ideas, views and recent results, and to discuss future development and cooperation. The seminar was very successful and it had attracted over 50 participants. The interest of the audience in the seminar talks motivated our attempt in collecting the presented papers and other relevant work in a coherent volume. The idea of compiling this volume for formal publication was supported enthusiastically by most of the speakers and several other distinguished researchers who were invited to the seminar but were not able to make their trip. The authors were encouraged to prepare their articles in two categories: tutorial surveys and original research papers. All the submissions underwent a careful review-revision process, and it is hoped that this book, with 14 chapters coming out of these submissions, has reached the usual standard of formally reviewed volumes. The book comprises three closely related parts: the first is devoted mainly to curve and surface modeling, and it contains a general survey on theoretical and practical applications of algebraic methods and three specialized surveys on surface blending, parametrization, and implicitization, followed by four research papers. The second part is concentrated on geometric reasoning, with one tutorial survey on Clifford algebra approaches, another on automated deduction in real geometry, and one research article. The last part is highlighted by a chapter that outlines a theory of real ap-
VI
Preface
proximation, based on a generalization of the central idea of exact geometric computation. The book ends with one paper on ^.-resultant quotients and another on face recognition, which show how computer algebra and artificial intelligence meet geometry in the era of computation. The contents of the book, though fundamental and focused, cross three major areas of research: symbolic and algebraic computation, automated reasoning, and computer aided geometric design. They are also related to numerical and scientific computing, computer aided design, and computer graphics. The design and graphic aspects of the book may even extend its readership to the industry of geometric engineering. We hope that this book will offer the reader a valuable source of reference and an easy access to the intersection of these highly relevant disciplines. The editors wish to thank all the authors for their valuable contributions and the referees for their timely help. We acknowledge the generous support provided by the Department of Mathematics, University of Science and Technology of China for the above-mentioned seminar.
Hefei and Paris September 2003
Falai Chen Dongming Wang
CONTENTS
Preface
v
1 Algebraic M e t h o d s in C o m p u t e r Aided G e o m e t r i c Design: Theoretical a n d P r a c t i c a l Applications Laureano Gonzalez-Vega, Ioana Necula, Sonia Juana Sendra, and J. Rafael Sendra
Perez-Diaz,
2 C o n s t r u c t i n g Piecewise Algebraic Blending Surfaces Yuyu Feng, Falai Chen, Jiansong and Xing Tang
Deng, Changsong
Gonzalez-Vega,
Ioana Necula, and Jaime
Hongxin Zhang and Guojin
191
Wang
8 Meshless M e t h o d for N u m e r i c a l Solution of P D E Using H e r m i t i a n I n t e r p o l a t i o n w i t h Radial Basis Wu and Jianping
177
Puig-Pey
7 Analytical P r o p e r t i e s of Semi-Stationary Subdivision Schemes
Zongmin
156
Wang
6 D e t e r m i n i n g t h e Intersection C u r v e of Two 3D Implicit Surfaces by Using Differential G e o m e t r y a n d Algebraic Techniques Laureano
126
Kotsireas
5 Implicitization a n d Offsetting via R e g u l a r S y s t e m s Dongming
65
Sendra
4 P a n o r a m a of M e t h o d s for Exact Implicitization of Algebraic Curves a n d Surfaces Bias S.
34
Chen,
3 R a t i o n a l Curves a n d Surfaces: A l g o r i t h m s a n d Some Applications J. Rafael
1
Liu VI1
209
Contents
Vlll
9 Clifford Algebras in Geometric Computation Hongbo Li 10 Automated Deduction in Real Geometry Lu Yang and Bican Xia 11 Automated Derivation of Unknown Relations and Determination of Geometric Loci Yong-Bin Li 12 On Guaranteed Accuracy Computation Chee K. Yap
221 248
299 322
13 Dixon ^4-Resultant Quotients for 6-Point Isosceles Triangular Corner Cutting Mao-Ching Foo and Eng-Wee Chionh
374
14 Face Recognition Using Hidden Markov Models and Artificial Neural Network Techniques Zongying Ou and Bindang Xue
396
Index
407
List of Authors
413
CHAPTER 1 ALGEBRAIC M E T H O D S IN C O M P U T E R AIDED GEOMETRIC DESIGN: THEORETICAL A N D PRACTICAL APPLICATIONS Laureano Gonzalez-Vega*, Ioana Necula*, Sonia Perez-Diaz*, Juana Sendra*, and J. Rafael Sendra' * Universidad de Cantabria, Dpto. de Matemdticas, Estad. y Comput., Spain + Universidad Carlos III, Departamento de Matemdticas, Spain ' Universidad de Alcald, Departamento de Matemdticas, Spain E-mail: {gonzalezl,neculai} Qunican.es,
[email protected], {rajael. sendra, sonia. perez} Quah.es
In this chapter, we show how to adapt algebraic techniques to deal with some problems, such as implicitization or parameterization, in computer aided geometric design that involve floating-point real numbers. In addition, applications to the offsetting and blending problems are also considered.
1. I n t r o d u c t i o n T h e usefulness of computer aided design and computer aided modeling ( C A D / C A M ) systems as a means of increasing t h e efficiency of t h e design process is nowadays uncontested. Advantages such as • reduction of lead times, • quality improvements, and • cost reduction by saving time spent for implementing engineering changes in the design process are often cited as the major benefits resulting from the introduction of specialized software for C A D / C A M . From a mathematical point of view almost all the C A D / C A M problems are related to the manipulation of geometric objects, mainly curves, surfaces and their combinations, in two or three-dimensional space. Since these geometric objects may be represented implicitly or parametrically through polynomials or rational functions, it is clear t h a t computer aided geometric design (CAGD) must intersect coml
2
Gonzalez-Vega
et al.
puter algebra, algebraic geometry, and real algebraic geometry. In this chapter, we briefly survey some results and techniques from these related areas for symbolic and symbolic-numeric manipulation of curves and surfaces and discuss their applications in CAGD. Since some chapters 48 ' 61 of this volume are devoted to symbolic algorithms for curves and surfaces, our discussions will be focused mainly on the approximate version of the problems as well as their applications. More precisely, we will address • implicitization and parametrization problems in the case when approximate objects are under consideration, • applications such as computing with implicit curves, offsetting and blending in CAGD, and • some examples on the practical performance of algebraic techniques in CAGD. For a complete and comprehensive introduction to CAGD, the reader is referred to the first few chapters in the book 23 by Farin and others. 2. Implicitization and Parametrization Problems Algebraic curves and surfaces, especially rational curves and surfaces, are the main geometric objects in CAGD. In many practical applications parametric representation of varieties are used, 5 ' 6,41 ' 46 but in some situations the availability of implicit equations is required or even an implicit equation may be produced as output of a geometric operation since the new geometric object does not necessarily have a parametric representation. These facts have motivated the emergence of a research area devoted to the construction of conversion algorithms, namely parametrization and implicitization algorithms, 6 ' 42,48 ' 61 for algebraic varieties. This section is devoted to analyzing the problem of adapting symbolic and algebraic algorithms of implicitization and parameterization for the (more real) case where the involved coefficients of polynomials are floatingpoint real numbers. For a description of different ways of dealing with the implicitization problem in the case of exact coefficients (using Grobner bases, resultants, moving curves and surfaces, etc.), see Chapter 4 in this volume 48 or the paper 59 by Sederberg. Similarly, for a description of symbolic parametrization algorithms see Chapter 3 in this volume. 61 2.1. Implicitization:
Exact versus
Approximate
One of the main problems arising in the manipulation of curves and surfaces in CAGD consists in finding efficient algorithms for computing the implicit
3
Using Algebraic Methods in CAGD
equations of curves and surfaces parametrized by rational functions (see for example the books 14 ' 15 by Cox and others, or Chapters 5 and 7 in the book 41 by Hoffmann). This is due, for example, to the fact that for tracing the considered curve or surface the parametric representation is the most convenient, while for determining in an efficient way the position of a point on the curve or surface, the implicit equation is desired. The implicitization problem for hypersurfaces (curves in the real plane or surfaces in the three-dimensional real space for real applications) parametrized in a rational way can be stated in the following terms: let V be a hypersurface in E™ (n = 2 or n — 3 in real applications) parametrized by Xi =
fi(ti,...
,i„-i)
.
~u
7
«e{l,...,n},
gi(ti,...
v
.
,
,tn-i)
where fi and gi belong to K[ti,... , tn-i] with gcd(/j, gi) = 1. The implicitization problem for V consists in finding a non-zero element lZv{x\,... , xn) in E[xi, • • • , xn] with the smallest possible total degree such that ^
f fl(h,-
• - ,tn-i)
\gi(t\,
• • • ,tn-i)'
fn(h,
• • • ;*w-l)\ _ Q
' gn(ti,...
,tn-\) J
More general formulations of the implicitization problem for arbitrary parametric varieties can be found in the papers by Alonso et al.,1 Canny and Manocha, 9 Chionh, 11 Gao and Chou, 30 Gonzalez-Vega,34 and Kalkbrener. 47 The implicitization problem can be seen as a problem in elimination theory and therefore it can be approached by elimination techniques such as Grobner bases and characteristic sets. Nevertheless, alternative methods can be applied. Next example, extracted from the paper 34 by the first author, shows a non-standard way of computing the implicit equation of a rational surface avoiding the use of Grobner bases or resultants (i.e., determinants of polynomial matrices). In fact, it can be viewed as a way of computing the corresponding determinant by computing the traces of the powers of the considered matrix. Example 1: The parametric equations of a bicubic surface B are x(u, v) = 3v(v - l)2 + (u- l)3 + 3u, y(u, v) = 3u(u - 1 ) 2 +v3 + 3w, z(u, v) = -Zu(u2 -5u + 5)«3 - 3(u3 + 6u2 -9u+ + v(6u3 + 9u2 - 18u + 3) - 3u{u - 1).
l)v2
4
Gonzalez-Vega
et al.
We look for an implicit equation HB for B. The first two equations, denoted by Hi and H2 (and the third one will be denoted by Hz), do not have the desired structure in order to apply the ad-hoc technique presented in the paper 34 by the first author, but an easy linear combination of them, namely -Hi + 3H2 , 3v2 15M 2 3V 3U 3y x 1 3 Fl = ; =U + —4 — + -4r + — - ^ - + ~ + 7T, 8 3Fi - H2 * 9v2 3u2 3v 15u y 3x i 3„3 F2 = — =v - —4 — + -T + — + 8 4 gives a good shape for the polynomial system to be dealt with. This means that any polynomial in Q[x, y][u, v] can be written in a unique way modulo Fi and F2 as a Q[a;,j/]-linear combination of monomials u V (the so-called normal form modulo i*\ and F2) with total degree strictly smaller than 3. In this particular case the equation "HB has the following structure: 9
nB(x,y,z)
= z9 + Yiri(x,y)z9-i=
J]
«=1
Fi(A)=0,F 2 (A)=0
{z-H3(A)),
(1)
where A represents a zero of the system Fi = 0, F2 = 0 with coordinates in the algebraic closure of Q(x,y). The computation of the ri(x,y) is performed by computing the Newton sums of order 9, Sk(x,y) (k € { 1 , . . . ,9}), for the equation (1):
Sk(x,y)=
Yl
(#3(A))*.
Fi(A)=0,F 2 (A)=0
For that, the Jacobian determinant of Fi and F2 is first computed: / N „ 2 2 2 7 2 9 2 45 2 „ 9 9 2 9 9 Jaciu, B = w u vu H—u v u + lavu — - u H—v v . y ' ' 2 4 4 4 8 2 8 Denote by £ij (0 < i,j < 2) the coefficient of u2v2 in the normal form of the polynomial u V J a c modulo F\ and F2; then every Sk(x,y) is determined by the following expression: T
2 i,j=0
where the c\, are the coefficients of the normal form of _H"f with respect to F\ and F2: (H3(s,t))k=
2
^ c g ^ V i,j=0
mod .
Using Algebraic Methods in CAGD
5
Finally the desired result is obtained by using the classical Newton identities of the univariate case. The first two coefficients in %B{x1y, z) are 233469a;
, , r 2 (x,y) -
20972672709381a: 17975329363179?/ + 536870912 536870912
204g
188595?/ _ 112832595 262144 2Q4g
81a;2 64~ +
_ ri[x,y) -
+
_
135x2/ 32
81j/2 64~'
729y4 729a;4 8192 ~ "8192"
1215a;3;/ 1215a;?/3 41Q5971x3 3129597j/3 + + 2048 2048 65536 65536 2 2 14456151a; ;/ _ 13181049xy 48101467761a:;/ + + 65536 65536 8388608 2 _ 38812918311?/ _ 22656991982391171 _ 1 /233469a; 16777216 137438953472 2 V 2048 +
+
112832595 262144 233469x 2048
_ ^1^] 64 J
+
+
81a;2 __ 188595?/ ~~64 2048 188595;/ 135_a^/ 2048 " + ~32
135xy 3T~ 81y2 64
V _ 54187594407a;2 4096 16777216
+
Sly2 ~64~ 112832595 262144
4779a;
+
"''
The computing time was less than 5 seconds by using Maple 9 on a PowerPC G4 dual processor at 1MHz (the implicitization time for the previous bicubic spline was 1500 seconds by using Grobner bases; see the book 41 by Hoffmann). The size of the file containing the full implicit equation of B is around 600 Kb. It is important to mention that, in many cases, computer algebra packages can hardly verify the obtained result by substituting the parametric equations of B into the computed implicit equation and obtaining 0 as result. However, since the parametric equations are available, it is very easy to verify that several hundreds of points randomly generated on B satisfy the computed implicit equation. Other problems with a similar formulation to the implicitization problem described above, and where the solution is obtained by eliminating some variables from the initial equations, are listed below (see the book by Hoffmann41). • Computation of offset curves and surfaces. • Computation of constant-radius blending surfaces. • Computation of the convolution of two plane curves or surfaces.
6
Gonzalez-Vega
et al.
• Computation of the common tangent of two plane curves. • Computation of the inversion formula for parametric surfaces. These geometrical operations are often used for generating the boundary of configuration space obstacles, in order to construct collision-free motion paths for translating objects. Two main difficulties are encountered when one uses the usual elimination techniques (resultants, Grobner bases, triangular sets, etc.) offered by computer algebra to deal with the variable elimination problems mentioned above. For example the implicitization of a rational surface defined by
_ X(u,v) ~ W(u,v)'
X
_ Y(u,v) ~ W{u,vY
V
_ Z
~
Z(u,v) W{u,v)
appearing in a real-world problem is difficult to achieve by directly applying resultants or Grobner bases because, first, it is usually a very costly algebraic operation (due mainly to the sizes of the intermediate coefficients or the size of the involved matrices) and, second, the coefficients of the polynomials in the parametrization are usually floating-point real numbers (not allowing the use of Grobner bases, for example, or producing stability or robustness problems in the computation of the determinant of a polynomial matrix). These difficulties can be currently overcome in practice for some particular (mainly low degree) cases in two different ways. • By using multivariate resultants (see the paper by Canny and Manocha 9 ), the implicit equation is described as a non-evaluated determinant. Then any question about the considered surface, requiring the implicit equation, is reduced to a Numerical Linear Algebra question over such a matrix (usually an eigenvalue problem). • By taking into account that, in general, a concrete object to be modeled is made by several hundreds (or thousands) of small patches, all of them sharing the same algebraic structure. For such an object a database is constructed containing the implicit equation of every class of patch appearing in its definition. This database must also contains the inversion formulae (providing the parameters in terms of the Cartesian coordinates) and must be pruned to avoid specialization problems. Moreover the database for a specific object is kept into a bigger and general database for further use (see the paper 19 by Espinola and others). For this reason, a first option for the study of numeric implicitization algorithms is the precomputation of the implicit representation of the alge-
7
Using Algebraic Methods in CAGD
braic models of the patches, defined in a generic way by means of parameters. This approach, called "generic implicitization", generates databases which allow a quickly problem solving. For instance, the implicit equation of the parametric surface of the form x = a\v2 + a2v,
y = bin2 + b2,
z = c\uv + c2u + c3v
(2)
is cfx2y2 - 2c\a1blxyz2 + b\a\zl + {-2c\b2 - 2c\bxc\)x2y + {2c\c2a2 — 2c\c\ai)xy2 + (2bicfc3a2 — &cibiaic2c-s)xyz + (2claibib2 - 2a\c\b\)xz2 + (2bic1a2aic2 - 2b\a\c\ - bic\al)yz2 + 2a1a2b\c2,zz + {c\b\ + 2c\b2c\bx + clb\)x2 + (4cf C2&2fli - 2c 2 cia 2 6ic| - 2b\a\c\