Pan et al. / J Zhejiang Univ Sci A 2007 8(8):1199-1209 1199 Journal of Zhejiang University SCIENCE A ISSN 1673-565X (Print); ISSN 1862-1775 (Online) www.zju.edu.cn/jzus; www.springerlink.com E-mail: jzus@zju.edu.cn Convexity-preserving interpolation of trigonometric polynomial curves with a shape parameter* PAN Yong-juan1,2, WANG Guo-jin‡1 (1Department of Mathematics, Zhejiang University, Hangzhou 310027, China) 2 ( Department of Applied Mathematics, Zhejiang University of Technology, Hangzhou 310032, China) E-mail: panyongjuan@zjut.edu.cn; wanggj@zju.edu.cn Received Dec. 1, 2006; revision accepted Feb. 28, 2007 Abstract: In computer aided geometric design (CAGD), it is often needed to produce a convexity-preserving interpolating curve according to the given planar data points. However, most existing pertinent methods cannot generate convexity-preserving interpolating transcendental curves; even constructing convexity-preserving interpolating polynomial curves, it is required to solve a system of equations or recur to a complicated iterative process. The method developed in this paper overcomes the above drawbacks. The basic idea is: first to construct a kind of trigonometric polynomial curves with a shape parameter, and interpolating trigonometric polynomial parametric curves with C2 (or G1) continuity can be automatically generated without having to solve any system of equations or do any iterative computation. Then, the convexity of the constructed curves can be guaranteed by the appropriate value of the shape parameter. Performing the method is easy and fast, and the curvature distribution of the resulting interpolating curves is always well-proportioned. Several numerical examples are shown to substantiate that our algorithm is not only correct but also usable. Key words: Computer aided geometric design (CAGD), α-trigonometric polynomial curves, Interpolation, Convexity-preserving, Shape parameter doi:10.1631/jzus.2007.A1199 Document code: A CLC number: TP391 INTRODUCTION In geometric shape design and reverse engineering, constructing a convexity-preserving interpolating curve according to the given planar data points is a familiar and basal problem. So far, some techniques have been invented to obtain this kind of curves [see (Tai and Wang, 2004) and the references therein], but almost all of them have to solve a system of equations or recur to a complicated iterative process; although there is no mention of the fact that, in spite of doing a lot of the above troublesome work, ‡ Corresponding author Project supported by the National Basic Research Program (973) of China (No. 2004CB719400), the National Natural Science Foundation of China (Nos. 60673031 and 60333010) and the National Natural Science Foundation for Innovative Research Groups of China (No. 60021201) * they could not generate convexity-preserving interpolating transcendental curves, such as cycloid, spiral and some other common curves in shape design (Tai and Wang, 2004). As for constructing convexitypreserving interpolating curve by using NURBS, a user rarely adopts them because of the intangibility of weight for curve shape and the complexity in computation of rational curve. Just to overcome the above drawbacks, this paper constructs a kind of trigonometric polynomial curve with a shape parameter and investigates its convexity-preserving interpolation algorithm. Trigonometric spline was introduced by Schoenberg (1964), who studied the interpolation but did not take shape preservation into account. Subsequently, many people explored further properties of trigonometric splines (Lyche and Winther, 1979; Koch et al., 1995; Walz, 1997a; 1997b; Peña, 1997). Later, Zhang (1996; 1200 Pan et al. / J Zhejiang Univ Sci A 2007 8(8):1199-1209 1997) developed C-curves using the basis {sin t, cos t, t, 1}, and unified C-curves and H-curves that use basis {sinh t, cosh t, t, 1} as a complete curve family, named F-splines (Zhang et al., 2005; Zhang and Krause, 2005). Some other properties of C-curves were studied in (Wang and Chen, 2004; Wang and Li, 2006). However, they did not process interpolation. This paper presents a novel trigonometric polynomial curve with a shape parameter. The technique is based on the Loe’s idea (Loe, 1996) using singular blending, but Loe blended a cubic uniform B-spline and its control polygon to get non-interpolatory α-B-spline. Also our technique generalizes the work of (Tai and Wang, 2004), which applied the singular blending idea to actualize interpolation but cannot obtain interpolating transcendental curves. In this paper we construct a new type of curve by blending a parametrized polygon and trigonometric polynomial splines with blending factor α which acts as shape parameter; then a family of trigonometric polynomial curves with C2 (or G1) continuity interpolating the given planar data points can be automatically generated without having to solve any system of equations or to go at any iterative computation; next, we research the convexity-preserving property of these curves, and find a range in which the shape parameter α takes its value in order to make the corresponding interpolating curves convexity-preserving, as well as to make its curvature distribution always well-proportioned. Lastly, several numerical examples are shown to substantiate that our algorithm is not only correct but also usable, and can generate convexity-preserving interpolating transcendental curves. CONSTRUCTION OF α-TRIGONOMETRIC POLYNOMIAL INTERPOLATING CURVES We will construct a kind of trigonometric polynomial curves with shape parameter to interpolate the given planar data points { Pi }in=1 , n≥4. Firstly, to ensure the number of line segments formed by connecting the data points equals the number of curve segments in the trigonometric polynomial curves to be constructed, two auxiliary data points P0, Pn+1 are introduced according to the method of (Tai and Wang, 2004); then for the C-B-splines in (Zhang, 1996), we take π/2 as the parametric step, take ui=iπ/2 (i=1,2,…,n) as the parametric nodes, so the uniform trigonometric polynomial curve can be constructed as follows: C (u ) = C j (u ) = B0,4 (t ) Pj −1 + B1,4 (t ) Pj + B2,4 (t ) Pj +1 + B3,4 (t ) Pj + 2 , (1) t = u − u j , u j ≤ u ≤ u j +1 , j = 1,2,...,n − 1, where { Pi }in=+01 represent the control points, Bi,4(t) (i=0, 1,2,3) are the uniform trigonometric polynomial splines basis: B0,4 (t ) = (π/2 − t − cost ) π , B1,4 (t ) = (t − sint + 2cost ) π , B2,4 (t ) = (π/2 − t + 2sint − cost ) π , B (t ) = (t − sint ) π. 3,4 (2) Thus, the curve (1) has the following properties (Zhang, 1996): C (u j ) = (1/2 − 1/π)( Pj −1 + Pj +1 )+2 Pj /π, C (u j +1 ) = (1/2 − 1/π)( Pj + Pj + 2 )+2 Pj +1 /π, (3) C ′ (u j ) = ( Pj +1 − Pj −1 )/π, C ′ (u j +1 ) = ( Pj + 2 − Pj )/π, 2 C (u ) ∈ C [u1 ,un ]. To avoid solving global equation systems and to introduce a shape adjustment parameter without modifying the order of continuity anywhere, we blend a parametrized polygon and the above trigonometric polynomial curve C(u) using a blending factor α. The vertices of this polygon can be directly computed from the interpolation conditions. In order to let the curve to be constructed have the basis {sin t, cos t, t, 1}, like the curve C(u), we construct singular blending function (Loe, 1996) Sj(u) to parametrize the polygon using the basis {sin t, cos t, t, 1}; so we take Sj(u)∈C2[uj, uj+1] and satisfying the following conditions: S j (u j ) = 0, S j (u j +1 ) = 1, S ′j (u j ) = S ′′j (u j ) = 0, S ′j (u j +1 ) = S ′′j (u j +1 ) = 0, j =1,2,...,n − 1. In this way, after some calculation, we get (4) 1201 Pan et al. / J Zhejiang Univ Sci A 2007 8(8):1199-1209 ∂ ∂2 T (u j ,α ) = α C ′ (u j ), 2 T (u j ,α ) = α C ′′ (u j ). (8) ∂u ∂u S j (u )= S (u − u j ), u j ≤ u ≤ u j +1 , j = 1, 2,…, n − 1, where 6(2 + 3)(t − sint ) π , 0 ≤ t ≤ π/6, 3(5 + 3 3)(sint − cost ) π − 6(3 + 2 3)t π S (t ) = π/6 ≤ t ≤ π/3, + 5 + 3 3, 6(2 + 3)(t + cost ) π − 5 − 3 3, π/3 ≤ t ≤ π/2. (5) We call the reparametrized polygon a singular polygon, whose yet-to-be-determined vertices Vj and Vj+1 are dependent on α, and hence the singular polygon is defined as follows: L(u, α)=Lj(u, α)=[1− Sj(u)]Vj +Sj(u)Vj+1, uj≤u≤uj+1, j=1,2,…,n−1. By blending the singular polygon L(u, α) and the uniform trigonometric polynomial curve C(u), both defined on [u1, un], using α as the blending factor, we obtain a uniform trigonometric polynomial curve with an additional parameter α: T(u, α)=αC(u)+(1−α)L(u, α), u1≤u≤un. Each of its segments on [uj, uj+1] can be more explicitly represented as follows: T (u ,α ) = T j (u ,α ) = α C j (u ) + (1 − α ) L j (u ,α ) = α C j (u ) + (1 − α ){[1 − S j (u )]V j + S j (u )V j +1}. (6) From the condition Eq.(4) of the singular blending function Sj(u) and the interpolating condition T(uj,α)= Pj (j=1,2,…,n), we obtain (1 − α )V j = Pj − α C j (u j ), (1 − α )Vn = Pn − α C n −1 (un ), j = 1,2,...,n − 1, j = n. Finally, we get the following desired interpolating uniform α-trigonometric polynomial curve T (u ,α ) = T j (u ,α ) = α C j (u ) + [1 − S j (u )] Thus, for a fixed shape parameter α, the curve T(u, α) maintains the same order of continuity as that of C(u) at every knot uj (j=1,2,…,n). Since, everywhere away from the knots, the components of the uniform trigonometric polynomial curve C(u) are C∞ and the singular blending functions Sj(u) are C2, the uniform α-trigonometric polynomial curve T(u, α) ∈C2. For the purpose of practical shape design, we only discuss the standard α-trigonometric polynomial curve which has the restriction of α∈(0,1). When α=0, the α-trigonometric polynomial curve is reduced to the polygon P1P2…Pn connecting the data points n ; when α=1, the α-trigonometric polynomial { Pi }i= 1 curve is reduced to the uniform trigonometric polynomial curve C(u), in which case the singular polygon L(u, α) is non-existent. CONVEXITY-PRESERVING RELATIVE TO GLOBAL POINTS INTERPOLATION CONVEX DATA Definition 1 A set of planar data points denoted as n is said to be convex if the close polygon { Pi }i= 1 P1P2…PnP1 is convex. Definition 2 A planar curve is said to be convex if there are no inflection points or singular points (including cusps and the double points) on it. n Let { Pi }i= 1 be convex data points in the plane with any three consecutive points Pj−1, Pj, Pj+1 (j=2, n 3,…,n−1) being not collinear and { Pi }i= 1 being arranged counterclockwise. Convexity of jth curve segment Tj (u, α) on [uj, uj+1] Let t=u−uj∈[0, π/2], u∈[uj, uj+1], and write Tj(u, α) as T j (t , α ), Cj(u) as C j (t ) on [uj, uj+1], then Eqs.(6) and (7) can be written as ⋅ [ Pj − α C j (u j )] + S j (u )[ Pj +1 − α C j (u j +1 )], (7) T j (u,α ) = T j (t ,α ) u j ≤ u ≤ u j +1 , j = 1, 2,… , n − 1. = α C j (t ) + (1 − α ){[1 − S (t )]V j + S (t )V j +1 } The continuity of the curve T(u,α) follows directly from Eq.(4) that (9) = α C j (t ) + [1 − S (t )][ Pj − α C j (0)] + S (t )[ Pj +1 − αC j (π/2)], (10) 1202 Pan et al. / J Zhejiang Univ Sci A 2007 8(8):1199-1209 where 0 ≤ t ≤ π/2. Denote the wedge product of two vectors ai and aj as [ ai , a j ] = xi xj +α [7+3 3+h1 +(5+3 3 − 3h1 )sint 12 +sint +cost )w20 j +( − 1 − sint +cost )w j ], t ∈ [0,π/6]; M j (t ,α ) and let F2(j ) (t ,α ) = {3(5+3 3)(1 − sint ) − 3(1+ 3)cost +α [1 − h2 − (10+6 3+h1 − 2h2 )sint + ai=Pi−Pi−1, i=1,2,…,n+1, cj=−(aj+aj+1+aj+2), (10+6 3 − h1 )cost ]}w01 j +α [16+9 3 − h2 − (10+6 3 +h1 − h2 )(sint +cost )]w20 j +{3(5+3 3)(1 − cost ) then [cj, aj]≥0, [aj+2, cj]≥0 hold, so if we write 12 20 w01 j = [ a j , a j +1 ], w j = [ a j +1 , a j + 2 ], w j = [ a j + 2 , a j ], and because {Pj−1PjPj+1Pj+2} are convex data points arranged counterclockwise, we have (11) Moreover, it is easy to get C j′ (t ) =[(1−sint)aj+(cost+sint)aj+1+(1−cost)aj+2]/π, thus ∂ T j (t ,α ) ∂t = α C j′ (t )+S ′ (t ){( Pj +1 − Pj ) − α [C j (π/2) − C j (0)]} = α [(1 − sint )/π − S ′ (t )(1/2 − 1/π)] a j +[α (cost +sint )/π+S ′ (t ) − 2α S ′ (t )/π] a j +1 +α [(1 − cost )/π − S ′ (t )(1/2 − 1/π)] a j + 2 , ∂2 T j (t ,α ) = α [ − cost/π − S ′′(t )(1/2 − 1/π)]a j + ∂t 2 [α (cost − sint )/π+S ′′(t ) − 2α S ′′(t )/π]a j +1 + α [sint/π − S ′′(t )(1/2 − 1/π)]a j + 2 . Let π ∂ ∂2 M j (t ,α ) = T j (t ,α ), 2 T j (t ,α ) , α ∂t ∂t 2 h1 = 6(2+ 3)/π, h2 = 6(5+3 3)/π, after some algebraic calculation in subinterval [0, π/6], [π/6,π/3] and [π/3,π/2], M j (t ,α ) can be expressed as follows respectively: F1(j ) (t ,α ) = {6(2+ 3)( − 1+sint +cost ) − (5+3 3+h1 )cost ]}w01 j +α (5+3 3 − h1 )[( − 1 yi , ai=(xi, yi), aj=(xj, yj), yj 20 12 20 01 12 w01 j ≥ w j , w j ≥ w j , w j > 0, w j > 0. M j (t ,α ) − 3(1+ 3)sint +α [1 − h2 +(10+6 3 − h1 )sint − (10+6 3+h1 − 2h2 )cost ]}w12j , t ∈ [π/6,π/3]; M j (t ,α ) F3(j ) (t ,α ) = α (5+3 3 − h1 )[( − 1+sint 20 − cost )w01 j +( − 1+sint +cost )w j ]+{6(2+ 3) ⋅ ( − 1+sint +cost )+α [7+3 3+h1 − (5+3 3+h1 )sint +(5+3 3 − 3h1 )cost ]}w12j , t ∈ [π/3,π/2]. Noting that the relative curvature of the curve T j (t ,α ) (0 ≤ t ≤ π/2) is (Farin, 2005) ∂ ∂2 k j (t ,α ) = T j (t ,α ), 2 T j (t ,α ) ∂t ∂t 3 ∂ T j (t ,α ) , ∂t so, there are no inflection points on T j (t ,α ) (0≤t≤π/2) if and only if M j (t ,α ) ≥ 0, ∀t∈[0,π/2]. In order to obtain the range of the shape parameter α in which M j (t ,α ) ≥ 0 holds ∀t∈[0,π/2] in the three subintervals of [0, π/2], the following three lemmas are needed. Here we just prove Lemma 1, proofs of the other two lemmas are similar. Lemma 1 Let f(x)=f0+f1sinx+f2cosx, then f(x)≥0, ∀x∈[0,π/6] if and only if R0(1) ≥ 0, R2(1) ≥ 0, R1(1) + 2 R0(1) R2(1) ≥ 0, where R0(1) = f 0 + f 2 , (1) R1 = f 0 + (2 − 3)f1 + f 2 , (1) R2 = (4 − 2 3)f 0 + (2 − 3)f1 − (3 − 2 3)f 2 . Proof Do trigonometric substitution to the functions sin x and cos x, and let tan (x/2)=t, we can write f(x) as 1203 Pan et al. / J Zhejiang Univ Sci A 2007 8(8):1199-1209 f (x)= f 0 + f 2 + 2 f1t + (f 0 − f 2 )t 2 , t ∈ [0, 2 − 3]. 1+t 2 So f (x) ≥ 0 , x∈[0, π/6] ⇔ g (t ) ≥ 0, t ∈ [0,2 − 3], Next, we will use Lemmas 1~3 to obtain the range of the shape parameter α in which M j (t ,α ) ≥ 0 holds ∀t∈[0,π/2]. Let where g (t )=f 0 + f 2 + 2 f1t + (f 0 − f 2 )t 2 , t ∈ [0,2 − 3]. Then let v = t/(2 − 3), t ∈ [0,2 − 3], and using the conversion formula 1 0 0 [1,v,v ] = [B (v),B (v),B (v)] 1 1/2 0 1 1 1 2 2 0 2 1 2 2 between the monomial basis and Bernstein basis, we can convert g(t) into a Bernstein polynomial: g (t ) = g (v) = [B02 (v),B12 (v),B22 (v)] f 0 +f 2 ⋅ f 0 +(2 − 3)f1 +f 2 . 2[(4 − 2 3)f 0 +(2 − 3)f1 − (3 − 2 3)f 2 ] Hence, the positive conditions of quadratic Bernstein polynomial (Chang, 1995) gives Lemma 1. Lemma 2 Let f(x)=f0+f1sinx+f2cosx, then f(x)≥0, ∀x∈[π/6,π/3] if and only if R0(2) ≥ 0, R2(2) ≥ 0, R1(2) + 2 R0(2) R2(2) 3 ≥ 0, where R0(2) = (4 − 2 3)f 0 + (2 − 3)f1 − (3 − 2 3)f 2 , (2) R1 = 2(f1 + f 2 )+2 3 (f 0 − f1 − f 2 ) 3, (2) R2 =2 f 0 + 3 f1 +f 2 . Lemma 3 Let f(x)=f0+f1sinx+f2cosx, then f(x)≥0, ∀x∈[π/3,π/2] if and only if R0(3) ≥ 0, R2(3) ≥ 0, R1(3) + 2 R0(3) R2(3) /3 ≥ 0, where R0(3) = 2 f 0 + 3 f1 +f 2 , (3) R1 = f 0 + f1 +f 2 + 3(f 0 + f1 − f 2 )/3, (3) R2 = f 0 + f1 . 20 A1(j ) = [8 − 2 3 − 6(1+ 3)/π]w01 j + [2 − 6( 3 − 1)/π]w j +[ − 2 3 + 6(3 − 3)/π]w12j , 20 12 A2(j ) = (3+ 3 − 18/π)w01 j +(1+ 3 − 6/π)(w j − w j ), A3(j ) = −[6+4 3 − 6(3+ 3)/π]w01 j +[4+2 3 12 − 6(1+ 3)/π]w20 j +[10+4 3 − 6(5+3 3)/π]w j , (j ) 01 12 A4 = [ 3 − 6(3 − 3)/π](w j +w j ) +[3 − 6(3 − 3)/π]w20 j , (j ) 20 01 A5 = [2+4 3/3 − 2(3 + 3)/π](w j − w j ) +[4+2 3 − 6(3 + 3)/π]w12j , k1(j ) = (A2( j ) )2 − 4 A1( j ) w01 j , ( j) 01 2 k2(j ) = 12w01 j A2 − 24( 3 − 1)(w j ) , (j ) 01 2 ( j) ( j) 2 ( j) ( j) k3 = 36(w j ) , k4 = (A4 ) − 3 A1 A3 , (j ) 01 12 ( j) 12 ( j ) k5 = 6(3 − 3)(w j +w j )A4 − 18( 3 + 1)w j A1 ( j) − 18( 3 − 1)w01 j A3 , (j ) 01 12 2 01 12 2 k6 = (9 − 3 3) (w j +w j ) − 216w j w j , (j ) ( j) 2 ( j ) 12 k7 = (A5 ) − 8 A3 w j 3, (j ) ( j ) 12 12 2 k8 = 4(3+ 3)A5 w j − 16( 3 + 1)(w j ) , (j ) 2 12 2 k9 = 4(3+ 3) (w j ) , ∆ 1(j ) = (k2(j ) ) 2 − 4k1(j ) k3(j ) , ∆ (2j ) = (k5(j ) )2 − 4k4(j ) k6(j ) , ∆ 3(j ) = (k8(j ) ) 2 − 4k7(j ) k9(j ) , α1(j ) = 6(1 − 3)w01 A1(j ) , α 2(j ) = − 6w01 A2(j ) , j j α 3(j ) = −6(1+ 3)w12j A3(j ) , 12 (j ) α 4(j ) = 3( 3 − 3)(w01 j +w j ) A4 , α 5(j ) = −2(3+ 3)w12j A5(j ) , (12) α *(j ) ,α * (j ) = −k (j ) ± ∆ (j ) 2k (j ) , (α * (j ) ≤ α * (j ) ), 2 2 2 1 1 1 1 * (j ) * (j ) (j ) (j ) 2k4(j ) , (α 3* (j ) ≤ α 4* (j ) ), α 3 ,α 4 = −k5 ± ∆2 α * (j ) ,α * (j ) = −k (j ) ± ∆ (j ) 2k (j ) , (α * (j ) ≤ α * (j ) ). 6 8 3 7 5 6 5 ( ( ( ) ) ) 1204 Pan et al. / J Zhejiang Univ Sci A 2007 8(8):1199-1209 Then it is easy to see that Ai(j ) < 0 (i=1,2,3,4,5), ⇔ 0 < α ≤ min(α1(j ) ,α 3(j )α 4(j ) ,1). k1(j ) > 0, k4(j ) < 0, k7(j ) > 0. In the subinterval [0,π/6], F1(j ) (t ,α ) can be F2(j ) (t ,α ) ≥ 0 , t ∈ [π/6, π/3] max(α 4(j ) ,0) ≤ α ≤ min(α1(j ) ,α 3(j ) ,α 3∗(j ) ,1), or F1(j ) (t ,α )=f 0(j ) + f1(j ) sin t + f 2(j ) cos t , max(α 4(j ) ,α 4∗(j ) ,0) ≤ α ≤ min(α1(j ) ,α 3(j ) ,1). (∆2(j ) ≥ 0) where 01 f 0(j ) = −6(2 + 3)w01 j + α [(7+3 3 + h1 )w j 01 f1(j ) = 6(2 + 3)w01 j + α [(5+3 3 − 3h1 )w j 12 + (5 + 3 3 − h1 )(w20 j − w j )], = 6(2 + 3)w + α [ − (5+3 3 + h1 )w 01 j 01 j Then we can see from Lemma 1 that F1(j ) (t ,α ) ≥ 0, t∈[0,π/6] if and only if the following three formulae hold synchronously: (1) R0(1) = 2α w01 j ≥ 0; (j ) (j ) (2) R2(1) = 6( 3 − 1)w01 j + α A1 ≥ 0 ⇔ α ≤ α1 ; (3) R1(1) + 2R0(1) R2(1) ≥ 0 ⇔ R1(1) ≥ 0 , or R1(1) < 0 and 2R0(1) R2(1) ≥ (R1(1) ) 2 (j ) 01 (j ) ⇔ 6 w01 j + α A2 ≥ 0 , or 6 w j + α A2 < 0 and H1(j ) (α ) = k1(j )α 2 + k2(j )α + k3(j ) ≤ 0. When the root discriminant ∆1(j ) ≥ 0 of the quadratic polynomial H1(j ) (α ), H1(j ) (α ) has the zeroes α1* (j ) and α 2* (j ) . So combining (1) and (2), we get F1(j ) (t ,α ) ≥ 0 , t∈[0,π/6] (∆1(j ) < 0) F1(j ) (t ,α ) ≥ 0 , t∈[0,π/6] ⇔ 0 < α ≤ min(α1(j ) ,α 2(j ) ,1), or max(α 2(j ) ,α1∗(j ) ,0) ≤ α ≤ min(α1(j ) ,α 2∗(j ) ,1). (∆1(j ) ≥ 0) Similarly, using Lemmas 2 and 3 on F2(j ) (t ,α ) and F3(j ) (t ,α ) respectively gives (∆3(j ) < 0) F3(j ) (t ,α ) ≥ 0 , t ∈ [π/3,π/2] ⇔ 0 < α ≤ min(α 3(j ) ,α 5(j ) ,1) , or max(α 5(j ) ,α 5∗(j ) ,0) ≤ α ≤ min(α 3(j ) ,α 6∗(j ) ,1) . (∆3(j ) ≥ 0) Summarizing the results on the above three subintervals, if we denote 12 + (5 + 3 3 − h1 )(w20 j + w j )]. ⇔ 0 < α ≤ min(α1(j ) ,α 2(j ) ,1). F3(j ) (t ,α ) ≥ 0 , t ∈ [π/3,π/2] ⇔ 0 < α ≤ min(α 3(j ) ,α 5(j ) ,1) . 12 − (5 + 3 3 − h1 )(w20 j + w j )], f (∆2(j ) < 0) ⇔ 0 < α ≤ min(α1(j ) ,α 3(j )α 4(j ) ,1), or written as (j ) 2 F2(j ) (t ,α ) ≥ 0 , t ∈ [π/6, π/3] α l(1j ) = 0, α l(2j ) = max(α 2(j ) ,α1* (j ) ,0), (j ) (j ) (j ) (j ) * (j ) α l 3 = max(α 4 ,0), α l 4 = max(α 4 ,α 4 ,0), (j ) (j ) * (j ) (j ) (j ) (j ) α l 5 = max(α 5 ,α 5 ,0), α l 6 = max(α l 2 ,α l 3 ), α (j ) = max(α (j ) ,α (j ) ), α (j ) = max(α (j ) ,α (j ) ), l2 l4 l8 l2 l5 l7 α l(9j ) = max(α l(3j ) ,α l(5j ) ), α l(10j ) = max(α l(4j ) ,α l(5j ) ), (j ) (j ) (j ) (j ) (j ) (j ) (j ) (j ) α l11 = max(α l 2 ,α l 3 ,α l 5 ), α l12 = max(α l 2 ,α l 4 ,α l 5 ), (j ) (j ) (j ) (j ) (j ) (j ) α r1 = min(α1 ,α 2 ,α 3 ,α 4 ,α 5 ,1), α (j ) = min(α (j ) ,α * (j ) ,α (j ) ,α (j ) ,α (j ) ,1), 1 2 3 4 5 r2 ( ) ( ) ( ) ( ) ( ) j j j j * j α r 3 = min(α1 ,α 2 ,α 3 ,α 3 ,α 5(j ) ,1), (j ) (j ) (j ) (j ) (j ) (13) α r 4 = min(α1 ,α 2 ,α 3 ,α 5 ,1), (j ) (j ) (j ) (j ) (j ) * (j ) α r 5 = min(α1 ,α 2 ,α 3 ,α 4 ,α 6 ,1), α (j ) = min(α (j ) ,α ∗(j ) ,α (j ) ,α ∗(j ) ,α (j ) ,1), 1 2 3 3 5 r6 (j ) (j ) (j ) (j ) ∗(j ) α r 7 = min(α1 ,α 2 ,α 3 ,α 5 ,1), (j ) (j ) (j ) (j ) ∗(j ) ∗(j ) α r 8 = min(α1 ,α 2 ,α 3 ,α 4 ,α 6 ,1), (j ) ∗(j ) ( j) ( j) ( j) * (j ) α r 9 = min(α1 ,α 2 ,α 3 ,α 3 ,α 6 ,1), α (j ) = min(α (j ) ,α (j ) ,α (j ) ,α * (j ) ,1), 1 2 3 6 r10 j) α r(11 = min(α1(j ) ,α 2∗( j ) ,α 3(j ) ,α 3∗(j ) ,α 6∗(j ) ,1), (j ) (j ) (j ) ∗(j ) ∗(j ) α r12 = min(α1 ,α 2 ,α 3 ,α 6 ,1), and set ∗(j ) (j ) B1 = {α | 0 < α ≤ α r1 }, ∗(j ) (j ) (j ) Bi = {α | α li ≤ α ≤ α ri }, i =2,3,...,12, we can state the following (14) 1205 Pan et al. / J Zhejiang Univ Sci A 2007 8(8):1199-1209 Let { Pi }ij=+j2−1 be convex data points in Theorem 1 the plane and any three consecutive points are not collinear, let Tj (t ,α ) (0≤t≤π/2) be the uniform α-trigonometric polynomial interpolating curve segment defined by Eq.(10), then there are no inflection points on Tj (t ,α ) (0≤t≤π/2) if and only if α ∈ U ∗j , where Then calculating the wedge product of both sides of the above equation with aj+2 gives 12 −α w20 j (t 2 +cost2 − t1 − cost1 ) / π + α w j (sint2 −cost2 − sint1 + cost1 ) / π + [S (t2 ) − S (t1 )] ⋅[(1 − 2α / π)w12j + α (1/2 − 1/ π)w20 j ] = 0. (15) But, when w20 j ≥ 0, Eq.(15) can be written as (1) When ∆1(j ) , ∆2(j ) , ∆3(j ) < 0, U ∗j = B1∗(j ) ; (2) When ∆1(j ) ≥ 0 and ∆2(j ) , ∆3(j ) < 0, ∗ j ∗(j ) 1 U =B ∗(j ) 2 ∪B −2cost2 + 2cost1 +sint2 − sint1 )w20 j / π + [S (t2 ) − S (t1 )] ; (3) When ∆ ≥ 0 and ∆ , ∆ < 0, (j ) 2 (j ) 1 (j ) 3 (4) When ∆3(j ) ≥ 0 and ∆1(j ) , ∆2(j ) < 0, U ∗j = B1∗(j ) ∪ B5∗(j ) ; (5) When ∆1(j ) , ∆2(j ) ≥ 0 and ∆3(j ) < 0, (6) When ∆1( j ) , ∆3( j ) ≥ 0 and ∆2( j ) < 0, U ∗j = B1∗(j ) ∪ B2∗(j ) ∪ B5∗(j ) ∪ B8∗(j ) ; (7) When ∆ ,∆ ≥ 0 and ∆ < 0, , (j ) 1 U ∗j = B1∗(j ) ∪ B3∗(j ) ∪ B4∗(j ) ∪ B5∗(j ) ∪ B9∗(j ) ∪ B10∗(j ) ; 12 (8) When ∆1(j ) , ∆2(j ) , ∆3(j ) ≥ 0, U ∗j = ∪ Bi∗(j ) . i =1 ∗(j ) i Substituting “<” for “≤” in B (16) and, when w20 j < 0, if we choose α satisfying U ∗j = B1∗(j ) ∪ B2∗(j ) ∪ B3∗(j ) ∪ B4∗(j ) ∪ B6∗(j ) ∪ B7∗(j ) ; (j ) 3 ⋅[(1 − 2α / π)w12j + α (1/2 − 1/ π)w20 j ]=0. The left side of Eq.(16) is larger than zero because of the monotonicity of the function S (t ) on [0,π/2] and Eq.(11). This contradiction shows that there are no double points on the curve segment Tj (t ,α ) (0≤t≤π/2); U ∗j = B1∗(j ) ∪ B3∗(j ) ∪ B4∗(j ) ; (j ) 2 α (w12j − w20j )(sint2 − cost2 − sint1 + cost1 ) / π + α (t1 − t2 (i=1,2,…,12), and denoting the corresponding sets as Bi(j ) (i=1,2,…,12), U ∗j in Lemma 1 as Uj, then when α∈Uj, M j (t ,α ) >0, that is ∂ T j (t ,α )/∂t ≠ 0, which indicates that there are no cusp points on the curve segment Tj (t ,α ) (0≤t≤π/2). Next, let us consider the double points on this curve segment. Suppose that there exist t1, t2, 0≤t1<t2≤ π/2 such that Tj (t1 ,α ) = Tj (t2 ,α ). From Eq.(10), after a simple calculation, we have α a j (t2 +cost2 − t1 − cost1 ) / π + α a j +1 (sint2 − cost2 − sint1 +cost1 ) / π + α a j + 2 (t2 − sint2 − t1 +sint1 ) / π + [S (t2 ) −S (t1 )][(1 − 2α / π)a j +1 − α (1/2 − 1/ π)(a j + a j + 2 )] = 0. 0 < α ≤ α 0(j ) = min {πw12j [2w12j + (1 − π / 2)w20 j ],1} , then the left side of Eq.(15) is larger than zero. So the same reasoning shows the inexistence of double points on the curve segment Tj (t ,α ) (0≤t≤π/2). Combining the above discussion and Theorem 1, if we let V j = {α | 0 < α ≤ α 0(j ) } , (17) we can state the following Theorem 2 Let { Pi }ij=+j2−1 and Tj (t ,α ) (0≤t≤π/2) be the same as in Theorem 1, if according to the different cases in Theorem 1, we choose Dj as follows: Dj = U j , Dj = U j ∩ Vj , (w20 j ≥ 0). (w20 j < 0 ). (18) (19) Then, when α∈Dj, the corresponding curve segment T j (t ,α ) (0≤t≤π/2) is convex and C2-continuous. Convexity of α-trigonometric polynomial interpolating curve T(u, α) (u1≤u≤un) 1. Taking uniform shape parameter for each curve segment 1206 Pan et al. / J Zhejiang Univ Sci A 2007 8(8):1199-1209 From Section 3.1, we can get n Theorem 3 Let { Pi }i= 1 be convex data points in the plane, with any three consecutive points being not collinear; suppose that P0 and Pn+1 are two auxiliary data points introduced according to the method of (Tai and Wang, 2004) and T(u, α) (u1≤u≤un) is the uniform α-trigonometric polynomial curve defined by Eq.(7). If the shape parameter α satisfies n −1 α ∈ ∩ Dj , Dj−1=Dj={α|α=0}. So, Tj−1(u,α) and Tj(u,α) are reduced to the straight line segments Pj−1Pj and PjPj+1 respectively. If we take the uniform shape parameter for each curve segment according to Eq.(20), then α=0, and T(u,0) (u1≤u≤un) is reduced to the polygon P1P2…Pn connecting the data points {Pi }in=1 . Pj+1 Pj Pj−1 (20) j =1 Pj+2 then the whole curve T(u, α) (u1≤u≤un) is convex and C2-continuous. Proof From Theorem 2 we can see each segment Tj(u,α) (uj≤u≤uj+1), j=1,2,…,n−1 of the curve T(u,α) n −1 (u1≤u≤un) with the shape parameter α ∈ ∩ D j is j =1 convex. Also, from Eq.(8) and the fact that trigonometric polynomial curve is convexity-preserving about its control polynomial (Zhang, 1997), we can conclude there are no cusp points on the curve T(u,α) (u1≤u≤un). When the variable u∈[uj,uj+1], substituting t=π/4 into Eq.(10) gives T j (π/4,α ) = ( Pj + Pj +1 )/2 + α ( 2 − 1)/π ⋅ [( Pj + Pj +1 )/2 − ( Pj −1 + Pj + 2 )/2]. Since 0<α<1, it is easy to prove that each data point Pj (j=1,2,…,n) is not the inflection point of T(u,α) (u1≤u≤un). Again, the definition of T(u,α) and the fact of T(u,α)∈C2[u1,un] reveal that the joint point between any two consecutive curve segments Tj(u,α) and Tj+1(u,α) (j=1,2,…,n−2) do not comprise a double point. So, curve T(u,α) (u1≤u≤un) is convex. Remark In Theorems 1~3, we suppose that any n are not colthree consecutive points among { Pi }i= 1 Pj−2 Fig.1 Three collinear consecutive points Pj−1, Pj, Pj+1 2. Taking respective shape parameters for each curve segment In practical applications, when there is a large number of data points, and some parameter value ranges Dj calculated according to Eq.(18) or Eq.(19) are very small, α obtained by Eq.(20) will be small (close to zero). Then, the curve T(u,α) (u1≤u≤un) cannot reveal the information of some curve segments, and lacks flexibility. In this subsection, we will improve the algorithm in Section 3.2.1 and obtain a more useful convexity-preserving algorithm. That is, for each curve segment Tj(u,α) (uj≤u≤uj+1), j=1,2,…, n−1, we may select the respective shape parameter α *j such that α *j ∈ D j . Accordingly, write each curve segment as T j (u,α *j ) (uj≤u≤uj+1), the whole curve as T(u) (u1≤u≤un), and the singular polygon as L(u) (u1≤u≤un), each of which is L j (u ,α *j ). It is worthwhile to note that at this time the singular polygon here is discontinuous, however, T(u) is a convexity-preserving interpolating curve with G1 continuity and each curve segment T j (u ,α *j ) ∈ C 2 [u j ,u j +1 ] [see Section 5 of ∩ D j = ∅ or ∩ D j = {α|α=0}. If there are three (Tai and Wang, 2004)]. It is more suitable for application than the curve T(u,α) (u1≤u≤un) defined in Section 3.2.1, with the uniform shape parameter α (see the examples in Section 5). points Pj−1, Pj and Pj+1 (j≥2) collinear (Fig.1), the case is trivial: as the curve segments Tj−1(u,α) (uj−1≤u≤uj) and Tj(u,α) (uj≤u≤uj+1), w12j −1 = w01 j = [a j , a j +1 ] = 0 CONVEXITY-PRESERVING INTERPOLATION RELATIVE TO GENERAL DATA POINTS linear. This supposition is necessary to avoid n −1 n −1 j =1 j =1 hold, so α3(j −1) = α1(j ) = 0 from Eq.(12), and then α (j −1) ri = α = 0 in Eq.(13) (i=1,2,…,12). That is, (j ) ri In this section, we will discuss the convexitypreserving interpolation relative to general data points. 1207 Pan et al. / J Zhejiang Univ Sci A 2007 8(8):1199-1209 The detail is as follows. Search starting from P1, we find the first convex subset I1 = { P1 P2 ... Pi1 } of the data points according to Definition 1; as I1 = { P1 P2 ... Pi1 } seems to be the same as { Pi }in=1 in Example 1 The data points are shown in Table 1, and the corresponding interpolating curves with different values of shape parameter α are plotted in Fig.2. Section 2, we can obtain the auxiliary point P0; then search starting from Pn reversely, we find the last convex subset I m = { Pim−1 Pim−1 +1 ... Pn } of the data points according to Definition 1, similarly, we can obtain the auxiliary point Pn+1. Next, using { Pi }in=+01 as the control vertices, we construct a uniform trigonometric polynomial curve C(u) by method similar to the one mentioned in Section 2. Finally, we construct uniform α-trigonometric polynomial convexity-preserving interpolating curve relative to the general data points. Noting that construction of the jth curve segment, interpolation of the data points Pj and Pj+1, of the α-trigonometric polynomial interpolating curve, must use the points Pj−1, Pj, Pj+1, Pj+2 (j=1,2,…,n−1). If the point set {Pj−1PjPj+1Pj+2} (j=1,2,…,n−1) is convex, the range of the shape parameter α: Dj, which makes the jth curve segment convex, can be obtained according to the algorithms in Section 3.1; else, we take n −1 Dj={α|0<α<1}. Thus, when taking α ∈ ∩ D j , the j =1 corresponding curve T(u,α) (u1≤u≤un) defined by Eq.(7) is convexity-preserving and interpolates n with C2 continuity. { Pi }i= 1 On the other hand, similar to Section 3.2.2, for each curve segment Tj(u,α) (uj≤u≤uj+1), j=1,2,…,n−1, we may select the respective shape parameter α *j such that α *j ∈ D j . Then T(u) (u1≤u≤un) is a convexitypreserving interpolating curve with G1 continuity and each curve segment T j (u ,α *j ) ∈ C 2 [u j ,u j +1 ] (j=1,2,…, n−1). NUMERICAL EXAMPLES In this section, we will give some numerical examples; in each example, the data points are marked with small black points, we depict α-trigonometric polynomial interpolating curve. In Examples 3 and 4, we also give the corresponding curvature plot. (a) (b) (c) (d) Fig.2 α-trigonometric polynomial interpolating curve with given α. (a) α=0.9; (b) α=0.74; (c) Each segment having respective shape parameter αj* (j=1,2,3); (d) α=0.44301 Table 1 The data points in Fig.2 xn yn 12 28.7 23 13 25.7 12 43.5 19.4 Fig.2a shows the result with the uniform shape parameter α=0.9. There is a double point on the α-trigonometric polynomial interpolating curve. Fig.2b shows the result with the uniform shape parameter α=0.74, there is a cusp point on the α-trigonometric polynomial interpolating curve. Fig.2c shows the result with respective shape parameter for each curve segment, where D1=D3= {α|0<α<1}, D2={α|0<α<0.44302} according to Theorems 1 and Theorem 2; and we take α 1* = 0.99, α 2* = 0.44301, α3* = 0.99, which avoids cusp and double points, and the α-trigonometric polynomial interpolating curve is convexity-preserving. Fig.2d shows the result with the uniform shape parameter α= 0.44302. The α-trigonometric polynomial interpolating curve is convexity-preserving. Apparently, Fig.2c has better convexity-preserving effect than Fig.2d. Example 2 The data points are shown in Table 2, and the corresponding interpolating curves with different α are plotted in Fig.3. Table 2 The data points in Fig.3 xn yn 7.2 24.6 10.6 7.8 17.6 7.5 28.6 8.4 32.2 21.0 1208 Pan et al. / J Zhejiang Univ Sci A 2007 8(8):1199-1209 (a) (b) (a) (b) k(u) 0.168892 0 −0.115397 (c) π/2 Fig.3 α-trigonometric polynomial interpolating curve with given α. (a) α=0.8; (b) Each segment having respective shape parameter αj* ( j=1,2,3,4); (c) α=0.204647 α 4* = 0.725502; the α-trigonometric polynomial interpolating curve is convexity-preserving. Fig.3c shows the result with the uniform shape parameter α= 0.204647, where the α-trigonometric polynomial interpolating curve is convexity-preserving. Apparently, Fig.3b has better convexity-preserving effect than Fig.3c. Example 3 The data points are taken from (Fletcher and McAllister, 1990) and shown in Table 3, and the corresponding interpolating curves with different α are plotted in Fig.4. Table 3 The data points in Fig.4 xn yn 0 0 6 13 15 −6 −6 −2 16 14 20 16 24 14 Fig.4 shows the convexity-preserving α-trigonometric polynomial interpolating curves and their curvature plots. According to Theorems 1 and 2, we can get Dj={α|0<α<1}, j=1,2,6; D3={α|0<α< 0.733471}, D5={α|0<α<0.603574}, and the 4th segment is an intergradation between two convex subsets of the data points, and we take D4={α|0<α<1}. Fig.4a shows the result with the respective shape parameter for each curve segment, here, α *j = 0.99, j=1,2,6, 3π/2 2π 5π/2 3π 7π/2 4π u (c) 0.059104 k(u) Fig.3a shows the result with the uniform shape parameter α=0.8. There are inflection points on the α-trigonometric polynomial interpolating curve. Fig.3b shows the result with respective shape parameter for each curve segment, where D1={α|0<α<1}, D2={α|0<α<0.204648}, D3={α|0<α<0.244841}, D4= {α|0<α<0.725503} according to Theorems 1 and 2; and we take α1* = 0.99, α 2* = 0.204647, α 3* = 0.24484, π 0 −0.067570 π/2 π 3π/2 2π 5π/2 3π u 7π/2 4π (d) Fig.4 α-trigonometric polynomial interpolating curve and their curvature plots k(u). (a) Each segment having respective shape parameter; (b) The whole curve having the uniform shape parameter; (c) The curvature plots of curve in (a) with kmax=0.168892, kmin= −0.115397; (d) The curvature plots of curve in (b) with kmax=0.059104, kmin=−0.067570 α 3* = 0.733470, α 4* = 0.5, α 5* = 0.6. We must point out that the value of α 4* does not affect the convexitypreserving property of α-trigonometric polynomial interpolating curve, considering that α-trigonometric polynomial curve is constructed by blending a parametrized polygon and the trigonometric polynomial curve, we might as well take α 4* =0.5. Fig.4b shows the result with the uniform shape parameter α=0.6. Fig.4c shows the curvature plots of Fig.4a with kmax=0.168892 and kmin=−0.115397. Fig.4d shows the curvature plots of Fig.4b with kmax=0.059104 and kmin=−0.067570. Example 4 The data points are taken from the cycloid x = a (θ − sinθ ), a = 100, 0 ≤ θ ≤ 2π, y = a (1 − cosθ ), where θ = iπ/5, i = 0, 1, 2, … , 10. Pan et al. / J Zhejiang Univ Sci A 2007 8(8):1199-1209 Fig.5 shows the convexity-preserving α-trigonometric polynomial interpolating curve with the respective shape parameter for each curve segment (Fig.5a) and its curvature plot (Fig.5b). According to Theorems 1 and 2, here, Dj={α|0<α<1} (j=1,3,4,5,6,7, 8,10), D2=D9={α|0<α<0.543712}, and we take α *j = 0.99 (j=1,3,4,5, 6,7,8,10), α 2* = α 9* = 0.543711. It is easy to see that for transcendental curves, the effect of our method is very good. y 200 x 0 100π 200π (a) k(u) 0 −0.000012 1209 Koch, P.E., Lyche, T., Neamtu, M., Schumaker, L.L., 1995. Control curves and knot insertion for trigonometric splines. Adv. Comp. Math., 3:405-424. Loe, K.F., 1996. α-B-spline: a linear singular blending B-spline. The Visual Computer, 12:18-25. [doi:10.1007/ BF01782216] Lyche, T., Winther, R., 1979. A stable recurrence relation for trigonometric B-splines. J. Approx. Theory, 25: 266-279. [doi:10.1016/0021-9045(79)90017-0] Peña, J.M., 1997. Shape preserving representations for trigonometric polynomial curves. Computer Aided Geometric Design, 14(1):5-11. [doi:10.1016/S0167-8396(96)00017-9] Schoenberg, I.J., 1964. On trigonometric spline interpolation. J. Math. Mech., 13(5):795-825. Tai, C.L., Wang, G.J., 2004. Interpolation with slackness and continuity control and convexity-preservation using singular blending. J. Comput. Appl. Math., 172(2):337-361. [doi:10.1016/j.cam.2004.02.015] Walz, G., 1997a. Some identities for trigonometric B-splines with application to curve design. BIT Numer. Math., 37:189-201. [doi:10.1007/BF02510180] Walz, G., 1997b. Trigonometric Bézier and stancu polynomials over intervals and triangles. Computer Aided Geometric Design, 14:393-397. [doi:10.1016/S0167-8396(96) 00061-1] −0.135341 π/2 π 3π/2 2π 5π/2 3π 7π/2 4π 9π/2 5π 11π/2 u (b) Fig.5 (a) α-trigonometric polynomial interpolating curve with the respective shape parameter for each curve segment; (b) The curvature plot k(u) of curve in (a) with kmax=−0.000012, kmin=−0.135341 Wang, G.Z., Chen, Q.Y., 2004. NUAT B-spline curves. Computer Aided Geometric Design, 21:193-205. [doi:10. 1016/j.cagd.2003.10.002] Wang, G.Z., Li, Y.J., 2006. Optimal properties of the uniform algebraic trigonometric B-splines. Computer Aided Geometric Design, 23:226-238. [doi:10.1016/j.cagd.2005. 09.002] Zhang, J.W., 1996. C-curves: an extension of cubic curves. Computer Aided Geometric Design, 13(3):199-217. [doi:10.1016/0167-8396(95)00022-4] References Chang, G.Z., 1995. The Mathematics of Surfaces. Hunan Education Press, Changsha, p.15 (in Chinese). Farin, G., 2005. Curves and Surfaces for Computer Aided Geometric Design: A Practical Guide (5th Ed.). Morgan Kaufmann Publishers, San Diego, p.420. Fletcher, Y., McAllister, D.F., 1990. Automatic tension adjustment for interpolation splines. IEEE Computer Graph. Appl., 10(1):10-17. [doi:10.1109/38.45805] Zhang, J.W., 1997. Two different forms of C-B-splines. Computer Aided Geometric Design, 14(1):31-41. [doi:10. 1016/S0167-8396(96)00019-2] Zhang, J.W., Krause, F.L., 2005. Extend cubic uniform B-splines by unified trigonometric and hyberolic basis. Graph. Models, 67(2):100-119. [doi:10.1016/j.gmod.2004. 06.001] Zhang, J.W., Krause, F.L., Zhang, H.U., 2005. Unifying C-curves and H-curves by extending the calculation to complex numbers. Computer Aided Geometric Design, 22:865-883. [doi:10.1016/j.cagd.2005.04.009]