An implicitization algorithm with fewer variables

An implicitization algorithm with fewer variables

COMPUTER AIDED GEOMETRIC DESIGN ELSEVIER Computer Aided Geometric Design 12 (1995) 251-258 An implicitization algorithm with fewer variables C e s a...

300KB Sizes 4 Downloads 52 Views

COMPUTER AIDED GEOMETRIC DESIGN ELSEVIER

Computer Aided Geometric Design 12 (1995) 251-258

An implicitization algorithm with fewer variables C e s a r A l o n s o , J a i m e G u t i e r r e z *, T o m a s R e c i o ~ Departamento de Matemdticas, Estad[stica y Computaci6n, Universidad de Cantabria, Santander 39071, Spain Received January 1993; revised November 1993

Abstract

In this paper we present a general implicitization algorithm for rational parameterizations, using Gr6bner Bases, which: (i) is valid for general parametric varieties (i.e. allowing both rational or polynomial parameterizations), (ii) computes the greatest ideal of polynomials vanishing over the variety and (iii) uses only as many variables as the number of parameters plus coordinates. We give examples of the performance of our algorithm in the CoCoa system, comparing the obtained results with other algorithms. Keywords: Gr6bner bases; Parametric varieties; lmplicitization

1. I n t r o d u c t i o n

Let K be a field o f characteristic zero. Given the rational mapping: pl (tl . . . . . ta ) Xl

-

ql (& . . . . . ta)

pn( tl . . . . . ta ) ,

.

.

.

,Xn

--

qn(tl . . . . . td)

where ~oi = p i ( t l . . . . . t d ) / q i ( t l . . . . . td) are rational functions in K ( t l . . . . . ta), and let R be the image set R := {(q~l(bl . . . . . bd) . . . . . q~,(bj . . . . . b a ) ) C IK~ I b = (bl . . . . . ba) E IKa, q~i(tl . . . . . td) defined in b for all i = 1. . . . . n}.

The implicitization problem is finding a polynomial basis of the following ideal in K [ X j . . . . . Xn]: I = { f c K[X1 . . . . . X~] I f ( x l . . . . . x , ) = 0 for all (xl . . . . . xn) E R}, i.e., the ideal of all polynomials in IK[X1 . . . . . Xn] vanishing at every point o f R. * Corresponding author. Emaih [email protected].

1Partially supported by CICyT-PB 89/0379/C02/01 and EPRIT Bra-POSSO, 6846. 0167-8396/95/$09.50 (~) 1995 Elsevier Science B.V. All rights reserved S S D 1 0 1 6 7 - 8 3 9 6 ( 9 4 ) 0 0 0 1 1-G

252

C. Alonso et aL/Computer Aided Geometric Design 12 (1995) 251-258

It is well known that the set V of zeros of 1 is the smallest algebraic variety containing (perhaps properly) R. We note that in the above definitions the dimension of the variety V is not necessarily equal to the number of parameters d (see (Gao et al., 1991; Alonso et al., 1992)). We observe also that I agrees with the ideal Ker(6), where 8 is the ring homomorphism defined by ~ : K[Xl . . . . . Xn] --+ ]I((tl . . . . . td),

Xi--+

p i ( t l . . . . . td) qi(tl

.....

td)"

Algorithms for solving the implicitization problem must deal with two main steps: first, constructing some set of polynomials manipulating the given parameterization, and second, performing some elimination process on the selected set of polynomials. For instance, in the pioneer work of Buchberger (1987), the elimination is accomplished by computing a certain Gr6bner basis over the polynomial ring ]K[Xl . . . . . Xn, tl . . . . . td] ; and then the input for the Gr6bner basis computation is the collection of polynomials Xl

--

Pl (tl . . . . . td) . . . . . Xn -- p n ( t l . . . . . td)

(assuming the we are given a polynomial parameterization Xl = Pl ( t l . . . . . t d ) . . . . . Xn = Pn (tl . . . . . td) ). Thus it was required that no denominators were present in the parameterization for this method to work. Concerning elimination algorithms that have been applied in the implicitization problem we can mention resultant methods as in (Anderson et al., 1985) or in the recent works of Bajaj (1987) and Manocha and Canny (1992), mainly used for plane curves and surfaces; or improved Gr6bner basis computations as in the basis conversion approach of Hoffmann (1989, 1990); other elimination methods follow, for instance, Wu-Ritt ideas (see (Gao et al., 1991)). As is well known, all these methods have complexity heavily relying on the number of variables of the input set of polynomials; therefore reducing this number to a minimum is important for the practicality of any method. On the other hand, concerning this input collection of polynomials where the elimination is accomplished, we can mention a general approach for rational parameterizations, based on the classical Rabinowitsch trick, that requires to add one extra variable (to take care of denominators) besides the parameters tl . . . . . ta and coordinates XI . . . . . X,. (see (Kalkbrener, 1991 ) ). In that work, Kalkbrener presents another method avoiding the extra variable, but running only for varieties in three-dimensional space. Moreover here Kalkbrener does not claim to compute the greatest ideal vanishing over the variety V but just an ideal J such that V ( J ) = V i.e. an ideal whose zero set agrees with V. The same weaker objective appears in Cox et al.'s (1992) general treatment of the implicitization problem. In this short note we include an implicitization algorithm that gives the stronger solution for the implicitization problem, using only as many variables as parameters and coordinates, as our computations regard only algebraic objects in ]K[X1 . . . . . Xn, tl . . . . . td]. We must compute only one Gr6bner basis with respect to the lexicographic ordering to eliminate the parameters from a certain ideal (in fact this elimination step can be accomplished by any elimination method and we have used to run the examples the special and faster elimination ordering that is automatically set in the package CoCoa); moreover we must also compute some quotient ideals and we must decide if some of

C. AIonso et al./Computer Aided Geometric Design 12 (1995) 251-258

253

these are equal, but these computations can be done at the fastest possible ordering (i.e. leaving it to the machine decision). Bearing in mind the exponential complexity of elimination as a function of the number of variables, our procedure could be sometimes better than the ones involving one more variable, as in Rabinowitsch trick. We give examples where this latter method fails (running time more than 15 minutes), while our algorithm succeeds solving the implicitization problem in less than 3 minutes. Moreover one of these examples is not in three-dimensional space, and therefore Kalkbrener's implicit surface algorithm does not apply. In some examples in which the three considered algorithms can be applied, our method ran in a time similar to that of Kalkbrener, but Rabinowitsch's seems faster. In all cases, the computing times of the three algorithms are given with their performance in the package CoCoa 1.5 of Giovini and Niesi from the University of Genoa, on a Macintosh Classic II. The fact that the timings are, in all three methods, much shorter than those reported by Kalkbrener on an Apollo 4500 workstation under Maple 4.3, are probably due just to the excellent behaviour of CoCoa for computing Gr6bner bases.

2. The algorithm We: start recalling the strong implicitization problem for general parametric varieties.

Implicitization Problem. Input: Rational functions

p~(t~ . . . . .

td)

ql ( tl . . . . .

td) . . . . .

X I --

x,,

-

pn(tl .....

td)

q~(tl . . . . .

td)

where Pl . . . . . p. C K [ t l . . . . . td ], ql . . . . . q~ ¢ N [ tl . . . . . Output: The prime ideal I ={fE

K[X1 . . . . . Xn]

I f(q~l . . . . .

td ] -- {0}.

~o~) =0}.

Implicitization Algorithm. Let J be the ideal of ]K[X1 . . . . .

Xn, tl . . . . . td] generated by (qIX1 -- Pl . . . . . qnXn - Pn) and q the least common multiple of the polynomials ql . . . . .

qn.

Algorithm

If J = ( J : ( q ) l ) Then J A IN[X1 . . . . . Xn] = I Else i := 1 If ( J : ( q ) i ) = ( j : (q)i+l) Then ( J : ( q ) i ) A K [ X I . . . . . Else repeat with i := i + 1

Xn] = I

C. Alonso et al./Computer Aided Geometric Design 12 (1995) 251-258

254

Proof of correctness. The proof is based on the following five facts: (i) I is contained in ( J : ( q ) m ) for some positive integer number m. (ii) ( J : ( q ) S ) n ]K[X1 . . . . . X,] is contained in I, for all positive integer numbers S.

(iii) ( J : ( q ) m ) n K[X1 . . . . . X,,] = I . (iv) We have the following chain of ideals: ( J : ( q ) J ) C . . . C ( J : (q)r) C ( J : ( q ) r + l ) (v) If ( J : (q)r) = ( j : ( q ) r + l ) ( j : (q)r) n K[X 1

. . . . .

C ....

then Xn] = I.

Proofs o f these facts:

(i) Let f ( X l . . . . . X . ) C I then f ( P l / q l . . . . . p ~ / q . ) = 0. Dividing successively by Xi - P i / q i 1 <<. i <. n, we obtain that

f 6

