Next Article in Journal
On Generalized Double Statistical Convergence of Order α in Intuitionistic Fuzzy Normed Spaces
Previous Article in Journal
A Comparison of Information Criteria in Clustering Based on Mixture of Multivariate Normal Distributions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

The Cubic α-Catmull-Rom Spline

1
College of Mathematics and Finance, Hunan University of Humanities, Science and Technology, Loudi 417000, China
2
College of Automation, Nanjing University of Posts and Telecommunications, Nanjing 210023, China
*
Author to whom correspondence should be addressed.
Math. Comput. Appl. 2016, 21(3), 33; https://doi.org/10.3390/mca21030033
Submission received: 6 May 2016 / Revised: 25 July 2016 / Accepted: 1 August 2016 / Published: 9 August 2016

Abstract

:
By extending the definition interval of the standard cubic Catmull-Rom spline basis functions from [0,1] to [0,α], a class of cubic Catmull-Rom spline basis functions with a shape parameter α, named cubic α-Catmull-Rom spline basis functions, is constructed. Then, the corresponding cubic α-Catmull-Rom spline curves are generated based on the introduced basis functions. The cubic α-Catmull-Rom spline curves not only have the same properties as the standard cubic Catmull-Rom spline curves, but also can be adjusted by altering the value of the shape parameter α even if the control points are fixed. Furthermore, the cubic α-Catmull-Rom spline interpolation function is discussed, and a method for determining the optimal interpolation function is presented.

1. Introduction

With the development of geometric design industry, the shapes of curves often need to be changed freely. Hence, the curves with shape parameters have been paid more and more attention by many researchers in geometric modeling. Some examples are the Bézier-like curves with shape parameters [1,2,3,4,5], the B-spline-like curves with shape parameters [6,7,8,9,10,11,12,13,14], the trigonometric curves with shape parameters [15,16,17,18,19,20,21], and so on. Curves with shape parameters not only inherit similar or the same properties as the corresponding classical curves, but also have better performance ability because of the shape parameters.
As an interpolation spline, the cubic Catmull-Rom spline [22] has been widely used in geometric design [23,24] and engineering applications [25,26] because it can automatically interpolate the given control points without solving equation systems. Generally, shapes of the standard cubic Catmull-Rom spline would be modified if the control points are changed, and the control points can be adapted during a learning procedure [25,26]. However, shapes of the standard cubic Catmull-Rom spline cannot be adjusted when the control points are fixed, which limits its applications. The main purpose of this work is to present a simple method for constructing a cubic Catmull-Rom spline with a shape parameter. A class of cubic Catmull-Rom spline basis functions with a shape parameter α, named cubic α-Catmull-Rom spline basis functions, is constructed through extending the definition interval of the standard cubic Catmull-Rom spline basis functions from [ 0 , 1 ] to [ 0 , α ] ( α > 0 ) . Then, the corresponding cubic α-Catmull-Rom spline curves and interpolation function are defined on the basis of the cubic α-Catmull-Rom spline basis functions. The proposed cubic α-Catmull-Rom spline curves not only have the same properties as the standard cubic Catmull-Rom spline curves, but also have one degree of freedom in the interpolation curves even if the control points are fixed. The optimal cubic α-Catmull-Rom spline interpolation function can be obtained by choosing the proper value of the shape parameter.
The rest of this paper is organized as follows. In Section 2, the standard cubic Catmull-Rom spline curves are introduced, and the shortcomings of the curves are pointed out. In Section 3, the cubic Catmull-Rom basis functions with a shape parameter α, named cubic α-Catmull-Rom basis functions, are constructed, and the properties of the basis functions are given. In Section 4, the definition and properties of the cubic α-Catmull-Rom spline curves are presented on the basis of the cubic α-Catmull-Rom basis functions. In Section 5, the cubic α-Catmull-Rom spline interpolation function is discussed, and a method for determining the optimal interpolation function is presented. A short conclusion is given in Section 6.

2. The Standard Cubic Catmull-Rom Spline Curves

