International Journal of Science & informatics Vol. 2, No. 1, Fall, 2012, pp. 33-39 ISSN 2158-835X (print), 2158-8368 (online), All Rights Reserved NATURAL CUBIC B-SPLINES STRUCTURE AT THE BOUNDARIES Weiwei Zhu ([email protected]) University of Maryland Eastern Shore, USA ABSTRACT Nonuniform rational B-Splines have become the industrial standards. However, the widely-applied models in industry are still based on the whole number axis, while in reality they are bounded. Continuous curvature is another important need in applications as well. These call for modeling cubic NURBs at boundaries. In this paper, we’ll construct hierarchy structure for cubic B-Splines at the boundaries. A general algorithm is given. Keywords: B-Splines, Natural B-Splines, NURBs, Bézier Net, MRA. INTRODUCTION Nonuniform rational B-Splines (NURBs), integrated with the technique of Multiresolution Analysis (MRA) and wavelet analysis, has become the standards in computer-aid design/manufacture/engineering (CAD/CAM/CAE). (Chui, 1992 & 1997; Jawerth & Sweldens, 1993). However, the modeling is not bounded. As the accuracy becomes more important, building bounded NURBs models becomes critical. Considering the need of continuous curvature in industry, NURBs based on cubic B-Splines are necessary. In this paper, we will construct edge functions at boundaries using cubic natural B-Splines. We will investigate natural cubic B-Splines, and then construct edge functions. Notations C r Smoothness A function for curve is said to have r derivative continuity at a point if it has k - derivative continuity for k ≤ r at the point. Equivalently, we say it has C r smoothness at the point. If a curve has C r smoothness at each point on an interval, it has C r smoothness on that interval. Barycentric Coordinates Consider x ∈ [ a, b ] ( a < b ) such that If we let u = x−a , then the Barycentric coordinates for x are defined as b−a x= (1 − u ) a + ub (1.1) B-Splines and NURBs In multiresolution analysis (MRA), data is put in a set of nested spaces (Zhu, 2011[1,3]; Jawerth & Sweldens, 93). The basis functions spanning each space are called scaling functions. Scaling functions between two adjacent spaces must satisfy so called refinement condition to guarantee the generated spaces nested. For decades, B-Splines have been the most widely-applied scaling functions in industry. Given a knot sequence t = {t0 , t1 , , tn } , ti < ti +1 , i= 0, , n − 1 , the i th B-Spline basis functions of order , denoted by N i ,m (t ) , is defined as (Chui, 1988; Piegl & Tiller, 1997) International Journal of Science & Informatics, Fall, 2012 34 (1.2) However, due to B-Splines cannot precisely represent many important industrial shapes such as conic shapes, nor freeform surfaces, nonuniform rational B-Splines, or NURBs, start to replace them since NURBs can represent both analytic and freeform surfaces with mathematical exactness and resolution independence. NURBs are defined on BSplines. Given a knot sequence t= {t0 , t0 , t0 , t1 , t2 ,, tk −2 m , tk +1−2 m ,, tk +1−2 m ,, tk +1−2 m }, ti ≤ ti +1 , i= 0,, k − 2m where the first and last m knots are identical respectively, let N i ,m (t ) be i th B-Spline of order m as usual, and Ri ,m (t ) be i th nonuniform rational B-Spline of order m and wi be its weight. Then Ri ,m (t ) is defined as (Piegl & Tiller, 1997) Ri ,m (t ) = N i ,m (t ) ∑w N j for all i, w j ≥ 0 (1.3) j ,m j Bézier Net Given a set of control points, a Bézier curve interpolates two endpoints and approximates the rest of points smoothly. Connecting consecutive control points gives us a polygon called control polygon since the Bézier curve is in its convex hull. Figure 1 shows a cubic Bézier curve with four control points { pk , k = 0,1, 2, 3} , Figure 1 Cubic Bézier Curve Let C (t ) be a Bézier curve function with degree n on interval [0, 1], then it can be expressed as (Chui 1997; Zhu, 2009) . (1.4) Coefficient pi is called a control point, and Bn ,i (t ) is a Bernstein polynomial bases function with degree n such that . (1.5) A Bézier curve defined by equation (1.4) is determined by coefficients given the basis functions. In another word, curve C (t ) is determined by pi if Bn ,i (t ) is given. We hence want to exclusively investigate the relation among coefficients on the interval with geometric insights. A Bézier Net provides a simple approach for such a purpose (Chui, 1992; Chui & He, 2000). In Barycentric coordinates, a Bézier curve on interval [ a, b ] becomes n C ( x) = ∑ pi Bi , n ( x) = n ∑ =i 0=i 0 n −i i n n b − x x − a n n −i pi pi (1 − u ) u i = b−a i 0 i i b − a = ∑ x−a for x ∈ ( a, b ) . b−a Its first and second derivatives at the endpoints are (Chui, 1997; Zhu, 2009) with u = (1.6) International Journal of Science & Informatics, Fall, 2012 35 n( p1 − p2 ) n( pn − pn −1 ) = C '(b) b−a b−a n(n − 1)( p0 − 2 p1 + p2 ) n(n − 1)( pn − 2 − 2 pn −1 + pn ) = C ''(a ) = C ''(b) (b − a ) 2 (b − a ) 2 = C '(a ) = f (t ) Bézier Net for a cubic B Bézier curve 3 ∑pB i =0 i 3,i , t ∈ [ a, b] is defined as 1 0 . 3 2 For example, 1 (1 − x ) + 3 (1 − x ) x + 2 x can be interpreted as • − − − − − − • , 3 2 3 0 1u 3 + 2u 2 v + 1v 3 = with u (1.7) 1 1 2 0 1 and • − − − − − − • a means b b− x x−a = and v . b−a b−a Compared with the polynomial notation, Bézier nets give a simpler and more straightforward insight for a spline. Figure 2 shows the Bézier net of cubic B-Splines defined in (3) on interval [ti , ti + 4 ] (Chui, 1988). We will adopt this notation in the paper. Figure 2 Bézier net for Cubic B-Splines N 4,i Parameters h, k , l are given by (1.8) Furthermore, for cubic B-Splines, if knots are uniformed such that ti +1 − t i = 1 , then Bézier net for the cubic B- Splines N i ,4 ( x) on [ti +1 , ti ] becomes Figure 3 Bézier net for cubic B-Splines N i ,4 ( x) NATURAL CUBIC B-SPLINE BASES Natural cubic B-Splines are cubic splines whose second derivatives at the two endpoints are zero. It is well known that among interpolating cubic splines, the shapes of natural cubic B-Splines have the minimum strain energy. To build the natural cubic B-Splines, let’s suppose that a spline interpolates n + 1 control points ( t0 , y0 ) , ( t1, y1 ) , , ( tn , yn ) , with a piecewise cubic polynomial where (Zhu, 2009) International Journal of Science & Informatics, Fall, 2012 36 S1 ( x) t0 ≤ t ≤ t1 S ( x) t ≤ t ≤ t 2 1 2 S ( x) = Sn ( x) tn−1 ≤ t ≤ tn (2.1) and Si ( x) = Ai + Bi ( x − ti ) + Ci ( x − ti ) 2 + Di ( x − ti )3 for i = 1,, n . (2.2) Each of these n segments Si ( x) is a cubic polynomial determined by four coefficients ( Ai , Bi , Ci , and Di ). There are totally 4n coefficients to be determined. We wish to have C 2 smoothness for basis B-Splines. Hence at each of n − 1 interior control points, the spline would not only interpolate the point, but also its first and second derivatives are continuous such that = Si (ti ) y= Si +1 (ti ) yi i, = Si' (ti ) Si'+1 (ti ), = Si" (ti ) Si"+1 (ti )= for i 1, 2,, n − 1 (2.3) Equations (1.7) and (1.8) give us total 4 ( n − 1) + 4 = 4n equations for determining 4n coefficients. Let zi = S "( xi ) , and hi = ti +1 − ti , i ∈ [ 0, n − 1] . Since each segment polynomial is cubic, the second derivative is a linear function in Si" ( x) [ti , ti+1 ] , i.e.,= zi +1 − zi ( x − ti ) + zi . Solving the partial differential equation, we can get zi from the following hi equation: 2 ( h0 + h1 ) h1 h1 2 ( h0 + h1 ) hn−2 z1 v1 z2 = 6 v2 hn−2 2 ( hn−2 + hn−1 ) zn−1 vn−1 (2.4) y −y y − yi −1 where vi 6 i +1 i − i = . h hi −1 i Finally, we get piecewise polynomial for each segment natural cubic B-Spline: Si (= x) y y h zi +1 z h ( x − ti )3 + i ( ti+1 − x )3 + i+1 − i zi+1 ( x − ti ) + i − i zi ( ti+1 − x ) h 6hi 6hi 6 i hi 6 (2.5) For example, if we have a set of knots which are equally spaced by 1 such that control points are ( 0, y0 ) , (1, y1 ) , , ( n, yn ) , then hi = ti +1 − ti = 1, i ∈ [ 0, n − 1] . The equation for zi is 4 1 0 z1 y2 − 2 y1 + y0 1 4 1 z y − 2y + y 3 2 1 2 1 1 = 6 1 4 1 zn −2 yn−1 − 2 yn−2 + yn−3 yn − 2 yn−1 + yn−2 1 4 zn−1 and the segment polynomial Si ( x) is (2.6) International Journal of Science & Informatics, Fall, 2012 Si (= x) 37 zi +1 z z z ( x − ti )3 + i ( ti+1 − x )3 + yi+1 − i+1 ( x − ti ) + yi − i ( ti+1 − x ) 6 6 6 6 (2.7) CUBIC B-SPLINES MODELING WITH NATURAL CUBIC B-SPLINES AT BOUNDARIES We aim to construct edge functions with natural cubic B-Splines in cubic B-Splines modeling. Without loss of generality, we consider only the left boundary case. Two questions are waiting for us to answer: How many edge functions do we need at the boundary and what are they? To answer the first question, suppose we have regular cubic B-Splines as edge functions. Since a regular cubic BSpline covers four knot spans, there are at most three edge functions which cover the first one, two and three knot spans at the boundary, respectively. Now we make them ‘natural’. This means their linear combination together with one interior cubic B-Spline should satisfy the condition that the second derivatives at the endpoints are zero. It turns out the edge function covering the first knot span is gone. In fact, with natural splines of any order as edge functions, the number of B-Splines on the interval is equal to the number of knots (including both interior and boundary knots). Based on this observation, we need two cubic natural edge functions at the boundary. Figure 4 Bézier nets at the left boundary. Given a knot sequence t = {t1 ,, t6 } , let N1e ( x) and N 2e ( x) be unknown natural cubic edge functions, and N1 ( x) and N 2 ( x) be cubic B-Splines on interval [t1 , t5 ] and [t2 , t6 ] respectively. The Bézier nets of these functions are shown in Figure 4, where hi , ki ,and li are defined by (1.8), and xi , yi , zi , vi and w i are unknown coefficients of edge functions and we’ll find their values. We wish N1e ( x) have C1 and C 2 at t = t2 and t = t3 , and ( 2) (N ) e 1 ( x) = 0 because of its natural property. Considering (1.8), the following equations are derived An immediate observation from the group of equations (3.1) is y= y= y= 0 . By the Partition of Unity, at any 1 2 3 knot t the values of all basis functions should sum to 1. Hence in Figure 4, the following results hold International Journal of Science & Informatics, Fall, 2012 38 w= w= w= 0 1 2 3 k2 h3 h32 = = = v , v , v 1 l 2 l 3 kl 1 1 21 Similarly, we could build a group of equations for coefficients of (3.2) N 2e (t ) at t1 and t2 6 ( z0 − 2 z1 + z2 ) =0 ( h1 )2 3 ( z3 − z2 ) 3 ( v1 − z3 ) = h1 h2 6 ( z1 − 2 z2 + z3 ) 6 ( z3 − 2v1 + v2 ) = ( h1 )2 ( h2 )2 (3.3) Solving the groups of equations (3.1)-(3.3), we get the Bézier nets for natural cubic B-Splines at the left boundary (Figure 6) Figure 6 Natural cubic splines at the left boundary. Thus, given a set of knot sequence, we can build the cubic B-Splines at the boundaries by Figure 6 with parameters 1 , one can see that the Bézier nets for cubic defined in (1.8). Specifically, if the knots are uniformed with ti +1 − ti = natural splines at the boundary (Figure 7) are consistent with one for cubic B-Splines (Figure 3) . This is exactly what we have expected. Figure 7 Bézier nets for uniform natural cubic B-Splines. CONCLUSION & FUTURE WORK We have constructed cubic B-Splines model at the boundaries. Based on it, NURBs model can be built (Zhu, 2011[3]), and followed by the tight frame wavelet modeling (Zhu, 2011[1]&[2]). Our ultimate goal is to construct bounded tight frame wavelets on cubic NURBs (Chui, He & Stöckler, 2004) with two vanishing moments in the future. International Journal of Science & Informatics, Fall, 2012 39 REFERENCES Chui, C (1988). Multivariate Splines. SIAM, Philadelphia. Chui, C (1992). An Introduction to Wavelets. Academic Press. Chui, C (1997). Wavelets: A Mathematical Tool for Signal Analysis. SIAM, Philadelphia. Chui, C, He, H & Stöckler, J (2004). Nonstationary tight wavelet frames, I: Bounded intervals. Appl. And Comp. Harmonic Anal., 17, 141-197 Piegl, L & Tiller, W (1997). The Nurbs Book, Springer, 2nd Edition. Jawerth, B & Sweldens, W (1993). An overview of wavelet based multiresolution analysis, SIAM. Zhu, W (2011[1]). Existence condition for tight frame wavelets on NURBs: Bounded intervals. International Journal of Science & Informatics, accepted. Zhu, W (2011[2]). Tight frame wavelet on Linear NURBs: Bounded intervals. Manuscript. Zhu, W (2011[3]). Hierarchy structure of NURBs in Multiresolution Analysis: bounded intervals. Journal of Global and Information Technology, accepted.
© Copyright 2026 Paperzz