(

in IK(tl . . . . . t n ) [ X l . . . . . Xn].

X1 - p.__~_l. . . . . Xn ql

Moreover we note that the coefficients in the divisions (after Ruffini's rule) are in 1K[pl/ql . . . . . Pn/qn]. So multiplying times a convenient power m of q, we have that q m f E J. Hence f E ( J : qm). (ii) If h ( X l . . . . . Xn) E ( J : ( q ) S ) N K [ X I . . . . . Xn] then we have hq s C J and h ( p l / q l . . . . . p n / q n ) q s = 0 , so h ( p l / q l . . . . . P , / q n ) = 0 and h E I. (iii) Trivial by (i) and (ii). (iv) Let h ( X1 . . . . . Xn ) E ( J : ( q ) r ) ( r >~ 1), then hq r C J. Thus hq r+ l = ( hqr ) q E J and, therefore h E ( J : (q)r+l). (v) First we will see that if ( J : ( q ) r ) = ( j : ( q ) r + l ) , then ( J : (q)~) = ( J : (q)S) for all s > r. Suppose s = r + 2 . Then ( J : ( q ) r ) = ( j : (q)~+l) C_ ( J : (q)r+2). NOW let h ( X l . . . . . Xn) E ( J : (q)r+2). Then hq ~+2 C J, so ( h q ) q r+l E J; hence hq E ( J : ( q ) r + l ) = ( j : ( q ) r ) and therefore ( h q ) q r = hq ~+1 E J, so finally h C ( J : (q)~+l). For a general s, by induction, we can conclude that:

( j : (q)r) = ( j : Hence by ( i ) ( J :

(q)r+l)

.....

(j:

(q)s-l)

(q)r) N I K [ X 1 . . . . . Xn ] = ( j :

= (j:

(q)S) . . . .

(q)m) N K [ X 1 . . . . . Xn] = I .

[]

3. Examples In this section we show examples of the performance of our algorithm in the CoCoa system and comparing the obtained results with Kalkbrener's and Rabinowitsch's.

C. Alonso et al./Computer Aided Geometric Design 12 (1995) 251-258

t 2- 2st - 1 X =

-

-

t2+ i

V=

2t + s{t2. I) t2~- 1

y Z=

S

Fig. 1. E x a m p l e 1. See Fig. 1. Implicitization A l g o r i t h m J = I d e a l ( x ( t 2 + l ) - t 2 + 2st + 1, y ( t 2 + 1 ) - 2t - s ( t 2 - 1 ), z - s) M = J : Ideal ( t 2 + 1 ) Is(M = J) False N = J : I d e a l ( ( t 2 + 1) 2 )

Is(N = M) True E l i m ( t . . s , M ) ( w i t h t > s > x > y > z) Ideal ( x 2 + y2 _ z 2 _ 1 ) T h e n the implicit equation of the surface is: x 2 + y2

_

Z 2 _

1.

E x a m p l e 2. See Fig. 2. Implicitization A l g o r i t h m J = I d e a l ( x ( 1 -+- t 2) ( 1 -t- u 2) - (3 + t 2) ( 1 - u2), y( 1 + t 2) ( 1 + u 2) - (3 + t2)2u,

z ( 1 + t 2) - 2t) M = J : Ideal((1 + t2)(l +u2)) Is(M = J) False N=J:Ideal((1 +tz)2(l+u2) 2) Is(N = M) True Elim(t..u,M) (t > u > x > y > z) I d e a l ( x 4 + 2x2yZ + 2x2z2 _ 10x 2 + y4 + 2y2z 2 _ lOy2 + z4 + 6z2 + 9)

255

256

C. Alonso et al./Computer Aided Geometric Design 12 (1995) 251-258

x= (3 + t2)(t-~t2) (1 + t2}{1 + at2}

L

(3 + t2]2u Y= (1 + t2)(1 + ~t2} 7

-

-

-

2t~ tg}

-

(1 +

X Fig. 2. The implicit equation is: x 4 + 2 x 2 y 2 + 2 x 2 z 2 _ 10x 2 + y4 + 2y2z 2 _ 10y2 + z 4 + 6z 2 + 9.

Example 3. u+2t 4-1 x =

t2u + l

u--t--2

'

Y-

J=Ideal(x(u-t-2)-u-2t M = J : Ideal(tu(u

t

1 '

Z=--.tu

4+l,yt-t2u-l,ztu-1)

- t - 2))

Is(M = J) True Elim(t..u,J) (t > u > x > y > z) I d e a l ( x y S z 5 - 2 x y 4 z 6 _ y S z 5 _ x y 3 z 6 + y 4 z 6 _ 5 x y 4 z 4 + 8 x y 3 z 5 + 5y4z 4 + 3 x y 2 z 5 _ 4y3z 5 + l O x y 3 z 3 -

1 2 x y 2 z 4 - 10y3z 3 - 3 x y z 4 + 6y2z 4 - 2z 6 - l O x y 2 z 2 + 8 x y z 3 + 10y2z 2 + x z 3 - 4 y z 3 + 5 x y z - 2 x z 2 - 5 y z +Z2--x+I).

E x a m p l e 4. u+2t 4x-

1

u--r--2

'

y-

J=Ideal(x(u-r-2)-u-2t M = J: Ideal(rtu(u

Is(M = J) True Elim(u..t,J)

t2u+l - - , r

1 Z = --, tu

4+l,yr-t2u-l,ztu-l,v-rt)

- r-2))

( u > r > t > x > y > z > v)

v=rt.

C. Alonso et al./Computer Aided Geometric Design 12 (1995) 251-258

257

I d e a l ( y 5 z 7 t : 5 ÷ 2 x y 3 z 5 v 3 q- 4 x y 2 z 6 v 2 ÷ e S x y 2 z 5 v 3 _ y 3 z 5 v 3 q- x y z 7 v -± ~5 x y z 6v2 - 2 y 2 z 6 u 2 _t ~1 x z 7 v - ~1y z 7 v - 75 x y 2 z 4 v 2 - ~5 x y z 5 c, _~_ 75 Y 2Z4U2 -- 7l X Z 6 ÷ X2 y Z3U_t_ 75 y z 5 U --t- gZ 1 6 -t- - ~l X 2 Z 3 U --- X y~."3V -- ~X 1 2 Z 2 C2 -

Other

¼xz3v + ¼yz3v - lx2z2 + ½x2zc + ¼xz 2 - ½ x z v - lx2 - ¼z 2

examples. 1

(i)

x-

Implicit equation:

u2

-

l+u2,

2u

y-

l+u2,

z=t.

x 2 + y2 _ 1. 2u

(ii)

x-

Implicit equation:

2ut

l+u2+t2,

y-

x-

Implicit equation:

2,

z-

u 2 - t2 -

1

l+u2+t

2

x 2 ÷ y2 + z 2 _ 1. t2 - u 2

(iii)

l+u2+t

- - , u

xyz

t2 - u 2

y-

t

1

,

z =

t-u

- x - y.

Running time of all examples in seconds. Examples

Rabinowitsch

Kalkbrener

The Algorithm

1 2 3 4 (i) (ii) (iii)

1.82 13.14 >> 900 >> 900 0.60 2.03 0.83

4.27 11.54 21.87 Does not work 1.46 5.54 3.78

7.04 35.96 29.28 170.29 1.33 4.29 2.69

References Anderson, D., Goldman, R. and Sederberg, T. (1985), Implicit representation of parametric curves and surfaces, Comput. Vision Graph. Image Process. 28, 72-85. Alonso, C., Gutierrez, J. and Recio, T. (1992), Algorithms for the simplification of the rational function field of parametric curves, Technical Report, Departamento de Matem~iticas. Universidad de Cantabria, Santander. Bajaj, C. (1987), Algorithmic implicitization of algebraic curves and surfaces, Computer Science Technical Report, Purdue University, West Lafayette, IN. Buchberger, B. (1987), Applications of Grrbner Bases in Nonlinear Computational Geometry, in: Proc. Workshop on Scientific Software, IMA, Minneapolis, MN, Springer, Berlin, 59-88. Cox, D., Little, .1. and O'Shea, D. (1992), Ideals, Varieties and Algorithms, Undergraduate Texts in Mathematics, Springer, Berlin. Gao, X.-S., Chou, S.Ch. and Li, Z.M. ( 1991 ), Computation with rational parametric equations, MM Research Preprints 6, 56-78.

258

C. Alonso et al./Computer Aided Geometric Design 12 (1995) 251-258

Hoffmann, C.M. (1989), Geometric and Solid Modeling, Morgan Kaufmann, San Mateo, CA. Hoffman, C.M. (1990): Algebraic and numerical techniques for offsets and blends, in: Michelli, S., Gasca, M. and Dahmen, W., eds., Computations of Curves and Surfaces, Kluwer, Dordrecht, 499-528. Kalkbrener, M. ( 1991 ), Implicitization of rational parametric curves and surfaces, in: Proc. AAECC-8 (1990), Lecture Notes in Computer Science, Vol. 508, Springer, Berlin, 249-259. Manocha, D. and Canny, J.F. (1992), Implicit representation of rational parametric surfaces, J. Symbolic Comput. 13, 485-510.