On higher order derivatives of blending functions

On higher order derivatives of blending functions

Computer Aided Geometric Design 17 (2000) 309–317 www.elsevier.com/locate/comaid On higher order derivatives of blending functions Thomas Hermann ∗ ,...

70KB Sizes 4 Downloads 105 Views

Computer Aided Geometric Design 17 (2000) 309–317 www.elsevier.com/locate/comaid

On higher order derivatives of blending functions Thomas Hermann ∗ , Gábor Lukács 1 Geometric Modelling Laboratory, Computer and Automation Research Institute, Kende u. 13-17, 1111 Budapest, Hungary Received November 1998; revised November 1999

Abstract It is well-known that the derivatives of the Bézier curves can be expressed as Bézier curves where the control points are the differences of the original control points. This phenomenon is characterized for finite and infinite function systems.  2000 Elsevier Science B.V. All rights reserved. Keywords: Bézier curves; Finite function systems; Infinite function systems

1. Introduction It is well-known that the derivative of a Bézier curve n X ci Bn,i (t) P (t) = i=0

can be expressed as n! X r 1 ci Bn−r,i (t). (n − r)! n−r

P (r)(t) =

i=0

Here as usual Bn,i (t) =

  n i t (1 − t)n−i i

denotes the Bernstein basis and 1r is the rth forward difference operator, i.e., 11 ci := 1ci := ci+1 − ci ,

1k+1 ci := 11k ci .

∗ Corresponding author. E-mail: [email protected]. 1 E-mail: [email protected].

0167-8396/00/$ – see front matter  2000 Elsevier Science B.V. All rights reserved. PII: S 0 1 6 7 - 8 3 9 6 ( 0 0 ) 0 0 0 0 8 - X

(1)

310

T. Hermann, G. Lukács / Computer Aided Geometric Design 17 (2000) 309–317

Let us consider the rational Bézier curve Pn ci wi Bn,i (t) , R(t) = Pi=0 n i=0 wi Bn,i (t) where wi denote the weights. Recently it was pointed out in (Floater, 1992a, 1992b; Wang and Wang, 1995) that the derivative of R can be expressed in the following form R 0 (t) =

n−1 X

1ci gi (t),

(2)

i=0

where the functions gi can be determined, but there does not exist an {hi (t)} function system such that R 00 (t) =

n−2 X

12 ci hi (t)

(3)

i=0

is valid. A similar phenomenon is true for B-splines, too. In the following we should like to characterize the systems of such r times continuously differentiable {fi } functions where for arbitrary ci control points the kth derivative of X S(t) = ci fi (t) can be expressed with the help of the kth difference of the control points, i.e., there exists a {gk,i } system of functions, such that X 1k ci gk,i (t). S (k) (t) =

2. Finite systems 2.1. Main result First that case will be investigated when the system of functions is finite, i.e., we should like to characterize the systems of those, r times continuously differentiable {fi }ni=0 functions where for arbitrary ci control points the kth derivative of S(t) =

n X

ci fi (t)

i=0

can be expressed with the help of the kth difference of control points, i.e., there exists a {gk,i } system of functions such that S

(k)

(t) =

n−k X

1k ci gk,i (t)

(0 6 k 6 r).

i=0

The following characterization is true:

(4)

T. Hermann, G. Lukács / Computer Aided Geometric Design 17 (2000) 309–317

Theorem 1. Let r > 0 be an integer. The following two statements are equivalent: (i) There exists {gk,i } function systems such that (4) is satisfied;  n  X i f (k) = 0 (1 6 k 6 r). (ii) k−1 i

311

(5)

i=0

Proof. Notice that by differentiating (5) one immediately has the equivalent n   X i (k) f = 0 (0 6 j < k; 1 6 k 6 r). j i

(6)

i=0

First it will be shown that (i) implies (ii). Let us use the notation ∞ ∞ X X zi fi (t), G(z) := Gk (z, t) := zi gk,i (t), F (z) := F (z, t) := i=0

(7)

i=0

where fi = 0 if i > n, and gk,i = 0 if i > n − k. Obviously these series are finite, so we do not have to worry about convergence. By definition ∞