Given control points p i ( i = 0 , 1 , , n ; n 3 ) in R 2 or R 3 , for 0 t 1 , the cubic Catmull-Rom spline curves can be generally expressed as follows [22]:
r i ( t ) = j = 0 3 b j ( t ) p i + j ,   i = 0 , 1 , , n 3 ,
where b j ( t ) ( j = 0 , 1 , 2 , 3 ) are the cubic Catmull-Rom basis functions expressed as follows:
{ b 0 ( t ) = 1 2 ( t + 2 t 2 t 3 ) b 1 ( t ) = 1 2 ( 2 5 t 2 + 3 t 3 ) b 2 ( t ) = 1 2 ( t + 4 t 2 3 t 3 ) b 3 ( t ) = 1 2 ( t 2 + t 3 ) .
The cubic Catmull-Rom basis functions have the following properties:
(a)
partition of unity: b 0 ( t ) + b 1 ( t ) + b 2 ( t ) + b 3 ( t ) 1 ;
(b)
symmetry: b i ( 1 t ) = b 3 i ( t ) ( j = 0 , 1 , 2 , 3 ) ;
(c)
properties at the endpoints:
{ b 0 ( 0 ) = 0 , b 1 ( 0 ) = 1 , b 2 ( 0 ) = 0 , b 3 ( 0 ) = 0 , b 0 ( 1 ) = 0 , b 1 ( 1 ) = 0 , b 2 ( 1 ) = 1 , b 3 ( 1 ) = 0.
{ b 0 ( 0 ) = 1 / 2 , b 1 ( 0 ) = 0 , b 2 ( 0 ) = 1 / 2 , b 3 ( 0 ) = 0 , b 0 ( 1 ) = 0 , b 1 ( 1 ) = 1 / 2 , b 2 ( 1 ) = 0 , b 3 ( 1 ) = 1 / 2 .
The cubic Catmull-Rom spline curves have the following properties:
(a)
symmetry: both p i ( i = 0 , 1 , , n ) and p n i ( i = 0 , 1 , , n ) define the same curves in a different parameterization;
(b)
geometric invariance: shapes of the curves are independent of the choice of coordinate system. An affine transformation for the curve can be performed by carrying out the same affine transformation for the control points;
(c)
interpolation and C1 continuity: the curves interpolate the given control points expect p 0 and p n , and the curves are C1 continuous.
The standard cubic Catmull-Rom spline curves can automatically interpolate the given control points without solving equation systems, which cause them to be widely used in practical engineering. However, shapes of the standard cubic Catmull-Rom spline curves cannot be adjusted when the control points are fixed, which limits their applications. In order to alleviate the shortcomings of standard cubic Catmull-Rom spline curves in shape adjustment, the cubic Catmull-Rom spline curves with a shape parameter will be introduced.

3. The Cubic α-Catmull-Rom Basis Functions

Firstly, the cubic Catmull-Rom basis functions with a shape parameter needed to be constructed. A simple idea is to extend the definition interval of the standard cubic Catmull-Rom basis functions from [ 0 , 1 ] to [ 0 , α ] ( α > 0 ) .
Suppose the new basis functions f i ( t ) ( i = 0 , 1 , 2 , 3 ) are expressed as follows:
( f 0 ( t ) f 1 ( t ) f 2 ( t ) f 3 ( t ) ) = ( 1 t t 2 t 3 ) M ,
where 0 t α , 0 < α 1 , and M is an undetermined 4 × 4 matrix.
By taking derivation calculus to Equation (3), then
( f 0 ( t ) f 1 ( t ) f 2 ( t ) f 3 ( t ) ) = ( 0 1 2 t 3 t 2 ) M .
Because the new basis functions hope to satisfy the same properties at the end points with the standard cubic Catmull-Rom basis functions, thus, let t = 0 and t = α in Equations (3) and (4), respectively. Then,
( 0 1 0 0 ) = ( 1 0 0 0 ) M ( 0 0 1 0 ) = ( 1 α α 2 α 3 ) M ( 1 / 2 0 1 / 2 0 ) = ( 0 1 0 0 ) M ( 0 1 / 2 0 1 / 2 ) = ( 0 1 2 α 3 α 2 ) M .
From Equation (5), we have
( 0 1 0 0 0 0 1 0 1 / 2 0 1 / 2 0 0 1 / 2 0 1 / 2 ) = ( 1 0 0 0 1 α α 2 α 3 0 1 0 0 0 1 2 α 3 α 2 ) M .
By Equation (6), we obtain
M = ( 0 1 0 0 1 2 0 1 2 0 1 α α 6 2 α 2 3 α α 2 1 2 α 1 2 α 2 4 α 2 α 3 α 4 2 α 3 1 2 α 2 ) .
From Equations (3) and (7), the new basis functions can be expressed as follows:
{ f 0 ( t ) = 1 2 α 2 ( α 2 t + 2 α t 2 t 3 ) f 1 ( t ) = 1 2 α 3 ( 2 α 3 + ( α 2 6 α ) t 2 + ( 4 α ) t 3 ) f 2 ( t ) = 1 2 α 3 ( α 3 t + ( 6 α 2 α 2 ) t 2 + ( α 4 ) t 3 ) f 3 ( t ) = 1 2 α 2 ( α t 2 + t 3 ) ,
where 0 t α , α > 0 .
The basis functions expressed in Equation (8) can be reparametrized by g i ( u ) = f i ( α u ) ( i = 0 , 1 , 2 , 3 ) . Then, the basis functions defined on a fixed interval [0,1] can be obtained as follows.
Definition 1. 
For 0 u 1 , α 0 , the following four functions of u are called the cubic Catmull-Rom basis functions with a shape parameter α (cubic α-Catmull-Rom basis functions for short):
{ g 0 ( u ) = 1 2 ( α u + 2 α u 2 α u 3 ) g 1 ( u ) = 1 2 ( 2 + ( α 6 ) u 2 + ( 4 α ) u 3 ) g 2 ( u ) = 1 2 ( α u + ( 6 2 α ) u 2 ( 4 α ) u 3 ) g 3 ( u ) = 1 2 ( α u 2 + α u 3 ) .
From Equations (2) and (9), the cubic α-Catmull-Rom basis functions and the standard cubic Catmull-Rom basis functions have the relationships as follows:
{ g 0 ( u ) = α b 0 ( u ) g 1 ( u ) = b 1 ( u ) + ( 1 α ) b 3 ( u ) g 2 ( u ) = b 2 ( u ) + ( 1 α ) b 0 ( u ) g 3 ( u ) = α b 3 ( u ) .
Remark 1. 
It is clear that the cubic α-Catmull-Rom basis functions would be the standard cubic Catmull-Rom basis functions for α = 1 .
Theorem 1. 
The cubic α-Catmull-Rom basis functions have the following properties:
(a)
partition of unity: g 0 ( u ) + g 1 ( u ) + g 2 ( u ) + g 3 ( u ) 1 ;
(b)
symmetry: g i ( 1 u ) = g 3 i ( u ) ( i = 0 , 1 , 2 , 3 ) ;
(c)
properties at the endpoints:
{ g 0 ( 0 ) = 0 , g 1 ( 0 ) = 1 , g 2 ( 0 ) = 0 , g 3 ( 0 ) = 0 , g 0 ( 1 ) = 0 , g 1 ( 1 ) = 0 , g 2 ( 1 ) = 1 , g 3 ( 1 ) = 0.
{ g 0 ( 0 ) = α / 2 , g 1 ( 0 ) = 0 , g 2 ( 0 ) = α / 2 , g 3 ( 0 ) = 0 , g 0 ( 1 ) = 0 , g 1 ( 1 ) = α / 2 , g 2 ( 1 ) = 0 , g 3 ( 1 ) = α / 2 .
(d)
monotonicity about the shape parameter: for fixed u [ 0 , 1 ] , g 0 ( u ) and g 3 ( u ) are monotonically decreasing about α, g 1 ( u ) and g 2 ( u ) are monotonically increasing about α.
Proof. 
By simple deduction, (a), (b) and (c) follow:
(d) For fixed u [ 0 , 1 ] , by taking derivation calculus on α to (3), then
d g 0 d α = 1 2 u ( 1 u ) 2 0 ,   d g 1 d α = 1 2 α u 2 ( 1 u ) 0 ,
d g 2 d α = 1 2 u ( 1 u ) 2 0 ,   d g 3 d α = 1 2 α u 2 ( 1 u ) 0 .
Thus, g 0 ( u ) and g 3 ( u ) are monotonically decreasing about α , and g 1 ( u ) and g 2 ( u ) are monotonically increasing about α.
Theorem 1 shows that the cubic α-Catmull-Rom basis functions not only inherit the properties of the standard cubic Catmull-Rom basis functions, but also can be adjusted by the shape parameter α. Figure 1 shows curves of the cubic α-Catmull-Rom basis functions for different values of α, where the value of α is taken as α = 0.6 (marked with dotted lines), α = 2.4 (marked with solid lines) and α = 4.2 (marked with dashed lines), respectively.

4. The Cubic α-Catmull-Rom Spline Curves

On the basis of the cubic α-Catmull-Rom basis functions, the corresponding cubic Catmull-Rom spline curves with a shape parameter can be defined as follows.
Definition 2. 
Given control points b i ( i = 0 , 1 , , n ; n 3 ) in R 2 or R 3 , for 0 u 1 , α 0 , the following curves are called the cubic Catmull-Rom spline curves with a shape parameter α (cubic α-Catmull-Rom spline curves for short):
p i ( u ) = j = 0 3 g j ( u ) b i + j ,   i = 0 , 1 , , n 3 ,
where g j ( u ) ( j = 0 , 1 , 2 , 3 ) are the cubic α-Catmull-Rom basis functions defined in (9).
Theorem 2. 
The cubic α-Catmull-Rom spline curves have the following properties:
(a)
symmetry: for the same shape parameter α, both b i ( i = 0 , 1 , , n ) and b n i ( i = 0 , 1 , 2 , , n ) define the same curves in a different parameterization:
p i ( u ; b i , b i + 1 , b i + 2 , b i + 3 ) = p i ( 1 u ; b i + 3 , b i + 2 , b i + 1 , b i ) ,   i = 0 , 1 , , n 3 ;
(b)
geometric invariance: shapes of the curves are independent of the choice of coordinate system. An affine transformation for the curves can be performed by carrying out the same affine transformation for the control points;
(c)
local property: at most, four segments of the curves would be affected if one control point is moved;
(d)
interpolation and C1 continuity: the curves interpolate the given control points expect b 0 and b n , and the curve is C1 continuous;
(e)
shape adjustable property: when the control points b i + j ( j = 0 , 1 , 2 , 3 ) are fixed, shape of the curve p i ( u ) can be adjusted by altering the value of the shape parameter α.
Proof. 
(a)
From the symmetry of the cubic α-Catmull-Rom basis functions and Equation (10), then
p i ( 1 u ; b i + 3 , b i + 2 , b i + 1 , b i ) = g 0 ( 1 u ) b i + 3 + g 1 ( 1 u ) b i + 2 + g 2 ( 1 u ) b i + 1 + g 3 ( 1 u ) b i = g 3 ( u ) b i + 3 + g 2 ( u ) b i + 2 + g 1 ( u ) b i + 1 + g 0 ( u ) b i = p i ( u ; b i , b i + 1 , b i + 2 , b i + 3 ) .
(b)
Because Equation (10) is an affine combination of the control points, geometric invariance follows.
(c)
From Equation (10), a segment of the curve p i ( u ) is only related to the four control points b i + j ( j = 0 , 1 , 2 , 3 ) , thus, at most, four segments of the curves would be affected if one control point is moved.
(d)
From the properties at the endpoints of the α-Catmull-Rom basis functions and Equation (10), then
{ p i ( 0 ) = b i + 1 p i ( 1 ) = b i + 2 ,   i = 0 , 1 , , n 3 ,
{ p i ( 0 ) = α 2 ( b i + 2 b i ) p i ( 1 ) = α 2 ( b i + 3 b i + 1 ) ,   i = 0 , 1 , , n 3 .
Equation (11) shows that the curves interpolate the given control points expect b 0 and b n . From Equations (11) and (12), it follows that
p i ( k ) ( 1 ) = p i + 1 ( k ) ( 0 ) ( k = 0 , 1 ) .
Equation (13) shows that the curves are C1 continuous.
(e)
Since Equation (10) contains the parameter α, the shape of the curve p i ( u ) can be adjusted by altering the value of α even if the control points b i + j ( j = 0 , 1 , 2 , 3 ) are fixed (see Figure 2).
Theorem 2 shows that the cubic α-Catmull-Rom spline curves not only inherit the same properties of the standard cubic Catmull-Rom spline curves, but also can achieve shape adjustment by the shape parameter α.
If two auxiliary points b 1 and b n + 1 are added to the given control points, the C1 continuous cubic α-Catmull-Rom spline curves p i ( u ) ( i = 1 , 0 , 1 , , n 2 ) interpolating all the given control points b i ( i = 0 , 1 , , n ) would be obtained. It is clear that there exists one degree of freedom in the C1 continuous cubic α-Catmull-Rom spline curves, even if the control points and auxiliary points are fixed. Different interpolation curves could be obtained by altering the value of the shape parameter α. Figure 3 shows the C1 continuous cubic α-Catmull-Rom spline curves adjusted by the shape parameter α, where the value of α is taken as α = 0.4 (marked with dotted lines), α = 1.0 (marked with solid lines) and α = 1.8 (marked with dashed lines), respectively.
Remark 2. 
As we know, the cubic Hermite spline curves [27] can be expressed as follows:
r i ( t ) = f 0 ( t ) p i + 1 + f 1 ( t ) p i + 2 + g 0 ( t ) p i + 1 + g 1 ( t ) p i + 2 ,
where
{ f 0 ( t ) = 1 3 t 2 + 2 t 3 f 1 ( t ) = 3 t 2 2 t 3 g 0 ( t ) = t ( 1 t ) 2 g 1 ( t ) = t 2 ( 1 t ) .
If we let p i + 1 = α ( p i + 1 p i ) , p i + 2 = α ( p i + 3 p i + 2 ) , then Equation (14) could be rewritten as follows:
r i ( t ) = h 0 ( t ) p i + h 1 ( t ) p i + 1 + h 2 ( t ) p i + 2 + h 3 ( t ) p i + 3 ,
where
{ h 0 ( t ) = α g 0 ( t ) h 1 ( t ) = f 0 ( t ) + α g 0 ( t ) h 2 ( t ) = f 1 ( t ) α g 1 ( t ) h 3 ( t ) = α g 1 ( t ) .
Although the curves expressed in Equation (15) have the similar properties of the proposed α-Catmull-Rom spline curves, the proposed α-Catmull-Rom spline curves are constructed by extending the definition interval of the standard cubic Catmull-Rom spline from [0,1] to [0,α], which is a new idea for constructing cubic Catmull-Rom spline with a shape parameter. Thus, the proposed work provides another method for constructing interpolation curves without solving equation systems.
Since the shapes of the cubic α-Catmull-Rom spline curves are determined by the value of the shape parameter α when the control points and auxiliary points are fixed, how to determine the optimal value of α for making the cubic α-Catmull-Rom spline curves be the smoothest, therefore, needs to be discussed. A method for determining the optimal value of α is presented as follows.
According to Ref. [28], the smoothness of a parametric curve r ( u ) ( 0 u 1 ) can be approximately measured by its energy expressed as follows:
E = 0 1 ( r ( u ) ) 2 d t .
The lower the energy is, the smoother the curve.
From Equation (16), for given data points b i ( i = 0 , 1 , , n ) and two auxiliary points b 1 , b n + 1 , the optimal value of α of the cubic α-Catmull-Rom spline curves p i ( u ) ( i = 1 , 0 , 1 , , n 2 ) can be determined by an optimization model expressed as follows:
min E ( α ) = i = 1 n 2 0 1 ( p i ( u ) ) 2 d u s . t . α 0 .
Set
l 0 ( u ) = 1 2 ( u + 2 u 2 u 3 ) ,   l 1 ( u ) = 1 2 ( u 2 u 3 ) ,   m 0 ( u ) = 1 3 u 2 + 2 u 3 ,   m 1 ( u ) = 3 u 2 2 u 3 .
Then, Equation (10) can be rewritten as follows:
p i ( u ) = R i ( u ) α + S i ( u ) ,
where R i ( u ) = l 0 ( u ) ( b i b i + 2 ) + l 1 ( t ) ( b i + 1 b i + 3 ) , S i ( u ) = m 0 ( u ) b i + 1 + m 1 ( u ) b i + 2 .
From Equations (17) and (18) can be expressed as follows:
min E ( α ) = c 1 α 2 + 2 c 2 α + c 3 s . t . α 0 .
where c 1 = i = 1 n 2 0 1 ( R i ( u ) ) 2 d u , c 2 = i = 1 n 2 0 1 ( R i ( u ) S i ( u ) ) d u , c 3 = i = 1 n 2 0 1 ( S i ( u ) ) 2 d u .
Since there is always c 1 0 , the solution of Equation (19) has the following two cases:
Case 1. When c 1 = 0 . If c 2 > 0 , the solution of Equation (19) is α ˜ = 0 ; else if c 2 < 0 , the solution of Equation (19) is α ˜ = c 3 2 c 2 ; else, the solution of Equation (19) is α to take any non-negative real number.
Case 2. When c 1 > 0 . If c 2 c 1 0 , the solution of Equation (19) is α ˜ = 0 ; else, the solution of Equation (19) is α ˜ = c 2 c 1 .
After the optimal value of α is determined by Equation (19), the smoothest cubic α-Catmull-Rom spline curves can be obtained. For example, for the same control points and auxiliary points in Figure 3, the optimal value of α determined by Equation (19) is α ˜ = 1.10156 . The energy curve of the cubic α-Catmull-Rom spline curves for 0 α 3 is shown in Figure 4. The smoothest cubic α-Catmull-Rom spline curves are shown in Figure 5.

5. The Cubic α-Catmull-Rom Spline Interpolation Function

On the basis of the cubic α-Catmull-Rom basis functions, the cubic α-Catmull-Rom spline interpolation function can also be defined as follows.
Definition 3. 
Given a function y = r ( x ) ( a x b ) , Δ : a = x 0 < x 1 < < x n = b is a division of [ a , b ] , y i = r ( x i ) ( i = 0 , 1 , 2 , , n ) , set u = x x i x i + 1 x i , for x i x x i + 1 ( i = 1 , 2 , , n 2 ) , the function,
S i ( x ) = j = 0 3 g j ( u ) y i + j ,   i = 1 , 2 , , n 2 ,
is called the cubic Catmull-Rom spline functions with a shape parameter α (cubic α-Catmull-Rom spline interpolation function for short), where g j ( u ) ( j = 0 , 1 , 2 , 3 ) are the cubic α-Catmull-Rom basis functions defined according to Equation (9).
From Theorem 2, the cubic α-Catmull-Rom spline interpolation function has the properties as follows:
(a)
interpolation: the cubic α-Catmull-Rom spline interpolation function interpolate the given data points expect ( x 0 , y 0 ) and ( x n , y n ) ,
{ S i ( x i ) = y i + 1 S i ( x i + 1 ) = y i + 2 ,   i = 0 , 1 , , n 3 ;
(b)
C1 continuity: the cubic α-Catmull-Rom spline interpolation function is C1 continuous, viz.,
S i ( k ) ( x i + 1 ) = S i + 1 ( k ) ( x i + 1 ) ,   k = 0 , 1 ;   i = 1 , 2 , , n 3 ;
(c)
shape adjustable property: if two auxiliary data points ( x 1 , y 1 ) and ( x n + 1 , y n + 1 ) are added to the given data points, the C1 continuous cubic α-Catmull-Rom spline interpolation function S i ( x ) ( i = 0 , 1 , , n 1 ) interpolating all the given data points ( x i , y i ) ( i = 0 , 1 , , n ) would be obtained. The shape of the curve of the cubic α-Catmull-Rom spline interpolation function can be adjusted by altering the value of the shape parameter α.
Example 1. 
Given the function,
y = r ( x ) = 1 1 + x 2 ( 5 x 5 ) ,
set x i = 5 + i , y i = r ( x i ) ( i = 0 , 1 , , 10 ) . The two auxiliary data points are taken as follows:
( x 1 , y 1 ) = 2 ( x 0 , y 0 ) ( x 1 , y 1 ) ,   ( x 11 , y 11 ) = 2 ( x 10 , y 10 ) ( x 9 , y 9 ) .
Figure 6 shows the curve of the C1 continuous cubic α-Catmull-Rom spline interpolation function adjusted by the shape parameter α, where the value of α is taken as α = 0.2 (marked with dotted lines), α = 1.0 (marked with solid lines) and α = 1.8 (marked with dashed lines), respectively.
It is clear that the cubic α-Catmull-Rom spline interpolation function is completely determined by the shape parameter α when the data points and two auxiliary data points are fixed. Hence, how to determine the optimal value of the shape parameter α is the key when constructing the cubic α-Catmull-Rom spline interpolation function. A method for determining the optimal value of the shape parameter α is presented as follows.
Given a function y = r ( x ) ( a x b ) , Δ : a = x 0 < x 1 < < x n = b is a division of [ a , b ] , y i = r ( x i ) ( i = 0 , 1 , 2 , , n ) , and two auxiliary data points ( x 1 , y 1 ) , ( x n + 1 , y n + 1 ) are added to the given data points. Then, the interpolation error of the cubic α-Catmull-Rom spline interpolation function S i ( x ) ( i = 0 , 1 , 2 , , n 1 ) can be expressed as follows:
F ( α ) = i = 0 n 1 x i x i + 1 ( S i ( x ) r ( x ) ) 2 d x ,
where α 0 .
In order to obtain the minimum interpolation error, the following optimal model can be obtained:
min F ( α ) = i = 0 n 1 x i x i + 1 ( S i ( x ) r ( x ) ) 2 d x s . t . α 0 .
Let u i = x x i x i + 1 x i , and set
L i , 0 ( x ) = 1 2 ( u i + 2 u i 2 u i 3 ) ,   L i , 1 ( x ) = 1 2 ( u i 2 u i 3 ) ,   M i , 1 ( x ) = 1 3 u i 2 + 2 u i 3 ,   M i , 2 ( x ) = 3 u i 2 2 u i 3 .
Then, Equation (20) can be rewritten as follows:
S i ( x ) = G i ( x ) α + H i ( x ) ,
where G i ( x ) = L i , 0 ( x ) ( y i y i + 2 ) + L i , 1 ( x ) ( y i + 1 y i + 3 ) , H i ( x ) = M i , 1 ( x ) y i + 1 + M i , 2 ( x ) y i + 2 .
From Equations (22) and (23) can be expressed as follows:
min F ( α ) = C 1 α 2 + 2 C 1 α + C 2 s . t . α 0 ,
where C 1 = i = 0 n 1 x i x i + 1 G i 2 ( x ) d x , C 2 = i = 0 n 1 x i x i + 1 G i ( x ) ( H i ( x ) r ( x ) ) d x , C 3 = i = 0 n 1 x i x i + 1 ( H i ( x ) r ( x ) ) 2 d x .
Since there is always C 1 0 , the solution of Equation (24) has the following two cases:
Case 1. When C 1 = 0 . If C 2 > 0 , the solution of Equation (24) is α ˜ = 0 ; else if C 2 < 0 , the solution of Equation (24) is α ˜ = C 3 2 C 2 ; else, the solution of Equation (24) is α to take any non-negative real number.
Case 2. When C 1 > 0 . If C 2 C 1 0 , the solution of Equation (24) is α ˜ = 0 ; else, the solution of Equation (24) is α ˜ = C 2 C 1 .
After the optimal value of the shape parameter α is determined by Equation (24), the optimum cubic α-Catmull-Rom spline interpolation function could be naturally obtained from Equation (20).
Example 2. 
Given the function
y = r ( x ) = 4 + sin ( x ) ( 0 x 5 π ) ,
set x i = 5 π n i , y i = r ( x i ) ( i = 0 , 1 , 2 , , n ) . The two auxiliary data points are taken as follows:
( x 1 , y 1 ) = 2 ( x 0 , y 0 ) ( x 1 , y 1 ) ,   ( x n + 1 , y n + 1 ) = 2 ( x n , y n ) ( x n 1 , y n 1 ) .
For different n (where n + 1 is the number of the given data points), the optimal value of the shape parameter α solved by Equation (24), the interpolation errors of the optimum cubic α-Catmull-Rom spline interpolation function and the interpolation error of the standard cubic Catmull-Rom spline interpolation function calculated by Equation (21) are shown in Table 1.
Table 1 shows that the interpolation result of the optimum cubic α-Catmull-Rom spline interpolation function is better than the standard cubic Catmull-Rom spline interpolation function, which is due to the fact that the shape parameter α is taken as the optimal value.
The curves of the optimum cubic α-Catmull-Rom spline interpolation function for n = 10 (marked with solid lines) and the standard cubic Catmull-Rom spline interpolation function (i.e., the shape parameter is taken as α = 1 , marked with dashed lines) are shown in Figure 7.

6. Conclusions

A cubic α-Catmull-Rom spline with a shape parameter is presented in this paper. The spline curves not only have the same properties as the standard cubic Catmull-Rom spline curves, but can also achieve shape adjustment by altering the value of the shape parameter, even if the control points are fixed. The corresponding cubic α-Catmull-Rom spline interpolation function has the same characteristics with the spline curves, and the optimal interpolation function can be obtained by choosing proper values of the shape parameter. The examples illustrate the feasibility of those methods.
Furthermore, the corresponding spline surfaces and binary interpolation function with shape parameters could be constructed by using tensor products. The spline surfaces and binary interpolation functions would enjoy the same characteristics with the one-dimensional models. Some results in this area will be presented in the following study.

Acknowledgments

This work was supported by the Scientific Research Fund of the Hunan Provincial Education Department of China under the grant number 14B099 and the Nanjing University of Posts and Telecommunications Startup Foundation under the grant number NY215050. The authors are also very grateful to the Hunan Provincial Key Construction Discipline “Computer Application Technology” of Hunan University of Humanities, Science and Technology of China.

Author Contributions

Juncheng Li conceived and designed the manuscript; Juncheng Li and Sheng Chen performed the numeric experiments; Juncheng Li wrote the paper.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Mainar, E. A general class of Bernstein-like bases. Comput. Math. Appl. 2007, 53, 1686–1703. [Google Scholar] [CrossRef]
  2. Han, X.A.; Ma, Y.C.; Huang, X.L. A novel generalization of Bézier curve and surface. J. Comput. Appl. Math. 2008, 217, 180–193. [Google Scholar] [CrossRef]
  3. Yang, L.Q.; Zeng, X.M. Bézier curves and surfaces with shape parameters. Int. J. Comput. Math. 2009, 86, 1253–1263. [Google Scholar] [CrossRef]
  4. Yan, L.L.; Liang, Q.F. An extension of the Bézier model. Appl. Math. Comput. 2011, 218, 2863–2879. [Google Scholar] [CrossRef]
  5. Qin, X.Q.; Hu, G.; Zhang, N.J.; Shen, X.L.; Yang, Y. A novel extension to the polynomial basis functions describing Bézier curves and surfaces of degree n with multiple shape parameters. Appl. Math. Comput. 2013, 223, 1–16. [Google Scholar] [CrossRef]
  6. Han, X.L. Piecewise quartic polynomial curves with a local shape parameter. J. Comput. Appl. Math. 2006, 23, 34–45. [Google Scholar] [CrossRef]
  7. Brinks, R. On the convergence of derivatives of B-splines to derivatives of the Gaussian function. Comput. Appl. Math. 2008, 27, 79–92. [Google Scholar] [CrossRef]
  8. Juhász, I.; Hoffmann, M. On the quartic curve of Han. J. Comput. Appl. Math. 2009, 223, 124–132. [Google Scholar] [CrossRef]
  9. Cao, J.; Wang, G.Z. Non-uniform B-spline curves with multiple shape parameters. J. Zhejiang Univ. Sci. C 2011, 12, 800–808. [Google Scholar] [CrossRef]
  10. Allasia, G.; Cavoretto, R.; de Rossi, A. Lobachevsky spline functions and interpolation to scattered data. Comput. Appl. Math. 2013, 32, 71–87. [Google Scholar] [CrossRef]
  11. Cavoretto, R.; Fasshauer, G.E.; McCourt, M. An introduction to the Hilbert-Schmidt SVD using iterated Brownian bridge kernels. Numer. Algorithms 2015, 68, 393–422. [Google Scholar] [CrossRef]
  12. Schumaker, L.L. Spline Functions: Computational Methods; SIAM: Philadelphia, PA, USA, 2015. [Google Scholar]
  13. Allasia, G.; Cavoretto, R.; de Rossi, A.; Quatember, B.; Recheis, W.; Mayr, M.; Demertzis, S. Radial basis functions and splines for landmark-based registration of medical images. In Proceedings of the 8th International Conference on Numerical Analysis and Applied Mathematics (ICNAAM10), AIP Conference Proceedings, Rhodes, Greece, 19–25 September 2010; Simos, T.E., Psihoyios, G., Tsitouras, C., Eds.; Melville: New York, NY, USA, 2010; Volume 1281, pp. 716–719. [Google Scholar]
  14. Allasia, G.; Cavoretto, R.; de Rossi, A. A class of spline functions for landmark-based image registration. Math. Methods Appl. Sci. 2012, 35, 923–934. [Google Scholar] [CrossRef]
  15. Han, X.L. Quadratic trigonometric polynomial curves with a shape parameter. Comput. Aided Geom. Des. 2002, 19, 503–512. [Google Scholar] [CrossRef]
  16. Han, X.L. Cubic trigonometric polynomial curves with a shape parameter. Comput. Aided Geom. Des. 2004, 21, 535–548. [Google Scholar] [CrossRef]
  17. Juhász, I.; Róth, Á. Closed rational trigonometric curves and surfaces. J. Comput. Appl. Math. 2010, 234, 2390–2404. [Google Scholar] [CrossRef]
  18. Han, X.L.; Zhu, Y.P. Curve construction based on five trigonometric blending functions. BIT Numer. Math. 2012, 52, 953–979. [Google Scholar] [CrossRef]
  19. Yan, L.L. An algebraic-trigonometric blended piecewise curve. J. Inf. Comput. Sci. 2015, 12, 6491–6501. [Google Scholar] [CrossRef]
  20. Han, X.L. Normalized B-basis of the space of trigonometric polynomials and curve design. Appl. Math. Comput. 2015, 251, 336–348. [Google Scholar] [CrossRef]
  21. Yan, L.L. Cubic trigonometric nonuniform spline curves and surfaces. Math. Probl. Eng. 2016, 2016, 1–9. [Google Scholar] [CrossRef]
  22. Derose, T.D.; Barsky, B.A. Geometric continuity, shape parameters, and geometric constructions for Catmull-Rom splines. ACM Trans. Gr. 1988, 7, 1–41. [Google Scholar] [CrossRef]
  23. Maggini, M.; Melacci, S.; Sarti, L. Representation of facial features by Catmull-Rom splines. Lecture Notes Comput. Sci. 2007, 4673, 408–415. [Google Scholar]
  24. Yuksel, C.; Schaefer, S.; Keyser, J. Parameterization and applications of Catmull-Rom curves. Comput.-Aided Des. 2011, 43, 747–755. [Google Scholar] [CrossRef]
  25. Uncini, A.; Piazza, F. Blind signal processing by complex domain adaptive spline neural networks. IEEE Trans. Neural Netw. 2003, 14, 399–412. [Google Scholar] [CrossRef] [PubMed]
  26. Scarpiniti, M.; Comminiello, D.; Parisi, R.; Uncini, A. Nonlinear spline adaptive filtering. Signal Process. 2013, 93, 772–783. [Google Scholar] [CrossRef]
  27. Frederic, P.; Agnes, F.; John, M. Cubic Hermite Spline; Alphascript Publishing: Beau Bassin-Rose Hill, Mauritius, 2010. [Google Scholar]
  28. Poliakoff, J.F. An improved algorithm for automatic fairing of non-uniform parametric cubic splines. Comput.-Aided Des. 1996, 28, 59–66. [Google Scholar] [CrossRef]
Figure 1. Curves of the cubic α-Catmull-Rom basis functions for different α.
Figure 1. Curves of the cubic α-Catmull-Rom basis functions for different α.
Mca 21 00033 g001
Figure 2. A segment of the cubic α-Catmull-Rom spline curves for different α.
Figure 2. A segment of the cubic α-Catmull-Rom spline curves for different α.
Mca 21 00033 g002
Figure 3. The cubic α-Catmull-Rom spline curves for different α.
Figure 3. The cubic α-Catmull-Rom spline curves for different α.
Mca 21 00033 g003
Figure 4. The energy curve of the cubic α-Catmull-Rom spline curves.
Figure 4. The energy curve of the cubic α-Catmull-Rom spline curves.
Mca 21 00033 g004
Figure 5. The smoothest cubic α-Catmull-Rom spline curves.
Figure 5. The smoothest cubic α-Catmull-Rom spline curves.
Mca 21 00033 g005
Figure 6. The cubic α-Catmull-Rom spline interpolation function for different α.
Figure 6. The cubic α-Catmull-Rom spline interpolation function for different α.
Mca 21 00033 g006
Figure 7. The optimum cubic α-Catmull-Rom spline interpolation function (n = 10).
Figure 7. The optimum cubic α-Catmull-Rom spline interpolation function (n = 10).
Mca 21 00033 g007
Table 1. Interpolation results for different n.
Table 1. Interpolation results for different n.
nThe Optimal Value of the Shape Parameter αThe Interpolation Error of the Optimum Cubic α-Catmull-Rom SplineThe Interpolation Error of the Standard Cubic Catmull-Rom Spline
101.63405 0.14 × 10 3 0.60 × 10 1
201.11735 0.15 × 10 5 0.49 × 10 3
301.04889 0.84 × 10 7 0.31 × 10 4
401.02677 0.97 × 10 8 0.48 × 10 5

Share and Cite

MDPI and ACS Style

Li, J.; Chen, S. The Cubic α-Catmull-Rom Spline. Math. Comput. Appl. 2016, 21, 33. https://doi.org/10.3390/mca21030033

AMA Style

Li J, Chen S. The Cubic α-Catmull-Rom Spline. Mathematical and Computational Applications. 2016; 21(3):33. https://doi.org/10.3390/mca21030033

Chicago/Turabian Style

Li, Juncheng, and Sheng Chen. 2016. "The Cubic α-Catmull-Rom Spline" Mathematical and Computational Applications 21, no. 3: 33. https://doi.org/10.3390/mca21030033

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop