ISRN Mathematical Analysis

VolumeΒ 2012, Article IDΒ 174048, 14 pages

http://dx.doi.org/10.5402/2012/174048

## Local Convexity Shape-Preserving Data Visualization by Spline Function

^{1}School of Mathematical Sciences, Universiti Sains Malaysia, 11800 Penang, Malaysia^{2}Department of Mathematics, University of Sargodha, 40100 Sargodha, Pakistan^{3}School of Distance Education, Universiti Sains Malaysia, 11800 Penang, Malaysia

Received 16 November 2011; Accepted 21 December 2011

Academic Editor: R.Β Barrio

Copyright Β© 2012 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.

#### Abstract

The main purpose of this paper is the visualization of convex data that results in a smooth, pleasant, and interactive convexity-preserving curve. The rational cubic function with three free parameters is constructed to preserve the shape of convex data. The free parameters are arranged in a way that two of them are left free for user choice to refine the convex curve as desired, and the remaining one free parameter is constrained to preserve the convexity everywhere. Simple data-dependent constraints are derived on one free parameter, which guarantee to preserve the convexity of curve. Moreover, the scheme under discussion is, flexible, simple, local, and economical as compared to existing schemes. The error bound for the rational cubic function is .

#### 1. Introduction

Spline interpolation is a significant tool in computer graphics, computer-aided geometric design and engineering as well. Convexity is prevalent shape feature of data. Therefore, the need for convexity preserving interpolating curves and surfaces according to the given data becomes inevitable. The aspiration of this paper is to preserve the hereditary attribute that is the convexity of data. There are many applications of convexity preserving of data, for instance, in the design of telecommunication systems, nonlinear programming arising in engineering, approximation of functions, optimal control, and parameter estimation.

The problem of convexity-preserving interpolation has been considered by a number of authors [1β21] and references therein. Bao et al. [1] used function values and first derivatives of function to introduce a rational cubic spline (cubic/cubic). A method for value control, inflection-point control and convexity control of the interpolation at a point was developed to be used in practical curve design. Asaturyan et al. [3] constructed a six-degree piecewise polynomial interpolant for the space curves to satisfy the shape-preserving properties for collinear and coplanar data.

Brodlie and Butt [4] developed a piecewise rational cubic function to preserve the shape of convex data. In [4], the authors inserted extra knots in the interval where the interpolation loses the convexity of convex data which is the drawback of this scheme. Carnicer et al. [5] analyzed the convexity-preserving properties of rational BΓ©zier and non-uniform rational B-spline curves from a geometric point of view and also characterize totally positive systems of functions in terms of geometric convexity-preserving properties of the rational curves.

Clements [6] developed a parametric rational cubic interpolant with tension parameter to preserve the convexity. Sufficient conditions were derived to preserve the convexity of the function on strictly left/right winding polygonal line segments. Costantini and Fontanella [8] preserved the convexity of data by semi-global method. The scheme has some research gaps like the degree of rectangular patches in the interpolant that was too large; the resulting surfaces were not visually pleasing and smooth.

Delbourgo and Gregory [9] developed an explicit representation of rational cubic function with one free parameter which can be used to preserve the convexity of convex data. Meng and Shi Long [11] also developed an explicit representation of rational cubic function with two free parameters which can be used to preserve the convexity of convex data. In the schemes [9, 11], there was no choice for user to refine the convexity curve as desired. The rational spline was represented in terms of first derivative values at the knots and provided an alternative to the spline under tension to preserve the shape of monotone and convex data by Gregory [10].

McAllister [12], Passow [13], and Roulier [14] considered the problem of interpolating monotonic and convex data in the sense of monotonicity and convexity preserving. They used a piecewise polynomial Bernstein-BΓ©zier function and introduce additional knots into their schemes. Such a scheme for quadratic spline interpolation was described by McAllister [12] and was further developed by Schumaker [15] using piecewise quadratic polynomial which was very economical, but the method generally inserts an extra knot in each interval to interpolate.

Sarfraz and Hussain [17] used the rational cubic function with two shape parameters to solve the problem of convexity preserving of convex data. Data-dependent sufficient constraints were derived to preserve the shape of convex data. Sarfraz [18] developed a piecewise rational cubic function with two families of parameters. In [18], the authors derived the sufficient conditions on shape parameters to preserve the physical shape properties of data. Sarfraz [19β21] used piecewise rational cubic interpolant in parametric context for shape preserving of plane curves and scalar curves with planar data. The schemes [17β21] are local, but, unfortunately, they have no flexibility in the convexity-preserving curves.

