TSWJ The Scientific World Journal 1537-744X Hindawi Publishing Corporation 391568 10.1155/2014/391568 391568 Research Article Local Convexity-Preserving C 2 Rational Cubic Spline for Convex Data http://orcid.org/0000-0002-0491-1528 Abbas Muhammad 1 Abd Majid Ahmad 2 Ali Jamaludin Md. 2 De Marchi S. Tan J. 1 Department of Mathematics, University of Sargodha, Sargodha 40100 Pakistan uos.edu.pk 2 School of Mathematical Sciences, Universiti Sains Malaysia, 11800 George Town, Penang Malaysia usm.my 2014 1332014 2014 31 08 2013 10 02 2014 13 3 2014 2014 Copyright © 2014 Muhammad Abbas et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

We present the smooth and visually pleasant display of 2D data when it is convex, which is contribution towards the improvements over existing methods. This improvement can be used to get the more accurate results. An attempt has been made in order to develop the local convexity-preserving interpolant for convex data using C 2 rational cubic spline. It involves three families of shape parameters in its representation. Data dependent sufficient constraints are imposed on single shape parameter to conserve the inherited shape feature of data. Remaining two of these shape parameters are used for the modification of convex curve to get a visually pleasing curve according to industrial demand. The scheme is tested through several numerical examples, showing that the scheme is local, computationally economical, and visually pleasing.

1. Introduction

In computer graphics, a designer in industries needs to generate splines which can interpolate the data points in such a way that they conserve the inherited shape characteristics (positivity, monotonicity, and convexity) of data. Among the properties that the spline for curves and surfaces need to satisfy, smoothness and shape preservation of given data are mostly needed by all the designers. Convexity is a substantial shape characteristic of the data. The significance of the convexity-preserving interpolation problems in industry cannot be denied. A number of examples can be quoted in this regard, like the modelling of cars in automobile industry, aeroplane, and ship design. A crumpled curve is an unwanted characteristic. Human aesthetic sense demands convexity-preserving nice and smooth curves without wiggles . Convexity should also be upheld in many applications including nonlinear programming problems occurring in engineering, telecommunication system design, approximation of functions, parameter estimation, and optimal control. The traditional cubic spline schemes have been used for quite a long time to deal with the problems of constructing smooth curves that passes through given data points. However, these splines sometimes fail to conserve the inherited shape characteristics because of unwanted oscillations that are not suitable for design purpose.

Some work [111, 13] on shape preservation has been published in recent years. Abbas et al. [2, 4, 5] discussed the problem of local convexity-preserving data visualization using C 1 piecewise rational cubic and bicubic function with three shape parameters. The authors derived the data dependent conditions for single shape parameter to get the convexity preserving curve and remaining shape parameters were used for the modification of convex curve to obtain a visually pleasing curve. Brodlie and Butt  solved the problem of shape preserving of convex data by using the cubic Hermite interpolation. The authors inserted one or two extra knots in the interval where the shape of data was not conserved. Costantini  solved the shape preserving of boundary valued problems using polynomial spline interpolation with arbitrary constraints. Duan et al.  developed rational interpolation based on function values and also discussed constrained control of the interpolating curves. They obtained conditions on function values for constraining the interpolating curves to lie above, below, or between the given straight lines. The authors assumed suitable values of parameters to obtain C 2 continuous curve and the method works for only equally spaced data.

Fiorot and Tabka  used C 2 cubic polynomial spline to conserve the shape of convex or monotone data. The authors obtained the values of derivative parameters by solving three systems of linear equations. Hussain et al.  addressed the problem of shape preserving C 2 rational cubic spline for positive and convex data. Simple data dependent constraints were derived for free parameters used in the description of rational cubic function to achieve the desired shape of the data. The scheme provided a limited freedom to designer to obtain a visually pleasing display of the data. Lamberti and Manni  presented and investigated the approximation order of a global C 2 shape preserving interpolating function using parametric cubic curves. The tension parameters were used to control the shape of curve. The authors derived the necessary and sufficient conditions for convexity whereas only sufficient conditions for positivity and monotonicity of data. Sarfraz et al.  developed a C 2 rational cubic spline with two families of free parameters for positive, monotone, and convex curve. Sufficient data dependent constraints were made for free parameters to maintain the shape of data. The scheme did not provide a liberty to designer for the refinement of positivity, monotonicity, and convexity-preserving curves.