X ∂ k F (z, t) X i (k) = z fi (t) = (1k zi )gk,i (t) k ∂t i=0

i=0

= (z − 1)k

∞ X

zi gk,i (t) = (z − 1)k Gk (z, t).

(8)

i=0

From here it follows that ∂ j +k F (z, t) =0 ∂zj ∂t k

(j = 0, . . . , k − 1),

z=1

i.e., n X

i(i − 1) · · · (i − j + 1)fi(k) (t) = 0.

i=0

Dividing both sides by j ! one gets (6). So (ii) is proved. Now let us compute gk,i (t). By (8) Gk (z, t) = (z − 1)−k

∞ X

zi fi(k) (t)

i=0

 ∞ ∞  X k + j − 1 j X i (k) z fi (t) z = (−1)k k−1 j =0

= (−1)

k

∞ X i=0

i.e.,

i=0

z

i

i  X j =0

 i − j + k − 1 (k) fj (t), k−1

 i  X i − j + k − 1 (k) fj (t). gk,i (t) = (−1) k−1 k

j =0

(9)

312

T. Hermann, G. Lukács / Computer Aided Geometric Design 17 (2000) 309–317

Now let us prove the other direction. First let us define gk,i (i = 0, . . . , n) by (9) and let gk,i = 0 if i > n. Further let us define Gk (z, t) by (7). From (ii) it follows that gk,i (t) = 0 (n − k < i 6 n).

(10)

We prove (10) by induction on r. When r = 1 the statement is trivial. Suppose that our statement is true for some r. Now we will prove it for r + 1. First notice that by definition gk,i+1 (t) − gk,i (t) # " i+1   i  X i + 1 − j + k − 1 (k) X i − j + k − 1 (k) k = (−1) fj (t) − fj (t) k−1 k−1 j =0

= (−1)k

j =0

i+1  X j =0

 i − j + k − 1 (k) fj (t) k−2

0 (t). = −gk−1,i+1

Here we used the well-known identity       n+1 n n − = . m+1 m+1 m From the induction hypothesis it follows that gk−1,i+1 = 0 and so all gk,i (i = n − k + 1, . . . , n) are equal with each other when 1 6 k 6 r + 1. So to prove (10) it is enough to prove that gk,n = 0. It is easy to see, that the polynomials   x x(x − 1) · · · (x − j + 1) (j = 0, . . . , k − 1) = j! j  form a basis of the polynomials of degree less then k. m−x k−1 is a polynomial of degree k − 1, so there are real numbers αm,k,j such that     X k−1 x m−x αm,k,j . = j k−1 j =0

(k)

Substituting i into x, multiplying both sides by fi

and summing them, we have

 n   n  k−1 X X X m − i (k) i (k) αm,k,j fi (t) = f (t). k−1 j i j =0

i=0

i=0

By (ii) the right side is 0. If m = n + k − 1, then the left side is gk,n . This proves (10). So  ∞ i  X X i − j + k − 1 (k) k i z fj (t) Gk (z, t) = (−1) k−1 i=0

j =0

T. Hermann, G. Lukács / Computer Aided Geometric Design 17 (2000) 309–317

= (−1)

k

∞ X j =0

= (−1)k

(k) fj (t)

313

 ∞  X i −j +k−1 i z k−1 i=j

∞ X j =0

 ∞  X i + k − 1 i+j (k) fj (t) z k−1 i=0

 ∞ ∞  X i + k − 1 i X j (k) k = (−1) z fj (t) z k−1 j =0

i=0

= (z − 1)−k

∂ k F (z, t)

, ∂t k i.e., (8) holds. Now it will be proved, that (8) induces (i). One can write   n−k k X X ∂ k F (z, t) k j k k−j = (z − 1) G (z, t) = (−1) zi gk,i (t) z k ∂t k j j =0

=

n X

zi

k X

i=0

j =0

so fi(k) (t) =

k X

(−1)j

j =0

i=0

  k (−1)j gk,i−k+j (t), j

  k gk,i−k+j (t). j

This means that n X

ci fi(k) (t) =

i=0

n X i=0

=