In this paper, we construct a rational cubic function with three free parameters. One of the free parameter is used as a constrained to preserve the convexity of convex data while the other two are left free for the user to modify the convex curve. Sufficient data-dependent constraints are derived. Our scheme has a number of attributes over the existing schemes.(i)In this paper, the shape-preserving of convex data is achieved by simply imposing the conditions subject to data on the shape parameters used in the description of rational cubic function. The proposed scheme works evenly good for both equally and unequally spaced data. In contrast [1] assumed certain function values and derivative values to control the shape of the data.(ii)In [12, 15], the smoothness of interpolant is while in this work the degree of smoothness is.(iii)The developed scheme has been demonstrated through different numerical examples and observed that the scheme is not only local, computationally economical, and easy to compute, time saving but also visually pleasant as compared to existing schemes [17β21].(iv)In [9β11, 17β21], the schemes do not allow to user to refine the convex curve as desired while for more pleasing curve (and still having the convex shape preserved) an additional modification is required, and this task is more easily done in this paper by simply adjustment of free parameters in the rational cubic function interpolation on user choice.(v)In [17β21], the authors did not provide the error analysis of the interpolants while a very gooderror bound is achieved in this paper.(vi)In [4, 12β15], the authors developed the schemes to achieve the desired shape of data by inserting extra knots between any two knots in the interval while we preserve the shape of convex data by only imposing constraints on free parameters without any extra knots.

The remaining part of this paper is organized as follows. A rational cubic function is defined in Section 2. The error of the rational cubic interpolant is discussed in Section 3. The problem of shape preserving convexity curve is discussed in Section 4. Derivatives approximation method is given in Section 5. Some numerical results are given in Section 6. Finally, the conclusion of this work is discussed in Section 7.

#### 2. Rational Cubic Spline Function

Letbe the given set of data points such as. The rational cubic function with three free parameters introduced by Abbas et al. [2], in each subintervalis defined as with where, andare the positive free parameters. It is worth noting that when we use the values of these free parameters asthen the piecewise rational cubic function (2.1) reduces to standard cubic Hermite spline discussed in Schultz [16].

The piecewise rational cubic function has the following interpolatory conditions:
wheredenotes the derivative with respect to β*x*,β and denotes the derivative values at knots.

#### 3. Interpolation Error Analysis

The error analysis of piecewise rational cubic function (2.1) is estimated, without loss of generality, in the subinterval. It is to mention that the scheme constructed in Section 2 is local. We suppose that, andis the interpolation of functionover arbitrary subinterval. The Peano Kernel Theorem, Schultz [16] is used to obtain the error analysis of piecewise rational cubic interpolation in each subinterval, and it is defined as In each subinterval, the absolute value of error is where where is called the Peano Kernel of integral. To derive the error analysis, first of all we need to examine the properties of the kernel functions and, and then to find the values of following integrals: So, we calculate these values in two parts. The proof of Theorem will be completed by combining these two parts.

##### 3.1. Part 1

By simple computation, the roots of in are . It is easy to show that when, and. The roots of quadratic function are where .

So, when , and when. Thus,, The value of varies from negative to positive on the rootwhen,

##### 3.2. Part 2

In this part, we discuss the properties of function. Consider as function of. The roots of function are similar asin Section 3.1 at. It is easy to show that when,and, . The roots of quadratic functionare The functionvaries from negative to positive on the rootwhen . Thus, when, Thus, from (3.6) and (3.9), it can be shown that when , where and, from (3.7) and (3.10), it can be shown that when , where

Theorem 3.1. *For the positive free parameters, the error of interpolating rational cubic function, for , in each subinterval is
**
where
*

*Remark 3.2. *It is interesting to note that the rational cubic interpolation (2.1) reduces to standard cubic Hermite interpolation when we adjust the values of parameters as. In this special case, the functions are
respectively. Since. This is the standard result for standard cubic Hemite spline interpolation.

#### 4. Shape Preserving 2D Convex Data Rational Cubic Spline Interpolation