Every developed method needs improvements or modifications to meet the required conditions. It can be used to get more accurate results. Many researchers can use new techniques to get more accurate results which are the contribution for the advancement of such results. The technique used in this paper is also a contribution to achieve the goal and has many prominent features over existing schemes.

In this work, the degree of smoothness is C 2 continuity while, in [2, 13], it is C 1 .

In , the authors developed the scheme to achieve the desired shape of data by inserting extra knots between any two knots in the interval while we conserve the shape of convex data by only imposing constraints on free parameters without any extra knots.

In , the authors developed schemes that work for equally spaced data while the proposed scheme works for both equally and unequally spaced data.

The authors  assumed the certain function values and derivative values to control the shape of the data while, in this paper, data dependent constraints for the free parameters in the description of rational cubic function are used to achieve the required shape of the data.

The authors  achieved the values of derivative parameters by solving the three systems of linear equations, which is computationally expensive as compared to methods developed in this paper where there exists only one tridiagonal system of linear equations for finding the values of derivative parameters.

Experimental and interpolation error analysis evidence suggests that the scheme is not only local in comparison with global scheme  and computationally economical but also produces smoother graphical results as compared to [9, 11].

In , the interpolant does not allow the designer to modify the convex curve as per industrial demands to obtain a visually pleasing curve while in this paper two out of three shape parameters are left free for designer to refine the convexity preserving curve as desired.

The proposed curve scheme is unique in its representation and applicable equally well for the data with derivatives or without derivatives.

The proposed scheme is not concerned with an arbitrary degree; it is a rational cubic spline in the form of cubic/quadratic and by particular setting of shape parameters; it reduces to a standard cubic Hermite spline.

This paper is organized as follows. A C 2 piecewise rational cubic function with three shape parameters is rewritten in Section 2. Local convexity-preserving rational cubic spline Interpolation is discussed in Section 3. Error estimation of interpolation is discussed in Section 5. Sufficient numerical examples and discussion are given in Section 4 to prove the worth of the scheme. The concluding remarks are presented to end the paper.

2. Rational Cubic Spline Function

Let { ( x i , f i ) : i = 0,1 , 2 , , n } be the given set of data points such that x 0 < x 1 < x 2 < < x n . A piecewise rational cubic function  with three shape parameters in each subinterval I i = [ x i , x i + 1 ] ,    i = 0,1 , 2 , , n - 1 , is defined as (1) S ( x ) = S i ( x ) = i = 0 3 ( 1 - θ ) 3 - i θ i ξ i q i ( θ ) with (2) ξ 0 = u i f i , ξ 1 = f i ( 2 u i + v i + w i ) + u i h i d i , ξ 2 = f i + 1 ( u i + 2 v i + w i ) - v i h i d i + 1 , ξ 3 = v i f i + 1 , q i ( θ ) = ( 1 - θ ) 2 u i + θ ( 1 - θ ) ( w i + u i + v i ) + θ 2 v i , where h i = x i + 1 - x i , θ = ( x - x i ) / h i , θ [ 0,1 ] , and u i , v i , and w i are the positive shape parameters that are used to control the shape of interpolating curve and provide the designer liberty to refine the curve as desired. Let d i denote the derivative value at knots x i that is used for the smoothness of curve. Let S ( x ) and S ′′ ( x ) denote the first and second ordered derivatives with respect to x .

The following interpolatory conditions are imposed for the C 2 continuity of the piecewise rational cubic function (1): (3) S ( x i ) = f i , S ( x i + 1 ) = f i + 1 , S ( x i ) = d i , S ( x i + 1 ) = d i + 1 , S ′′ ( x i + ) = S ′′ ( x i - ) , i = 1,2 , , n - 1 with (4) S ′′ ( x i + ) = 2 ( ( u i + 2 v i + w i ) Δ i - v i d i + 1 - ( u i + v i + w i ) d i ) h i u i , S ′′ ( x i - ) = ( 2 ( u i - 1 d i - 1 + ( u i - 1 + v i - 1 + w i - 1 ) d i ( Δ i - 1 ) = 33 3 3 - ( 2 u i - 1 + v i - 1 + w i - 1 ) Δ i - 1 ) ) = × ( h i - 1 v i - 1 ) - 1 .

