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.