ci

  k X k (−1)j gk,i−k+j (t) j j =0



j +k n−k X X

(−1)k+i+j

j =0 i=j

=

n−k X

gk,j (t)

j =0

=

n−k X

k X

(−1)

i=0

 k gk,j (t)ci i −j

k−i

  k ci+j i

1k cj gk,j (t)

j =0

which completes the proof. 2 Remarks. (1) Let us consider an arbitrary system ofPblending functions satisfying the condition of Theorem 1 and the operator L(p, t) := ni=0 p(i)fi (t). One interpretation of our conditions is that for all j < r L should map a polynomial p of degree j into a polynomial of degree 6 j . (In the rth derivative of L(p, t) all the coefficients will be 0, so L(p, t) is a polynomial no matter what functions are the fi s.)

314

T. Hermann, G. Lukács / Computer Aided Geometric Design 17 (2000) 309–317

(2) This result is related to the theory of k-convexity preserving system of blending functions in (Carnicer et al., 1996), i.e., an {fi } system of blending functions is k-convexity preserving if and only if the corresponding gk,i functions are non-negative. 2.2. Rational Bézier curves As an illustration of Theorem 1 we show that in case of rational Bézier curves (3) is true if and only if all the weights are equal. When r = 2, then the conditions of Theorem 1 are: n X

!0 fi (t)

n X

= 0,

i=0

!00 ifi (t)

= 0,

i=0

i.e. there are some constants a, b and c so that n X

fi (t) = a,

i=0

n X

ifi (t) = b + ct.

i=0

Now wi Bn,i (t) fi (t) = Pn j =0 wj Bn,j (t) and so a = 1 and with this (2) is satisfied (i.e., affine invariance implies (2)). If n X i=0

Pn iwi Bn,i (t) = b + ct, ifi (t) = Pni=0 j =0 wj Bn,j (t)

then in case of t = 0 the left side is 0 and so b = 0. Similarly for t = 1 one gets that c = n. Hence, rearranging the terms it follows: 0=

n X (i − nt)wi Bn,i (t). i=0

Expressing the right side as a Bézier polynomial of degree n + 1 we have 0=

n+1 X i(n + 1 − i) i=0

n+1

(wi − wi−1 )Bn+1,i (t).

From here the statement is obvious.

T. Hermann, G. Lukács / Computer Aided Geometric Design 17 (2000) 309–317

315

2.3. Case r = n As an other application of Theorem 1 let us investigate the case when r is the highest possible value, i.e., r = n. In this case the following characterization is true: Theorem 2. If r = n, then (i) If (5) is true, then there is an f ∈ C n function and a set of pk polynomials of degree k such that     n−1 X n j (−1)j −i (11) f (t) + pj (t). fi (t) = (−1)n−i i i j =i

(ii) Furthermore, if f ∈ C n and {pk }n−1 k=0 is an arbitrary set of polynomials for which degree pk 6 k, then for the system of functions {fi }ni=0 defined by (11), (4) is fulfilled where gk,i is defined in (9). Proof. Let us use the following well-known relation (see, e.g., (Knuth, 1981) (1.2.6))     m X m 0 if 0 6 j < m, m−i i (−1) = (12) 1 if j = m. j i i=0

Let us consider the following system of linear equations: m   X i xi = 0 (j = 0, . . . , m − 1). j

(13)

i=0

By (12) the general solution of (13) is   m xm (i = 0, . . . , m − 1). xi = (−1)m−i i

(14)

So from (5), (13) and (14) it follows that   (n) n−i n f (n) (t). fi (t) = (−1) i n

(15)

Let us introduce the following recursive definitions:   n−i n fn (t) (i = 0, . . . , n − 1), f1,i (t) := fi (t) − (−1) i   n−k−i n − k fk,n−k (t) fk+1,i (t) := fk,i (t) − (−1) i (i = 0, . . . , n − k − 1; k = 1, . . . , n − 1). (n−k) is a It will be proved by induction that fk,i is a polynomial of degree n − k and fk,i (n)

solution of Eq. (13) when m = n−k. If k = 1, then f1,i = 0 by (15), so f1,i is a polynomial  (n−1) = fi(n−1) − (−1)n−i ni fn(n−1) into of degree n − 1. Furthermore, let us substitute f1,i (13) (m = n − 1). Now if j = 0, . . . , n − 2, then

316

T. Hermann, G. Lukács / Computer Aided Geometric Design 17 (2000) 309–317

   n−1   n−1   X X i i n (n−1) (n−1) (n−1) (t) − (−1)n−i (t) f1,i (t) = fi fn j j i i=0

i=0

=

n−1  X

    n−1 X i n i (−1)n−1−i fi(n−1) (t) + fn(n−1) (t) j i j

i=0

i=0

   n (n−1) i (n−1) (t) + f (t) fi = j n j i=0 n   X i (n−1) (t) = f j i n−1  X

i=0

so by (5) one gains the statement for k = 1. In the last step we used again (12). The step from k to k + 1 is analogous. We omit the details. From here by applying repeatedly the equality   n−k fk,n−k (t) fk,i (t) = fk+1,i (t) + (−1)n−k−i i one gets (11) with f = fn and pk = fk,n−k . Now let us prove (ii).    X    n−1 n   n n X X X i n r n−i i r−i i (−1) (−1) fi (t) = f (t) + pr (t) j j i j i i=0

i=0

= f (t)

i=0 r=i

   X    n−1 r X i n i r (−1)n−i pr (t) (−1)r−i + j j i i

n X i=0

r=0

i=0

= pj (t). Here we used (12) again and the fact that j < n. Because degree pj < k this implies n   X i (k) 2 f (t) = 0. j i i=0

Remark. An easy computation gives that if f (t) = t n and pi (t) = the Bn,i (t) Bernstein polynomials.

n i i t

then one obtains

3. Infinite systems If the system of our blending system is infinite then the first question is whether the series is convergent or not. For simplicity’s sake let us suppose that the corresponding coefficients (control points) are such that the series and their derivatives are absolute convergent. Under this condition it can easily be shown by direct computation, that unlike the finite case, for

T. Hermann, G. Lukács / Computer Aided Geometric Design 17 (2000) 309–317

317

every infinite system of blending functions {fi }∞ =0 the function system {gk,i } given in (9) is such that if ∞ X ci fi , S= i=0

then S (k) =

∞ X

1k ci gk,i .

i=0

Remark. In case of the Bézier polynomials by (1) g1,i (t) = nbn−1,i (t), i.e., the gi functions were “similar” to the original blending functions. One might ask, what are the corresponding infinite blending functions, i.e., when is it true, that g1,i (t) = λfi (t). An easy computation gives that in this case fi (t) = e−λt

i X j =0

Ai−j

(λt)j , j!

where Ai are arbitrary numbers. If A0 = 1 and Ai = 0 when i > 0, then we get the Poisson distribution. The blending functions of the Poisson distribution are used in approximation theory (see, e.g., (Feller, 1966)) and recently in CAGD (see (Morin and Goldman, 1999)).

Acknowledgements We should like to thank the referees for their valuable remarks which improved the presentation of this paper. This research was partly supported by the Hungarian National Research Foundation (OTKA, grant no. 26203). References Carnicer, J.M. García-Esnaola, M. and Peña, J.M. (1996), Generalized convexity preserving transformations, Computer Aided Geometric Design 13, 179–197. Feller, W. (1966), An Introduction to Probability Theory and its Applications, Wiley. Floater, M.S. (1992a), Derivatives of rational Bézier curves, Computer Aided Geometric Design 13, 161–174. Floater, M.S. (1992b), Evaluation and properties of the derivative of a NURBS curve, in: Lyche, T. and Schumaker, L.L., eds., Mathematical Methods in CAGD II, Academic Press, 261–274. Morin, G. and Goldman, R.N. (1999), A subdivision scheme for Poisson curves and surfaces, manuscript. Knuth, D.E. (1981), The Art of Computer Programming I, Addison-Wesley. Wang, G.-Z. and Wang, G.-J. (1995), Higher order derivatives of a rational Bézier curve, Graphical Models and Image Processing 57, 246–253.