From (3), the C 2 interpolating conditions produce the following system of linear equations: (5) α i d i - 1 + δ i d i + γ i d i + 1 = λ i with (6) α i = u i u i - 1 h i , δ i = h i u i ( u i - 1 + v i - 1 + w i - 1 ) + h i - 1 v i - 1 ( u i + v i + w i ) , γ i = v i v i - 1 h i - 1 , λ i = v i - 1 h i - 1 ( u i + 2 v i + w i ) Δ i + u i h i ( 2 u i - 1 + v i - 1 + w i - 1 ) Δ i - 1 , where Δ i = ( f i + 1 - f i ) / h i . The C 2 piecewise rational cubic function (1) is reformulated after using (2) as (7) S ( x i ) = p i ( θ ) q i ( θ ) with (8) p i ( θ ) = u i f i ( 1 - θ ) 3 + ( f i ( 2 u i + v i + w i ) + u i h i d i ) × θ ( 1 - θ ) 2 + ( f i + 1 ( u i + 2 v i + w i ) - v i h i d i + 1 ) × θ 2 ( 1 - θ ) + v i f i + 1 θ 3 , q i ( θ ) = ( 1 - θ ) 2 u i + θ ( 1 - θ ) ( w i + u i + v i ) + θ 2 v i .

Remark 1 (see [<xref ref-type="bibr" rid="B3">3</xref>]).

The system of linear equations defined in (5) is a strictly tridiagonal and has a unique solution for the derivatives parameters d i , i = 1,2 , , n - 1 for all u i , v i > 0 and w i 0 . Moreover, it is efficient to apply LU decomposition method to solve the system for the values of derivatives parameters d i s .

Remark 2 (see [<xref ref-type="bibr" rid="B3">3</xref>]).

To make the rational cubic function smoother, C 2 continuity is applied at each knot. The system (5) involves n - 1 linear equations while unknown derivative values are n + 1 . So, two more equations are required for unique solution. For this, we impose end conditions at end knots as (9) S ( x 0 ) = d 0 , S ( x n ) = d n .

Remark 3 (see [<xref ref-type="bibr" rid="B3">3</xref>]).

For the values of shape parameters set as u i = 1 , v i = 1 , and w i = 0 in each subinterval I i = [ x i , x i + 1 ] , i = 0,1 , 2 , , n - 1 , the rational cubic function reduces to standard cubic Hermite spline .

3. Local Convexity-Preserving Rational Cubic Spline Interpolation

In this section, we discuss the solution of convexity-preserving problem by using C 2 rational cubic function with three shape parameters. For this problem, we impose appropriate constraints on single shape parameter to conserve the shape of convex data. This requires some mathematical arguments so that the required shape of data is achieved.

Let { ( x i , f i ) : i = 0,1 , 2 , , n } be the given convex data set. This data set is said to be convex if (10) Δ i < Δ i + 1 , i = 0,1 , , n - 2 .

In similar way, it is concave if (11) Δ i > Δ i + 1 , i = 0,1 , , n - 2 .

For strictly convex curves, necessary condition for derivative parameters to obtain the smoothness is (12) d 0 < Δ 0 < d 1 < < Δ i - 1 < d i < Δ i < < d n .

For concave data we have (13) d 0 > Δ 0 > d 1 > > Δ i - 1 > d i > Δ i > > d n .

Necessary conditions for convexity are (14) u i > 0 , v i > 0 , w i 0 , ( Δ i - d i ) > 0 , ( d i + 1 - Δ i ) > 0 .

Now the C 2 rational cubic function S i ( x ) , defined in (7), is convex if and only if S i ′′ ( x ) > 0 such that (15) S i ′′ ( x ) = k = 0 5 ( 1 - θ ) 5 - k θ k C k , i h i ( q i ( θ ) ) 3 with (16) C 0 , i = 2 u i 2 { ( u i + v i ) ( Δ i - d i ) + w i ( Δ i - d i ) - v i ( d i + 1 - Δ i ) } , C 1 , i = C 0 , i + 2 u i 2 ( 5 v i ( Δ i - d i ) + v i d i ) , C 2 , i = C 0 , i + 6 u i ( v i 2 ( d i + 1 - Δ i ) + 2 u i v i ( Δ i - d i ) ) , C 3 , i = C 5 , i + 6 v i ( u i 2 ( Δ i - d i ) + 2 u i v i ( d i + 1 - Δ i ) ) , C 4 , i = C 5 , i + 2 v i 2 ( 5 u i ( d i + 1 - Δ i ) + u i d i + 1 ) , C 5 , i = 2 v i 2 { ( u i + v i ) ( d i + 1 - Δ i ) + w i ( d i + 1 - Δ i ) - u i ( Δ i - d i ) } , S i ′′ ( x ) > 0 if k = 0 5 ( 1 - θ ) 5 - k θ k C k , i > 0 , h i ( q i ( θ ) ) 3 > 0 .

Since u i > 0 , v i > 0 and w i 0 , it follows that h i ( q i ( θ ) ) 3 > 0 : (17) k = 0 5 ( 1 - θ ) 5 - k θ k C k , i > 0 if C k , i > 0 , k = 0,1 , 2,3 , 4,5 .

Hence C k , i > 0 , k = 0,1 , 2,3 , 4,5 , if the shape parameters satisfy the following constraints: (18) u i > 0 , v i > 0 , w i > max { 0 , v i ( d i + 1 - Δ i ) ( Δ i - d i ) , u i ( Δ i - d i ) ( d i + 1 - Δ i ) } .

The above constraints can be rewritten as (19) u i > 0 , v i > 0 , w i = α i + max { 0 , v i ( d i + 1 - Δ i ) ( Δ i - d i ) , u i ( Δ i - d i ) ( d i + 1 - Δ i ) } , α i > 0 .

The above discussion can be summarized as follows.

Theorem 4.

The rational cubic function (7) conserves the C 2 convex curve of strictly convex data in each subinterval [ x i , x i + 1 ] if and only if the shape parameters u i ,    v i , and w i satisfy (19).

4. Numerical Examples and Discussion

In this section, the efficiency of the proposed convexity-preserving scheme through several numerical examples is presented. A comparison of C 2 scheme with PCHIP (piecewise cubic Hermite interpolating polynomial, Built-in MATLAB program) and cubic Hermite spline scheme is also part of this section.

Example 1.

A convex data set is taken in Table 1 which is borrowed from . Figure 1(a) is drawn by cubic Hermite spline scheme  that does not conserve the local convexity through given convex data. Figure 1(b) is generated by PCHIP that does not look smooth because the function has only ability to remove the undulations in shape preserving curves. On the other hand, Figures 1(c) and 1(d) are generated by developed local convexity-preserving C 2 rational cubic function with different values of parameters u i and v i . The effect of shape parameters can be seen by noting the difference in smoothness of the curves in Figures 1(b), 1(c), and 1(d). Numerical results of Figure 1(d) are determined from developed scheme shown in Table 2.

2D convex data set.

i 1 2 3 4 5 6 7
x i −12 −10 −5 0 5 10 12
y i 4 2 0.5 0.25 0.5 2 4

Numerical results of Figure 1(d).

i 1 2 3 4 5 6 7
d i −1.2 −0.7743 −0.1143 0 0.1143 0.7743 1.2
Δ i −1.0 −0.3 −0.05 0.05 0.3 1.0
u i 1.5 1.5 1.5 1.5 1.5 1.5
v i 1.5 1.5 1.5 1.5 1.5 1.5
w i 1.1165 1.0776 0.0598 0.0598 1.0776 1.1165

Convexity- and nonconvexity-preserving curves.

Cubic Hermite spline curve

PCHIP curve

Convexity-preserving rational cubic curve with u i = 0.25 , v i = 0.25

Convexity-preserving rational cubic curve with u i = 1.5 , v i = 1.5

Example 2.

A 2D convex data set is taken in Table 3 which is borrowed from . Figure 2(a) is generated by cubic Hermite spline scheme  that does not maintain the convexity of given data. Figure 2(b) is produced by PCHIP to conserve the convexity of convex data but it looks tight at some data points. Figures 2(c) and 2(d) are generated by convexity-preserving rational cubic interpolant developed in Section 3. A comparison of convexity-preserving curve through convex data in these figures depicts the flaw of the cubic Hermite scheme and tightness of PCHIP. Figure 2(d) looks more pleasant and smooth as compared to Figure 2(b). Numerical results of Figure 2(d) are determined by developed convexity-preserving C 2 rational cubic spline scheme shown in Table 4.

A convex data set.

i x i y i
1 1.0 10.0
2 1.5 7.0
3 1.75 5.0
4 2.0 2.5
5 2.5 1.0
6 3.0 0.6
7 5.0 0.4
8 10.0 1.0
9 10.5 3.0
10 11 5.0
11 12 9.0

Numerical results of Figure 2(d).

i d i Δ i u i v i w i
1 −4.6667 −6.0 1.75 1.75 1.8958
2 −7.2864 −8.0 1.75 1.75 2.3586
3 −9.1942 −10.0 1.75 1.75 0.001
4 −7.8005 −3.0 1.75 1.75 1.0835
5 −1.5996 −0.8 1.75 1.75 0.2874
6 −0.5057 −0.1 1.75 1.75 10.063
7 −0.0737 0.12 1.75 1.75 14.339
8 3.8472 4.0 1.75 1.75 167.23
9 4.0102 4.0 1.75 1.75 155.37
10 3.9991 4.0 1.75 1.75 1.600 e 7
11 4.0

Comparison of convexity- and nonconvexity-preserving curves.

Cubic Hermite curve

PCHIP curve

C 2 convex rational cubic curve with u i = 0.25 , v i = 0.25

C 2 convex rational cubic curve with u i = 1.75 , v i = 1.75

Example 3.

The cubic Hermite spline scheme  and PCHIP have been used to draw Figures 3(a) and 3(b), respectively, through convex data given in Table 5 which is borrowed from . The efficiency of the scheme developed in Section 3 can be seen in Figures 3(c) and 3(d). A remarkable difference in the smoothness with a pleasant graphical view is visible in these figures drawn by PCHIP and proposed rational cubic scheme due to the freedom granted to the designer on the values of shape parameters. Table 6 demonstrates the numerical results computed from the proposed scheme of Figure 3(d).

A convex data set.

i 1 2 3 4 5 6 7
x i −9 −8 −4 0 4 8 9
y i 7 5 3.5 3.25 3.5 5 7

Numerical results of Figure 3(d).

i 1 2 3 4 5 6 7
d i −2.325 −1.644 −0.132 0 0.132 1.644 2.325
Δ i −2 −0.375 −0.062 0.062 0.375 2
u i 1.5 1.5 1.5 1.5 1.5 1.5
v i 1.5 1.5 1.5 1.5 1.5 1.5
w i 5.503 7.902 1.181 1.181 7.902 5.503

Convex and nonconvex curves through given convex data set.

Cubic Hermite curve

PCHIP curve

Local convexity-preserving C 2 rational cubic curve with u i = 0.25 , v i = 0.25

Local convexity-preserving C 2 rational cubic curve with u i = 1.5 , v i = 1.5

Example 4.

A convex data set is taken in Table 7. A nonconvex curve from this given data is drawn in Figure 4(a) by cubic Hermite scheme . Figure 4(b) is produced by using PCHIP to conserve the shape of curve but the visual model looks tight as compared to proposed rational model, whereas Figures 4(c) and 4(d) are generated by convexity-preserving rational cubic function developed in Section 3. A comparison of convexity-preserving curve in these figures depicts the flaw of the cubic Hermite spline scheme and tightness of PCHIP. Figure 4(d) looks more pleasant and smooth as compared to Figures 4(c) and 4(b) due to different values of shape parameters. The numerical results computed from proposed scheme of Figure 4(d) are shown in Table 8.

2D convex data set.

i 1 2 3 4 5 6
x i −8 −7 2.2 7 10 12
y i 4.5 4 3.55 4 4.5 5

Numerical results of Figure 4(d).

i 1 2 3 4 5 6
d i −0.544 −0.452 0.060 0.136 0.215 0.283
Δ i −0.5 −0.048 0.093 0.166 0.25
u i 1.5 1.5 1.5 1.5 1.5
v i 1.5 1.5 1.5 1.5 1.5
w i 5.108 3.620 1.811 3.532 3.638

Comparison of convex and nonconvex curves through given 2D convex data.

Cubic Hermite spline curve

PCHIP curve

C 2 rational cubic convex curve with u i = 0.5 , v i = 0.5

C 2 rational cubic convex curve with u i = 1.5 , v i = 1.5

5. Error Estimation

In this section, the error of interpolation is calculated by using the following Theorem 5 which was developed by Abbas et al. in  at some fixed values of free shape parameters u i , v i and various values of constrained parameter w i . Here, we take different values of shape parameters than  for the effectiveness of proposed interpolant.

Theorem 5 (see [<xref ref-type="bibr" rid="B3">3</xref>]).

The error of interpolating rational cubic function (7), for f ( x ) C 3 [ x 0 , x n ] , in each subinterval I i = [ x i , x i + 1 ] is (20) | f ( x ) - S i ( x ) | 1 2 f ( 3 ) ( τ ) x i x i + 1 | R x [ ( x - τ ) + 2 ] | d τ = f ( 3 ) ( τ ) c i c i = max 0 θ 1 ξ ( u i , v i , w i , θ ) , where (21) ξ ( u i , v i , w i , θ ) = { max ξ 1 ( u i , v i , w i , θ ) 0 θ θ * max ξ 2 ( u i , v i , w i , θ ) θ * θ 1 max ξ 3 ( u i , v i , w i , θ ) 0 θ 1 , where ξ 1 ( u i , v i , w i ) , ξ 2 ( u i , v i , w i ) , and ξ 3 ( u i , v i , w i ) are given in .

Theorem 6 (see [<xref ref-type="bibr" rid="B3">3</xref>]).

For any given positive values of shape parameters u i , v i , and w i , the optimal error c i in Theorem 5 satisfies 0 < c i 0.0640 .

Proof.

See immediately Tables 9, 10, 11, and 12.

Values of c i for several values of shape parameters u i , v i , and w i .

i u i v i w i c i
1 0.01 0.01 0.01 0.0180
2 0.01 0.01 0.1 0.0458
3 0.01 0.01 0.6 0.0600
4 0.01 0.01 0.9 0.0613
5 0.01 0.01 1.6 0.0625
6 0.01 0.01 6.0 0.0637
7 0.01 0.01 12.0 0.0638
8 0.01 0.01 115.0 0.0639
9 0.01 0.01 515.0 0.0640
10 0.01 0.01 700.0 0.0640
11 0.01 0.01 1000.0 0.0640
12 0.01 0.01 1515.0 0.0640
13 0.01 0.01 2000.0 0.0640
14 0.01 0.01 20000.0 0.0640

Values of c i for different values of shape parameters u i , v i , and w i .

i u i v i w i c i
1 1.50 1.50 1.5 0.0104
2 1.50 1.50 0.1 0.0109
3 1.50 1.50 0.6 0.0135
4 1.50 1.50 0.9 0.0151
5 1.50 1.50 1.6 0.0185
6 1.50 1.50 6.0 0.0331
7 1.50 1.50 12.0 0.0429
8 1.50 1.50 115.0 0.0608
9 1.50 1.50 515.0 0.0633
10 1.50 1.50 700.0 0.0635
11 1.50 1.50 1000.0 0.0637
12 1.50 1.50 1515.0 0.0639
13 1.50 1.50 2000.0 0.0640
14 1.50 1.50 20000.0 0.0640

Values of c i with different values of shape parameters u i , v i , and w i .

i u i v i w i c i
1 50.50 50.50 1.5 0.0104
2 50.50 50.50 0.1 0.0104
3 50.50 50.50 0.6 0.0105
4 50.50 50.50 0.9 0.0105
5 50.50 50.50 1.6 0.0106
6 50.50 50.50 6.0 0.0113
7 50.50 50.50 12.0 0.0122
8 50.50 50.50 115.0 0.0257
9 50.50 50.50 515.0 0.0460
10 50.50 50.50 700.0 0.0496
11 50.50 50.50 1000.0 0.0532
12 50.50 50.50 1515.0 0.0564
13 50.50 50.50 2000.0 0.0581
14 50.50 50.50 20000.0 0.0634

Values of c i for various values of shape parameters u i , v i , and w i .

i u i v i w i c i
1 200.0 200.0 1.5 0.0104
2 200.0 200.0 0.1 0.0104
3 200.0 200.0 0.6 0.0104
4 200.0 200.0 0.9 0.0104
5 200.0 200.0 1.6 0.0104
6 200.0 200.0 6.0 0.0106
7 200.0 200.0 12.0 0.0108
8 200.0 200.0 115.0 0.0149
9 200.0 200.0 515.0 0.0272
10 200.0 200.0 700.0 0.0313
11 200.0 200.0 1000.0 0.0363
12 200.0 200.0 1515.0 0.0421
13 200.0 200.0 2000.0 0.0458
14 200.0 200.0 20000.0 0.0616
6. Concluding Remarks

A C 2 rational cubic function has been developed in this paper for the smooth and attractive display of convex data. Three shape parameters were utilized for the description of function to conserve the shape of convex data. Simple data dependent sufficient constraints were derived for single shape parameter to insure convexity. Remaining two shape parameters have provided freedom to designer to modify the shape of the curve by simply adjusting the values of the shape parameters. No extra knots were inserted in the interval where the interpolant loses the convexity. The values of derivative parameters were achieved by solving the single system of linear equations in comparison with ; there exist three systems of linear equations for finding these values which is computationally expensive and time-consuming process. The proposed scheme is not only C 2 , smoother, local, and computationally economical but also visually pleasing as compared to schemes developed in [9, 11]. The proposed scheme works for both equally and unequally spaced data while the schemes developed in [12, 14] work for only equally spaced data.

Conflict of Interests

The authors declare that they have no conflict of interests regarding the publication of this paper.

Kuijt F. Convexity preserving interpolation—stationary nonlinear subdivision and splines [Ph.D. thesis] 1998 Enschede, The Netherlands University of Twente Abbas M. Majid A. A. Awang M. N. H. Ali J. M. Local convexity shape-preserving data visualization by spline function ISRN Mathematical Analysis 2012 2012 14 174048 MR2901614 ZBL1245.65018 10.5402/2012/174048 Abbas M. Majid A. A. Ali J. M. Monotonicity-preserving C 2 rational cubic spline for monotone data Applied Mathematics and Computation 2012 219 6 2885 2895 10.1016/j.amc.2012.09.007 MR2991989 Abbas M. Shape preserving data visualization for curves and surfaces using rational cubic functions [Ph.D. thesis] 2012 Penang, Malaysia School of Mathematical Sciences, Universiti Sains Malaysia Abbas M. Majid A. A. Awang M. N. H. Ali J. M. Local convexity shape-preserving data visualization by spline function British Journal of Mathematics & Computer Science 2012 2 2 72 93 Brodlie K. W. Butt S. Preserving convexity using piecewise cubic interpolation Computers & Graphics 1991 15 1 15 23 2-s2.0-0025842603 10.1016/0097-8493(91)90026-E Costantini P. Boundary-valued shape-preserving interpolating splines ACM Transactions on Mathematical Software 1997 23 2 229 251 2-s2.0-0031153379 Fiorot J.-C. Tabka J. Shape-preserving C 2 cubic polynomial interpolating splines Mathematics of Computation 1991 57 195 291 298 10.2307/2938674 MR1079015 ZBL0731.65007 Hussain M. Z. Sarfraz M. Shaikh T. S. Shape preserving rational cubic spline for positive and convex data Egyptian Informatics Journal 2011 12 3 231 236 2-s2.0-83555173224 10.1016/j.eij.2011.10.002 Lamberti P. Manni C. Shape-preserving C 2 functional interpolation via parametric cubics Numerical Algorithms 2001 28 1–4 229 254 2-s2.0-0035566935 10.1023/A:1014011303076 Sarfraz M. Hussain M. Z. Shaikh T. S. Iqbal R. Data visualization using shape preserving C 2 rational spline Proceedings of the 15th International Conference on Information Visualisation (IV '11) July 2011 London, UK 528 533 2-s2.0-80053011742 10.1109/IV.2011.91 Duan Q. Wang L. Twizell E. H. A new C 2 rational interpolation based on function values and constrained control of the interpolant curves Applied Mathematics and Computation 2005 161 1 311 322 2-s2.0-9544220661 10.1016/j.amc.2003.12.030 Sarfraz M. Hussain M. Z. Hussain M. Shape-preserving curve interpolation International Journal of Computer Mathematics 2012 89 1 35 53 2-s2.0-84857227072 10.1080/00207160.2011.627434 Bao F. Sun Q. Duan Q. Point control of the interpolating curve with a rational cubic spline Journal of Visual Communication and Image Representation 2009 20 4 275 280 2-s2.0-67349122793 10.1016/j.jvcir.2009.03.003 Hoschek J. Lasser D. Fundamentals of Computer Aided Geometric Design 1993 Wellesley, Mass, USA A. K. Peters MR1258308