The piecewise rational cubic function (2.1) does not guarantee to preserve the shape of convex data. So, it is required to assign suitable constraints on the free parameters by some mathematical treatment to preserve the convexity of convex data.

Theorem 4.1. *Thepiecewise rational cubic function (2.1) preserves the convexity of convex data if in each subinterval, the free parameters satisfy the following sufficient conditions:
**
The above constraints are rearranged as
*

*Proof. *Let be the given set of convex data. For the strictly convex set of data, so
In similar way for the concave set of data, we have
Now, for a convex interpolation, necessary conditions on derivatives parameters should be in the form such that
Similarly, for concave interpolation,
The necessary conditions for the convexity of data are
Now a piecewise rational cubic interpolation is convex if and only if, for after some simplification it can be shown that;
where
Allβs are the expression involving the parameters

A piecewise rational cubic interpolant (2.1) preserves the convexity of data if.

if both and.

Since are positive free parameters, somust be positive
Henceif we have the following sufficient conditions on parameter:
The above constraints are rearranged as
where.

#### 5. Determination of Derivatives

Usually, the derivative values at the knots are not given. These values are derived either at the given data set or by some other means. In this paper, these values are determined by following arithmetic mean method for data in such a way that the smoothness of the interpolant (2.1) is maintained.

##### 5.1. Arithmetic Mean Method

This method is the three point difference approximation with and the end conditions are given as

#### 6. Numerical Examples

In this section, a numerical demonstration of convexity-preserving scheme given in Section 4 is presented.

*Example 6.1. *Consider convex data set taken in Table 1. Figure 1 is produced by cubic Hermite spline. We remark that Figure 1 does not preserve the shape of convex data. To overcome this flaw, Figure 2 is produced by the convexity-preserving rational cubic spline interpolation developed in Section 4 with the values of free parameters to preserve the shape of convex data. Numerical results of Figure 2 are determined by developed convexity preserving rational cubic spline interpolation shown in Table 2.

*Example 6.2. *Consider convex data set taken in Table 3. Figure 3 is produced by cubic Hermite spline, and it is easy to see that Figure 3 does not preserve the shape of convex data. Figure 4 is produced by the convexity-preserving rational cubic spline interpolation developed in Section 4 with the values of free parameters to preserve the shape of convex data. Numerical results of Figure 4 are determined by developed convexity preserving rational cubic spline interpolation shown in Table 4.

#### 7. Conclusion

In this paper, we have constructed apiecewise rational cubic function with three free parameters. Data-dependent constraints are derived to preserve the shape of convex data. Remaining two free parameters are left free for userβs choice to refine the convexity-preserving shape of the convex data as desired. No extra knots are inserted in the interval when the curve loses the convexity. The developed curve scheme has been tested through different numerical examples, and it is shown that the scheme is not only local and computationally economical but also visually pleasant.

#### Acknowledgments

The authors are highly obliged to the anonymous referees for the inspiring comments and the precious suggestions which improved our manuscript significantly. This work was fully supported by USM-RU-PRGS (1001/PMATHS/844031) from the Universiti Sains Malaysia and Malaysian Government is gratefully acknowledged. The first author does acknowledge University of Sargodha, Sargodha-Pakistan for the financial support.

#### References

- F. Bao, Q. Sun, J. Pan, and Q. Duan, βPoint control of rational interpolating curves using parameters,β
*Mathematical and Computer Modelling*, vol. 52, no. 1-2, pp. 143β151, 2010. View at Publisher Β· View at Google Scholar - M. Abbas, A. A. Majid, M. N. H. Awang, and J. M. Ali, βMonotonicity preserving interpolation using rational spline,β in
*Proceedings of the International MultiConference of Engineers and Computer Scientists (IMECS '11)*, vol. 1, pp. 278β282, Hong Kong, March 2011. - S. Asaturyan, P. Costantini, and C. Manni, βLocal shape-preserving interpolation by space curves,β
*IMA Journal of Numerical Analysis*, vol. 21, no. 1, pp. 301β325, 2001. View at Publisher Β· View at Google Scholar Β· View at Zentralblatt MATH - K. W. Brodlie and S. Butt, βPreserving convexity using piecewise cubic interpolation,β
*Computers and Graphics*, vol. 15, no. 1, pp. 15β23, 1991. View at Google Scholar Β· View at Scopus - J. M. Carnicer, M. Garcia-Esnaola, and J. M. PeΓ±a, βConvexity of rational curves and total positivity,β
*Journal of Computational and Applied Mathematics*, vol. 71, no. 2, pp. 365β382, 1996. View at Publisher Β· View at Google Scholar Β· View at Zentralblatt MATH - J. C. Clements, βA convexity-preserving ${C}^{2}$
parametric rational cubic interpolation,β
*Numerische Mathematik*, vol. 63, no. 2, pp. 165β171, 1992. View at Publisher Β· View at Google Scholar Β· View at Zentralblatt MATH - P. Costantini, βOn monotone and convex spline interpolation,β
*Mathematics of Computation*, vol. 46, no. 173, pp. 203β214, 1986. View at Publisher Β· View at Google Scholar Β· View at Zentralblatt MATH - P. Costantini and F. Fontanella, βShape-preserving bivariate interpolation,β
*SIAM Journal on Numerical Analysis*, vol. 27, no. 2, pp. 488β506, 1990. View at Publisher Β· View at Google Scholar Β· View at Zentralblatt MATH - R. Delbourgo and J. A. Gregory, βShape preserving piecewise rational interpolation,β
*SIAM Journal on Scientific and Statistical Computing*, vol. 6, no. 4, pp. 967β976, 1985. View at Publisher Β· View at Google Scholar Β· View at Zentralblatt MATH - J. A. Gregory, βShape preserving spline interpolation,β
*Computer-Aided Design*, vol. 18, no. 1, pp. 53β57, 1986. View at Google Scholar Β· View at Scopus - M. Tian and S. L. Li, βConvexity-preserving piecewise rational cubic interpolation,β
*Journal of Shandong University*, vol. 42, no. 10, pp. 1β5, 2007. View at Google Scholar Β· View at Zentralblatt MATH - D. F. McAllister and J. A. Roulier, βAn algorithm for computing a shape-preserving osculatory quadratic spline,β
*ACM Transactions on Mathematical Software*, vol. 7, no. 3, pp. 331β347, 1981. View at Publisher Β· View at Google Scholar Β· View at Zentralblatt MATH - E. Passow and J. A. Roulier, βMonotone and convex spline interpolation,β
*SIAM Journal on Numerical Analysis*, vol. 14, no. 5, pp. 904β909, 1977. View at Publisher Β· View at Google Scholar Β· View at Zentralblatt MATH - J. A. Roulier, βA convexity preserving grid refinement algorithm for interpolation of bivariate functions,β
*IEEE Computer Graphics and Applications*, vol. 7, no. 1, pp. 57β62, 1987. View at Google Scholar Β· View at Scopus - L. L. Schumaker, βOn shape preserving quadratic spline interpolation,β
*SIAM Journal on Numerical Analysis*, vol. 20, no. 4, pp. 854β864, 1983. View at Publisher Β· View at Google Scholar Β· View at Zentralblatt MATH - M. H. Schultz,
*Spline Analysis*, Prentice-Hall, Englewood Cliffs, NJ, USA, 1973. - M. Sarfraz and M. Z. Hussain, βData visualization using rational spline interpolation,β
*Journal of Computational and Applied Mathematics*, vol. 189, no. 1-2, pp. 513β525, 2006. View at Publisher Β· View at Google Scholar Β· View at Zentralblatt MATH - M. Sarfraz, βVisualization of positive and convex data by a rational cubic spline interpolation,β
*Information Sciences*, vol. 146, no. 1β4, pp. 239β254, 2002. View at Publisher Β· View at Google Scholar Β· View at Zentralblatt MATH - M. Sarfraz, M. Hussain, and Z. Habib, βLocal convexity preserving rational cubic spline curves,β in
*Proceedings of the IEEE Conference on Information Visualization (IV '97)*, pp. 211β218, 1997. - M. Sarfraz, βConvexity preserving piecewise rational interpolation for planar curves,β
*Bulletin of the Korean Mathematical Society*, vol. 29, no. 2, pp. 193β200, 1992. View at Google Scholar Β· View at Zentralblatt MATH - M. Sarfraz, βInterpolatory rational cubic spline with biased, point and interval tension,β
*Computers and Graphics*, vol. 16, no. 4, pp. 427β430, 1992. View at Google Scholar Β· View at Scopus