Keywords

1 Introduction

It is well known that Hermite interpolation and cubic spline interpolation are powerful tools for image processing and geometric modeling by interpolating curves and surfaces. However, they sometime can not exactly represent some conic and conicoid segments. Moreover, curve shapes cannot be adjusted except by their corresponding tangent vectors at the end points based on cubic Hermite interpolation model. On the other hand, as mentioned by Peña [11], the importance of trigonometric polynomials is well known in electronics, medicine, geometric modeling and the area of industrial design [6, 7, 12]. A number of recent papers deal with properties of trigonometric polynomials and their applications: Mainar et al. [8] found some bases for the spaces \(\{1, t, \cos {t}, \sin {t}, \cos {2t}, \sin {2t}\}\), \(\{1\), t, \(t^2\), \(\cos {t}, \sin {t}\}\) and \(\{1\), t, \(\cos {t}\), \(\sin {t}\), \(t\cos {t}\), \(t\sin {t}\}\). Mazure [9] characterized extended Chebyshev spaces by Hermite interpolation and Bernstein bases. Morigi [10] considered a class of generalized polynomials consisting of the null spaces of certain differential operators with constant coefficients which contain ordinary polynomials and appropriately scaled trigonometric polynomials. Su and Tan presented a class of \(C^2\) generalized B-spline like quasi-cubic blended interpolation spline by trigonometric polynomials in [15] and discussed the geometric modeling for interpolation surfaces based on blended coordinate system in [14].

Note that these existing methods can deal with some free-form curves and surfaces (FFC/FFS) and transcendental curves precisely due to the blending bases of polynomial and trigonometric functions, but suffer from complicated procedures in constructing interpolating curves and surfaces.

In 1966, Schweikert [13] introduced a generalization of the classical \(C^{2}\) cubic interpolation spline. For each interval of the knot sequence \(x_{0}<x_{1}<\cdots x_{N},\) the pieces that formed this new class of splines were taken from the four dimensional space

$$span \{1-t, t, \frac{1}{\rho ^{2}_{i}}(\frac{sinh(\rho _{i}(1-t))}{sinh(\rho _{i})}-(1-t)), \frac{1}{\rho ^{2}_{i}}(\frac{sinh(\rho _{i}t)}{sinh(\rho _{i})}-t)\}, t=\frac{x-x_{i}}{x_{i+1}-x_{i}},$$

where \(\rho _{i}\) are tension parameters and as \(\rho _{i}\rightarrow +\infty \), the space tends to the space of linear polynomials. Costantini [3] presented variable degree polynomial spline (VDPS) given by \(span \{(1-t)^{\mu },P_{n-2}, t^{\mu } \}\).

In the area of industrial design, we know that manipulator trajectory planning plays an important role in modern industrial production. The aim of trajectory planning is to generate a geometric path without collision in robot motion space, which is expressed as a sequence of discrete points. In order to ensure that manipulator can move smoothly when it makes high operating speed, we need to design a continuous trajectory to interpolate the given points. So many interpolation curves and corresponding optimal problem have been designed and presented for these discrete given points, such as normal cubic spline curve, B-spline curve, NURBS curve, and so on [2, 5, 12, 16]. We now introduce the new interpolating spilne for the manipulator trajectory planning.

The main purpose of this paper is to develop a new method for constructing interpolating curves and surfaces based on generalized Hermite-like interpolation polynomials. This approach has the following features:

  • The introduced generalized Hermite-like base functions possess the properties similar to those of cubic Hermite base functions. The introduced new interpolation spline is \(C^{2}\) continuous, and the degree of introduced interpolation spline is variable with tension parameters \(\mu _{i}\) and \(\mu _{i+1}\).

  • The shapes of interpolating curves and surfaces by the introduced generalized polynomials can be adjusted by both tension parameters \(\mu _{i}\) and \(\mu _{i+1}\), and corresponding tangent vectors at the end points.

  • With the tension parameters and interpolation points chosen properly, the trigonometric polynomial curves can be used to represent straight lines, parabola, circular arcs and some transcendental curves precisely, the corresponding tensor product surfaces can also represent sphere and some quadric surfaces exactly.

The rest of this paper is organized as follows: Sect. 2 discusses the construction and properties of generalized Hermite-like interpolation polynomials. In Sect. 3, we present a new class of variable degree trigonometric polynomial spline, and analyze the related propositions. The applications via introduced spline in the curves and surfaces modeling and manipulator trajectory planning are demonstrated in Sect. 4. Finally, we conclude the paper in Sect. 5.

2 Quasi-Cubic Hermite-Like Interpolation Polynomials

As we know, normal cubic Hermite base functions of interpolation in the space \(P_{3}([0,1]):= span\{1\), t, \(t^{2}\), \(t^{3}\}\) are defined by

$$\begin{aligned} \begin{array}{l} F_{0}(t)=2t^{3}-3t^{2}+1,\ F_{1}(t)=-2t^{3}+3t^{2},\ G_{0}(t)=t^{3}-2t^{2}+t,\ G_{1}(t)=t^{3}-t^{2}, \end{array} \end{aligned}$$
(1)

where \(t\in [0,1]\); \(F_{i}(t), G_{i}(t), (i=0,1)\) are cubic polynomials satisfying \(F_{0}(t)+F_{1}(t)=1\) and \(G_{0}(t)=-G_{1}(1-t).\)

The four base functions have end points properties:

$$\begin{aligned} \begin{array}{llll} F_{0}(0)=1,&{} F_{1}(0)=0,&{} F_{0}(1)=0,&{} F_{1}(1)=1,\\ G_{0}(0)=0,&{} G_{1}(0)=0,&{} G_{0}(1)=0,&{} G_{1}(1)=0,\\ F'_{0}(0)=0,&{} F'_{1}(0)=0,&{} F'_{0}(1)=0,&{} F'_{1}(1)=0,\\ G'_{0}(0)=1,&{} G'_{1}(0)=0,&{} G'_{0}(1)=0,&{} G'_{1}(1)=1. \end{array} \end{aligned}$$
(2)

These results motivate us to construct blending Hermit-like bases in generalized spaces.

In the following we discuss the cubic Hermite-like interpolation models based on base functions from \(span\{1\), \(cos\frac{\pi }{2}t\), \(sin\frac{\pi }{2}t\), \(cos\pi t\), \((cos\frac{\pi }{2}t)^{\mu _{0}}\), \((sin\frac{\pi }{2}t)^{\mu _{1}}\}\) and \(span\{1\), \(t^{\mu _{0}}\), \((1-t)^{\mu _{0}}\), \(cos\pi t\), \((cos\frac{\pi }{2}t)^{\mu _{1}}\), \((sin\frac{\pi }{2}t)^{\mu _{1}}\}\), \(t\in [0,1]\), \(\mu _{0}\ge 2, \mu _{1}\ge 2\).

Definition 1

For two arbitrarily selected real values of \(\mu _{0},\mu _{1}\) with \(\mu _{i}\in R\), \(\mu _{i} \ge 2, (i=0,1)\), the following four functions in t are defined as trigonometric Hermite polynomials (THP):

$$\begin{aligned} \begin{array}{ll} TF_{0}(t)=(cos\frac{\pi }{2}t)^{2},&{} TF_{1}(t)=(sin\frac{\pi }{2}t)^{2},\\ TG_{0,\mu _{1}}(t)=\frac{2}{\pi }(sin\frac{\pi }{2}t-(sin\frac{\pi }{2}t)^{\mu _{1}}),&{} TG_{1,\mu _{0}}(t)=-\frac{2}{\pi }(cos\frac{\pi }{2}t-(cos\frac{\pi }{2}t)^{\mu _{0}}), \end{array} \end{aligned}$$
(3)

where \(t\in [0,1]\).

Simple calculations verify that

$$\begin{aligned} \begin{array}{llll} TF_{0}(0)=1,&{} TF_{1}(0)=0,&{} TF_{0}(1)=0,&{} TF_{1}(1)=1,\\ TG_{0,\mu _{1}}(0)=0,&{} TG_{1,\mu _{0}}(0)=0,&{} TG_{0,\mu _{1}}(1)=0,&{} TG_{1,\mu _{0}}(1)=0,\\ TF'_{0}(0)=0,&{} TF'_{1}(0)=0,&{} TF'_{0}(1)=0,&{} TF'_{1}(1)=0,\\ TG'_{0,\mu _{1}}(0)=1,&{} TG'_{1,\mu _{0}}(0)=0,&{} TG'_{0,\mu _{1}}(1)=0,&{} TG'_{1,\mu _{0}}(1)=1, \end{array} \end{aligned}$$
(4)

and \(TF_{0}(t)+TF_{1}(t)=1\), \(TG_{0,\mu _{1}}(t)=-TG_{1,\mu _{0}}(1-t)\) for \(\mu _{0}=\mu _{1}\).

Definition 2

For two arbitrarily selected real values of \(\mu _{0},\mu _{1}\) with \(\mu _{i}\in R\), \(\mu _{i} \ge 2, (i=0,1)\), the following four functions in t are defined as generalized trigonometric Hermite polynomials (GTHP):

$$\begin{aligned} \begin{array}{ll} GTF_{0}(t)=(cos\frac{\pi }{2}t)^{2},&{} GTF_{1}(t)=(sin\frac{\pi }{2}t)^{2},\\ GTG_{0}(t)=-\frac{1}{\mu _{0}}((1-t)^{\mu _{0}}-(cos\frac{\pi }{2}t)^{\mu _{1}}),&{} GTG_{1}(t)=\frac{1}{\mu _{0}}(t^{\mu _{0}}-(sin\frac{\pi }{2}t)^{\mu _{1}}), \end{array} \end{aligned}$$
(5)

where \(t\in [0,1]\).

Simple calculations verify that

$$\begin{aligned} \begin{array}{llll} GTF_{0}(0)=1,&{} GTF_{1}(0)=0,&{} GTF_{0}(1)=0,&{} GTF_{1}(1)=1,\\ GTG_{0}(0)=0,&{} GTG_{1}(0)=0,&{} GTG_{0}(1)=0,&{} GTG_{1}(1)=0,\\ GTF'_{0}(0)=0,&{} GTF'_{1}(0)=0,&{} GTF'_{0}(1)=0,&{} GTF'_{1}(1)=0,\\ GTG'_{0}(0)=1,&{} GTG'_{1}(0)=0,&{} GTG'_{0}(1)=0,&{} GTG'_{1}(1)=1, \end{array} \end{aligned}$$
(6)

and \(GTF_{0}(t)+GTF_{1}(t)=1\), \(GTG_{0}(t)=-GTG_{1}(1-t)\).

These properties, like those of normal cubic Hermite polynomials, can be used for two-point Hermite-like interpolating curves with parameters \(\mu _{0}\) and \(\mu _{1}\), which are defined by

$$\begin{aligned} \begin{array}{l} TH_{\mu _{0},\mu _{1}}(t)=p_{0}TF_{0}(t)+p_{1}TF_{1}(t) +p'_{0}TG_{0,\mu _{1}}(t)+p'_{1}TG_{1,\mu _{0}}(t), \end{array} \end{aligned}$$
(7)
$$\begin{aligned} \begin{array}{l} GTH_{\mu _{0},\mu _{1}}(t)=p_{0}GTF_{0}(t)+p_{1}GTF_{1}(t) +p'_{0}GTG_{0}(t)+p'_{1}GTG_{1}(t), \end{array} \end{aligned}$$
(8)

where \(\mu _{0}\), \(\mu _{1} \in R\), \(\mu _{0}\), \(\mu _{1} \ge 2\), \(t \in [0,1]\) and \(p_{0}\), \(p_{1}\), \(p'_{0}\), \(p'_{1}\) are position and derivative vectors on both ends of the segment [0, 1].

For any selected \(\mu _{0}\), \(\mu _{1}\) and vectors \(p_{0}\), \(p_{1}\), \(p'_{0}\), \(p'_{1}\), \(TH_{\mu _{0},\mu _{1}}(t)\) and \(GTH_{\mu _{0},\mu _{1}}(t)\) all represent a unique curve and

$$\begin{array}{ll} TH_{\mu _{0},\mu _{1}}(0)=GTH_{\mu _{0},\mu _{1}}(0)=p_{0},&{} TH_{\mu _{0},\mu _{1}}(1)=GTH_{\mu _{0},\mu _{1}}(1)=p_{1},\\ TH'_{\mu _{0},\mu _{1}}(0)=GTH'_{\mu _{0},\mu _{1}}(0)=p'_{0},&{} TH'_{\mu _{0},\mu _{1}}(1)=GTH'_{\mu _{0},\mu _{1}}(1)=p'_{1}. \end{array}$$

Especially, if \(\mu _{0}=\mu _{1}=2\), we can get

\(TH_{2,2}(t)=(1, cos\frac{\pi }{2}t, sin\frac{\pi }{2}t, cos\pi t) \left( \begin{array}{cccc} \frac{1}{2} &{} \frac{1}{2} &{} -\frac{1}{\pi } &{} \frac{1}{\pi } \\ 0 &{} 0 &{} 0 &{} -\frac{2}{\pi } \\ 0 &{} 0 &{} \frac{2}{\pi } &{} 0\\ \frac{1}{2} &{} -\frac{1}{2} &{} \frac{1}{\pi } &{} \frac{1}{\pi } \end{array} \right) \left( \begin{array}{c} p_{0} \\ p_{1} \\ p'_{0} \\ p'_{1} \end{array} \right) ,\)

and

\(GTH_{2,2}(t)=(1, t, t^{2}, cos\pi t) \left( \begin{array}{cccc} \frac{1}{2} &{} \frac{1}{2} &{} -\frac{1}{4} &{} -\frac{1}{4} \\ 0 &{} 0 &{} 1 &{} 0 \\ 0 &{} 0 &{} -\frac{1}{2} &{} \frac{1}{2}\\ \frac{1}{2} &{} -\frac{1}{2} &{} \frac{1}{4} &{} \frac{1}{4} \end{array} \right) \left( \begin{array}{c} p_{0} \\ p_{1} \\ p'_{0} \\ p'_{1} \end{array} \right) .\)

Fig. 1.
figure 1

The (a) and (c) show the families of four THP and GTHP base functions respectively, dashed lines represent normal cubic Hermite base functions. The (b) and (d) indicate the families of THP and GTHP curves for given \(p_{0}, p_{1}, p'_{0}, p'_{1}\) respectively.

3 The Variable Degree Spline via Trigonometric Polynomials

Definition 3

Given a knot vector \(U: x_{0}<x_{1}<\cdots <x_{N}\). Let \(\mathbf TS ^{\mu }_{3}=\{ s(x) \in C^{2}[x_{0},x_{N}]\) s.t. \(s(x)\in \mathbf TP ^{\mu _{i},\mu _{i+1}}_{3}\) for \(x\in [x_{i},x_{i+1}],i=0,1,\cdots ,N-1 \}\), where

\(\mathbf TP ^{\mu _{i},\mu _{i+1}}_{3}:=\) \(span\{1\), \(cos\frac{\pi }{2}t\), \(sin\frac{\pi }{2}t\), \(cos\pi t\), \((cos\frac{\pi }{2}t)^{\mu _{i}}\), \((sin\frac{\pi }{2}t)^{\mu _{i+1}}\}\), \(t=\frac{x-x_{i}}{x_{i+1}-x_{i}}\); \(\mu _{i} \ge 2\), \(\mu _{i+1} \ge 2\), \(\mu _{i},\mu _{i+1} \in R.\)

If \(s(x)\in \mathbf TS ^{\mu }_{3}\) and \(s(x_{i})=y_{i}\), we call s(x) trigonometric Hermite-like interpolation spline(THIS).

Definition 4

Given a knot vector \(U: x_{0}<x_{1}<\cdots <x_{N}\). Let \(\mathbf GTS ^{\mu }_{3}=\{ s(x) \in C^{2}[x_{0},x_{N}]\) s.t. \(s(x)\in \mathbf GTP ^{\mu _{i},\mu _{i+1}}_{3}\) for \(x\in [x_{i},x_{i+1}],i=0,1,\cdots ,N-1 \}\), where

\(\mathbf GTP ^{\mu _{i},\mu _{i+1}}_{3}:=\) \(span\{1\), \(t^{\mu _{i}}\), \((1-t)^{\mu _{i}}\), \(cos\pi t\), \((cos\frac{\pi }{2}t)^{\mu _{i+1}}\), \((sin\frac{\pi }{2}t)^{\mu _{i+1}}\}\), \(t=\frac{x-x_{i}}{x_{i+1}-x_{i}}\), \(\mu _{i}\ge 2\), \(\mu _{i+1} \ge 2\), \(\mu _{i},\mu _{i+1} \in R.\)

If \(s(x)\in \mathbf GTS ^{\mu }_{3}\) and \(s(x_{i})=y_{i}\), we call s(x) generalized trigonometric Hermite-like interpolation spline (GTHIS).

Let \(h_{j-1}=x_{j}-x_{j-1}\), \(\lambda _{j-1}=\frac{h_{j}}{h_{j-1}+h_{j}}\), \(j=1, 2, \cdots , N\).

From Definitions 3 and 4, we set

$$\begin{aligned} \begin{array}{l} TH_{j,3}^{\mu _{i},\mu _{i+1}}(x(t))=y_{j-1}TF_{0}(t)+y_{j}TF_{1}(t) +h_{j}(m_{j-1}TG_{0,\mu _{1}}(t)+m_{j}TG_{1,\mu _{0}}(t)),\\ GTH_{j,3}^{\mu _{i},\mu _{i+1}}(x(t))=y_{j-1}GTF_{0}(t)+y_{j}GTF_{1}(t) +h_{j}(m_{j-1}GTG_{0}(t)+m_{j}GTG_{1}(t)),\\ j=0,1,\cdots ,N-1. \end{array} \end{aligned}$$
(9)

Note: In the different interval, we can replace \(\mu _{0}\) and \(\mu _{1}\) in the above base functions in Eq. (9) respectively. Correspondingly, \(TG_{0,\mu _{1}}\triangleq TG_{0,\mu _{i+1}}, TG_{0,\mu _{0}}\triangleq TG_{0,\mu _{i}}\).

We now know that \(TH_{j-1,3}^{\mu _{j-1,0},\mu _{j-1,1}}(x(t))\) and \(GTH_{j-1,3}^{\mu _{j-1,0},\mu _{j-1,1}}(x(t))\) are \(C^{1}\) continuous. But if we suppose that \(TH_{j-1,3}^{\mu _{j-1,0},\mu _{j-1,1}}(x(t))\) and \(GTH_{j-1,3}^{\mu _{j-1,0},\mu _{j-1,1}}(x(t))\) are \(C^{2}\) continuous, then \(m_{j}, (j=0,1,\cdots N)\) must be solved. We can suppose

$$\begin{aligned} \frac{d^{2}}{dx^{2}}TH_{j-1,3}^{\mu _{j-1,0},\mu _{j-1,1}}(x_{j}^{-})= \frac{d^{2}}{dx^{2}}TH_{j,3}^{\mu _{j,0},\mu _{j,1}}(x_{j}^{+}), \end{aligned}$$
(10)
$$\begin{aligned} \frac{d^{2}}{dx^{2}}GTH_{j-1,3}^{\mu _{j-1,0},\mu _{j-1,1}}(x_{j}^{-})= \frac{d^{2}}{dx^{2}}GTH_{j,3}^{\mu _{j,0},\mu _{j,1}}(x_{j}^{+}), \end{aligned}$$
(11)

\(j=1,2,\cdots ,N-1\).

(1) Now we discuss the functions of \(TH_{j-1,3}^{\mu _{j-1,0},\mu _{j-1,1}}(x(t))\).

If \(\mu _{0}=\mu _{1}=2\), we get

$$\lambda _{j}m_{j-1}+2m_{j}+(1-\lambda _{j})m_{j+1}= \pi [\frac{1-\lambda _{j}}{h_{j+1}}(y_{j+1}-y_{j})+ \frac{\lambda _{j}}{h_{j}}(y_{j}-y_{j-1})], j=1,2,\cdots ,N-1.$$

Given initial values \(m_{0}=y'_{0}, m_{N}=y'_{N}\), we can solve the Eq. (10) for \(m_{j}\), \((j=1,2,\cdots ,N-1)\). Especially, if \(h_{j}=h_{j+1}=1\), \(j=0,1,\cdots ,N-1\), then we get:

$$\left( \begin{array}{ccccccc} 1 &{} 0 &{} 0 &{} \cdots &{} 0 &{} 0 &{} 0\\ 1 &{} 4 &{} 1 &{} \cdots &{} 0 &{} 0 &{} 0\\ \vdots &{} \vdots &{} \vdots &{} \ddots &{} \vdots &{} \vdots &{} \vdots \\ 0 &{} 0 &{} 0 &{} \cdots &{} 1 &{} 4 &{} 1 \\ 0 &{} 0 &{} 0 &{} \cdots &{} 0 &{} 0 &{} 1 \\ \end{array} \right) \left( \begin{array}{c} m_{0} \\ m_{1} \\ \vdots \\ m_{N-1}\\ m_{N} \end{array} \right) =\left( \begin{array}{c} y'_{0} \\ \pi (y_{2}-y_{0}) \\ \vdots \\ \pi (y_{N}-y_{N-2})\\ y'_{N} \end{array} \right) $$

(2) For the functions of \(GTH_{j-1,3}^{\mu _{j-1,0},\mu _{j-1,1}}(x(t))\) from Eq. (11), we have

(i) If \(\mu _{j-1,0}=\mu _{j-1,1}=2\), then

$$(\frac{\pi ^{2}}{4}-1)\lambda _{j}m_{j-1}+(\frac{\pi ^{2}}{4}+1)m_{j}+(\frac{\pi ^{2}}{4}-1)(1-\lambda _{j})m_{j+1} =\frac{\pi ^{2}}{2}[\frac{1-\lambda _{j-1}}{h_{j}}(y_{j+1}-y_{j})+ \frac{\lambda _{j-1}}{h_{j-1}}(y_{j}-y_{j-1})],$$

\(j=1,2,\cdots ,N-1\).

(ii) If \(\mu _{j-1,0}=2,\, \mu _{j-1,1}>2\), then

$$\lambda _{j-1}m_{j-1}+k_{j}m_{j}+(1-\lambda _{j-1})m_{j+1} =\frac{\pi ^{2}}{2}[\frac{1-\lambda _{j-1}}{h_{j}}(y_{j}-y_{j+1})+ \frac{\lambda _{j-1}}{h_{j-1}}(y_{j-1}-y_{j})],$$

where \(k_j=-\frac{\pi ^{2}}{8}[(1-\lambda _{j-1})\mu _{j,1}+\lambda _{j-1}\mu _{j-1,1}]-1\), \(j=1,2,\cdots ,N-1\).

(iii) If \(\mu _{j-1,1}=2,\, \mu _{j-1,0}>2\), then

$$\frac{\pi ^{2}}{2\mu _{j-1,0}}\lambda _{j-1}m_{j-1}+k_{j}m_{j}+\frac{\pi ^{2}}{2\mu _{j,0}}(1-\lambda _{j-1})m_{j+1} =\frac{\pi ^{2}}{2}[\frac{1-\lambda _{j-1}}{h_{j}}(y_{j+1}-y_{j})+ \frac{\lambda _{j-1}}{h_{j-1}}(y_{j}-y_{j-1})],$$

where \(k_j=\lambda _{j-1}[(\mu _{j-1,0}-1)+\frac{\pi ^{2}}{2\mu _{j-1,0}}]+(1-\lambda _{j-1})[(\mu _{j,0}-1)+\frac{\pi ^{2}}{2\mu _{j,0}}], j=1,2,\cdots ,N-1\).

Also with the initial values of \(m_{0}, m_{N}\), we can solve the \(m_{j} (j=1,2,\cdots , N-1)\) from the above equations.

(iv) If \(\mu _{j-1,0}>2, \mu _{j-1,1}>2\), we get

$$m_{j}=\frac{\pi ^{2}}{2k_j}[\frac{1-\lambda _{j-1}}{h_{j}}(y_{j+1}-y_{j})+ \frac{\lambda _{j-1}}{h_{j-1}}(y_{j}-y_{j-1})],$$

where \(k_j=\lambda _{j-1}[(\mu _{j-1,0}-1)+\frac{\pi ^{2}}{4}\frac{\mu _{j-1,1}}{\mu _{j-1,0}}] +(1-\lambda _{j-1})[(\mu _{j,0}-1)+\frac{\pi ^{2}}{4}\frac{\mu _{j,1}}{\mu _{j,0}}], j=1,2,\cdots ,N-1\).

Note: In this conditions of (iv), we do not need to solve the linear system for \(m_{j},( j=0,1,\cdots ,N)\) to construct the cubic Hermite-like interpolation spline \(GTH_{j-1,3}^{\mu _{j-1,0},\mu _{j-1,1}}(x(t))\)

Fig. 2.
figure 2

(a) The figures of function g(x), normal cubic interpolation spline curves and GTHIS curves with \(\mu _{0}=\mu _{1}=3\). (b) The figure describes the interpolation errors associated with GTHIS curves and normal cubic interpolation spline curves.

Example 1: Given \( g(x)=\frac{sin x}{x}\), knot vector \(U:=(0, \frac{\pi }{2}, \pi , \frac{3\pi }{2})\) and corresponding derivative values \(g'(x_{j}):=(0,-\frac{4}{\pi ^{2}},-\frac{1}{\pi },\frac{4}{9\pi ^{2}}), (j=0,1,2,3)\). If we interpolate the values of function g(x) and corresponding derivative values \(g'(x_{j})\) at the knots, we can obtain a GTHIS curve by choosing \(\mu _{0}=\mu _{1}=3\) without solving m-system of equations (See: Fig. 2(a)). Figure 2(b) indicates the error function of interpolation spline associated with the GTHIS spline and cubic polynomial spline, which shows that the GTHIS spline has a better approximation order than cubic interpolation spline.

4 The Applications by Introduced Variable Degree Spline

4.1 The Applications of Introduced Spline in the Curves and Surfaces Modeling

Let us suppose that \(p'_{0}=k_{0}u_{0}\) and \(p'_{1}=k_{1}u_{1}\), where \(u_{0}:=\frac{p'_{0}}{||p'_{0}||}, u_{1}:=\frac{p'_{1}}{||p'_{1}||}\). By varying \(k_{0}\) and \(k_{1}\), we can obtain an infinite family of curves, all of which have the same end points and slopes, but entirely different interior shapes.

Given four points \(q_{0}, q_{1}, q_{2}\) and \(q_{3}\) with \((q_{i}\in R^{n}\), \(n\in \mathrm {N}\), \(i=0, 1, 2, 3),\) we can obtain a trigonometric model for \(p_{0}:=q_{0}, p_{1}:=q_{1}, p'_{0}:=q_{2}-q_{0}, p'_{1}:=q_{3}-q_{1}\). In this case, a new class of geometric forms is obtained by

$$\begin{aligned} \begin{array}{l} TH_{\mu _{0},\mu _{1}}(t)=q_{0}TB_{0,\mu _{0},\mu _{1}}(t)+q_{1}TB_{1,\mu _{0},\mu _{1}}(t) +q_{2}TB_{2,\mu _{0},\mu _{1}}(t)+q_{3}TB_{3,\mu _{0},\mu _{1}}(t), \end{array} \end{aligned}$$
(12)
$$\begin{aligned} \begin{array}{l} GTH_{\mu _{0},\mu _{1}}(t)=q_{0}GTB_{0,\mu _{0},\mu _{1}}(t)+q_{1}GTB_{1,\mu _{0},\mu _{1}}(t) +q_{2}GTB_{2,\mu _{0},\mu _{1}}(t)+q_{3}GTB_{3,\mu _{0},\mu _{1}}(t), \end{array} \end{aligned}$$
(13)

where \(\mu _{0}\), \(\mu _{1} \in R\), \(\mu _{0}\), \(\mu _{1} \ge 2\), \(t \in [0,1]\).

Proposition 1

Using the above notations, we have:

$$\begin{aligned} \begin{array}{ll} TB_{0,\mu _{0},\mu _{1}}(t)=cos^{2}\frac{\pi }{2}t-\frac{2}{\pi }sin\frac{\pi }{2}t+\frac{2}{\pi }sin^{\mu _{1}}\frac{\pi }{2}t,&{} TB_{1,\mu _{0},\mu _{1}}(t)=sin^{2}\frac{\pi }{2}t+\frac{2}{\pi }cos\frac{\pi }{2}t-\frac{2}{\pi }cos^{\mu _{0}}\frac{\pi }{2}t,\\ TB_{2,\mu _{0},\mu _{1}}(t)=\frac{2}{\pi }(sin\frac{\pi }{2}t-sin^{\mu _{1}}\frac{\pi }{2}t),&{} TB_{3,\mu _{0},\mu _{1}}(t)=-\frac{2}{\pi }(cos\frac{\pi }{2}t-cos^{\mu _{0}}\frac{\pi }{2}t), \end{array} \end{aligned}$$
(14)
$$\begin{aligned} \begin{array}{ll} GTB_{0,\mu _{0},\mu _{1}}(t)=cos^{2}\frac{\pi }{2}t+\frac{1}{\mu _{0}}(1-t)^{\mu _{0}}-\frac{1}{\mu _{0}}cos^{\mu _{1}}\frac{\pi }{2}t,&{} GTB_{1,\mu _{0},\mu _{1}}(t)=sin^{2}\frac{\pi }{2}t-\frac{1}{\mu _{0}}t^{\mu _{0}}+\frac{1}{\mu _{0}}sin^{\mu _{1}}\frac{\pi }{2}t,\\ GTB_{2,\mu _{0},\mu _{1}}(t)=-\frac{1}{\mu _{0}}(1-t)^{\mu _{0}}+\frac{1}{\mu _{0}}cos^{\mu _{1}}\frac{\pi }{2}t,&{} GTB_{3,\mu _{0},\mu _{1}}(t)=\frac{1}{\mu _{0}}t^{\mu _{0}}-\frac{1}{\mu _{0}}sin^{\mu _{1}}\frac{\pi }{2}t. \end{array} \end{aligned}$$
(15)

Parabola, circular arcs and some transcendental curves can be represented precisely by choosing proper \(q_{0}, q_{1}, q_{2}, q_{3}\) and \(\mu _{0}, \mu _{1}\). Denote \(TH(t):=TH_{\mu _{0},\mu _{1}}(t)\), \(GTH(t):=GTH_{\mu _{0},\mu _{1}}(t)\) and \(TB_{i}(t):=TB_{i,\mu _{0},\mu _{1}}(t)\), \(GTB_{i}(t):=GTB_{i,\mu _{0},\mu _{1}}(t), (i=0,1,2,3)\) in the remainder of the paper. For example:

(i) Let \(q_{0}=q_{2}\) and \(q_{1}=q_{3}\). Then \(TH(t)=GTH(t)=q_{0}cos^{2}\frac{\pi }{2}t\) \(+q_{1}sin^{2}\frac{\pi }{2}t\) \(= q_{1}+(q_{0}\) \(-q_{1})cos^{2}\frac{\pi }{2}t\). So TH(t) and GTH(t) all represent a line segment precisely in these conditions.

(ii) Let \(q_{0}=\frac{2}{\pi }(q_{1}-q_{3}), q_{1}=\frac{2}{\pi }(q_{2}-q_{0})\) and \(\mu _{0}=\mu _{1}=2\), (\(*\))

or let \(q_{1}-q_{0}=\frac{2}{\pi }(q_{3}+q_{2}-q_{1}-q_{0})\) and \(\mu _{0}=\mu _{1}=2\).(\(**\))

Then TH(t) represents a segment of elliptic arc for proper \(q_{0}, q_{1}, q_{2}, q_{3}\).

In fact, under the conditions of (\(*\)), we can get \(TH(t)=q_{0}cos\frac{\pi }{2}t+q_{1}sin\frac{\pi }{2}t\). Especially, if \(q_{0}=(1,0), q_{1}=(0,1)\), then \(q_{2}=(1, \frac{\pi }{2}), q_{3}=(-\frac{\pi }{2},1)\). So \(TH(t)=(cos\frac{\pi }{2}t, sin\frac{\pi }{2}t).\)

Under the conditions of (\(**\)), we can get \(TH(t)=q_{0}+\frac{2}{\pi }(q_{3}-q_{1})+\frac{2}{\pi }(q_{1}-q_{3})cos\frac{\pi }{2}t +\frac{2}{\pi }(q_{2}-q_{0})sin\frac{\pi }{2}t\). So we know that TH(t) can represent a segment of circular and elliptic arc precisely (See: Fig. 3(a)).

(iii) Let \(\mu _{0}=\mu _{1}=2\). By simple calculations, we know that both TH(t) and GTH(t) represent quadratic polynomial curves. In fact, from (14) and (15), we have

$$\begin{aligned} \begin{array}{l} 1=TB_{0}(t)+TB_{1}(t)+TB_{2}(t)+TB_{3}(t),\\ sin\frac{\pi }{2}t=TB_{1}(t)+TB_{3}(t)+\frac{\pi }{2}TB_{2}(t),\\ sin^{2}\frac{\pi }{2}t=TB_{1}(t)+TB_{3}(t).\\ \end{array} \end{aligned}$$
(16)
$$\begin{aligned} \begin{array}{l} 1=GTB_{0}(t)+GTB_{1}(t)+GTB_{2}(t)+GTB_{3}(t),\\ t=GTB_{1}(t)+GTB_{2}(t)+2GTB_{3}(t)\\ t^{2}=GTB_{1}(t)+3GTB_{3}(t). \end{array} \end{aligned}$$
(17)

(iv) If \(q_{0}-q_{2}=q_{1}-q_{3}\), \(q_{0}=-q_{1}\) and \(\mu _{0}=\mu _{1}=2\), then \(GTH(t)=\frac{1}{2}(q_{0}-q_{2})+(q_{2}-q_{0})t+\frac{1}{2}(q_{0}+q_{2})cos(\pi t).\) So GTH(t) can represent a segment of sine or cosine curve for proper \(q_{0},q_{2}\). Especially, if \(q_{0}=(1,1), q_{2}=(-1,1)\), then \(GTH(t)=(x(t),y(t))=(1-2t,cos(\pi t))\), \(t\in [0,1]\). So GTH(t) represents a segment of sine curves (See: Fig. 3(b)).

(v) If \(q_{0}=-q_{2}\), \(q_{3}=3q_{1}\) and \(\mu _{0}=2,\mu _{1}=2\), then \(GTH(t)=q_{0}(1-t)^{2}+q_{1}t^{2}.\) So GTH(t) can represent the curve \(\sqrt{x}+\sqrt{y}=1\) precisely for proper \(q_{0},q_{1}\). Especially, if \(q_{0}=(1,0), q_{1}=(0,1)\), then \(GTH(t)=(x(t),y(t))=((1-t)^{2},t^{2})\), \(t\in [0,1]\). So \(\sqrt{x}+\sqrt{y}=1\) (See: Fig. 3(c)).

Fig. 3.
figure 3

(a) A segment of circular arc is represented precisely by THP curves. (b) A segment of sine curves is represented precisely by GTHP curves. (c) A segment of curves with \(\sqrt{x}+\sqrt{y}=1\) is represented precisely by GTHP curves.

We can generalize the methods, which are used to construct THP and GTHP curves, to bicubic Coons-like surfaces.

Definition 5

If H(uv) is a bivariate continuous vector function defined in the parameter domain of \([0,1]\times [0,1]\), we can construct a bicubic Hermite-like interpolating surface \(SH(u,v)=H(u)\cdot M\cdot T(v)\) which interpolates the end points and corresponding tangent vectors:

$$ H(u)=(TH_{0}(u),TH_{1}(u),TH_{2}(u),TH_{3}(u)); T(v)=(TH_{0}(v),TH_{1}(v),TH_{2}(v),TH_{3}(v))^T $$
$$ C=\left( \begin{array}{cccc} H(0,0) &{} H(0,1) &{} H'_{v}(0,0) &{} H'_{v}(0,1) \\ H(1,0) &{} H(1,1) &{} H'_{v}(1,0) &{} H'_{v}(1,1) \\ H'_{u}(0,0) &{} H'_{u}(0,1) &{} H''_{uv}(0,0) &{} H''_{uv}(0,1) \\ H'_{u}(1,0) &{} H'_{u}(1,1) &{} H''_{uv}(1,0) &{} H''_{uv}(1,1) \\ \end{array} \right) . $$

Given the values of function H(uv), corresponding tangent vectors and up to second partial derivatives at the end points, we can construct THP surfaces and GTHP surfaces by corresponding THP polynomials (3) and GTHP polynomials (5).

Figure 4(a1) offers a segment of sphere and interpolating surfaces, Fig. 4(b1) indicates the error function of original surface and interpolating surface associated with bicubic Hermite interpolation polynomials, Fig. 4(c1) shows the error function associated with original surface and THP surface.

Fig. 4.
figure 4

The figures of original surface, interpolating surface, and corresponding error functions by THP and GTHP interpolation respectively.

Figure 4(a2) offers another original function of \(H(u,v)=(x(u,v), y(u,v),z(u,v))\) associated with \(x(u,v)=e^{u+v}\), \(y(u,v)=e^{u-v}\), \(z(u,v)=uv\) and interpolating surface, Fig. 4(b2) indicates the error function of original surface H(uv) and interpolating surface associated with bicubic Hermite interpolation polynomials, Fig. 4(c2) explains the error function associated with GTHP surface and surface H(uv).

From these figures we know that the interpolating surfaces associated with the THP surface for the first original function and the GTHP surface for the second original function have a better approximate order than the interpolating surface associated with bicubic Hermite interpolating polynomials.

4.2 The Applications of Introduced Spline in the Manipulator Trajectory Planning

In this section, we consider the applications of introduced spline in the manipulator trajectory planning. Our goal is to find a path which connects the given start point and the target point, and make the manipulator move smoothly between the two end points while avoiding all obstacles in the motion. In our approach, the variable degree spline interpolation based method is applied to construct the trajectory. Moreover, the generated trajectories have continues values of the accelerations without solving equations system, and thus ensures the smoothness of the trajectory. The generation process of trajectories with the variable degree spline possess the lower computational complexity than the one via normal polynomial spline method.

Given a sequence of data points \(q_{i}, (i=0,1,\cdots , N)\) in joint space of manipulation, planning manipulator trajectory with the variable degree interpolation spline. The input data point has been taken to be the same as in [16], in order to make a comparison with the results obtained from the experiment. Let four data points in joint space, \(q_0(0,60), q_1(1,-50), q_2(3,80), q_3(4,100)\), the time is used as the X-axis and the joint angle is used as the Y-axis. Given the initial conditions, acceleration is zero in start and end points. Here, we compare the acceleration curves via the variable degree interpolation spline with the one by cubic spline and the cubic triangular Bézier spline [16] in Fig. 5.

Fig. 5.
figure 5

The acceleration curves via the cubic spline (a), the cubic triangular Bézier spline [16] (b), and the variable degree interpolation spline (c)

As stated in the foregoing, we described the trajectory of manipulator. However, in modern industrial production, the speed of operation directly affects the productivity. If the manipulator can achieve the maximized the speed of operation, the traveling time must be minimized. Therefore, the optimization problem is to adjust the time intervals between via-points such that the total traveling time is minimum. There are N joints which must be considered. Now, for the joint \(j~(1\leqslant j\leqslant N)\), let \( q_{1}, q_{2},\cdots ,q_{n}\) be the via-points in joint space and \( t_{1}, t_{2},\cdots ,t_{n}\) be the sequence of time instants corresponding to the via-points; let \(h_{i}=t_{i+1}-t_{i}~(i=1,2,\cdots ,n-1)\) be the time interval between two consecutive via-points and \(a_{i}\) be the acceleration of the interpolation \(q_{i}\),\(S_{j,i}(t)\triangleq GTH_{j,3}^{\mu _{j,0},\mu _{j,1}}(x(t))\) be the variable degree interpolation spline for the jth joint defined on the interval \([t_{i},t_{i+1}]\). It is assumed that the position, velocity, acceleration are continuous on this time interval. \(S_{j,i}(t),S'_{j,i}(t),S''_{j,i}(t)\) and \(S'''_{j,i}(t)~(t\in [t_{i},t_{i+1}])\) are the position, velocity, acceleration and jerk between the via-points \(q_{i}\) and \(q_{i+1}\) respectively. The \(v_{1}\) and \(v_{n},a_{1}\) and \(a_{n}\) are joint velocities and joint accelerations at the initial time \(t=t_{1}\) and at the terminal time \(t=t_{n}\). According to the definition of quasi-cubic Hermite-like interpolation polynomials, we have:

$$\begin{aligned} \begin{array}{l} S_{j,i}(x(t))=q_{j,i}GTF_{0}(t)+q_{j,i+1}GTF_{1}(t)+h_{i}(v_{j,i}GTG_{0}(t)+v_{j,i+1}GTG_{1}(t))\\ S'_{j,i}(x(t))=\frac{1}{h_{i}}(q_{j,i}GTF'_{0}(t)+q_{j,i+1}GTF'_{1}(t))+v_{j,i}GTG'_{0}(t)+v_{j,i+1}GTG'_{1}(t)\\ S''_{j,i}(x(t))=(\frac{1}{h_{i}})^2(q_{j,i}GTF''_{0}(t)+q_{j,i+1}GTF''_{1}(t))+\frac{1}{h_{i}}(v_{j,i}GTG''_{0}(t)+v_{j,i+1}GTG''_{1}(t))\\ S'''_{j,i}(x(t))=(\frac{1}{h_{i}})^3(q_{j,i}GTF'''_{0}(t)+q_{j,i+1}GTF'''_{1}(t))+(\frac{1}{h_{i}})^2(v_{j,i}GTG'''_{0}(t)+v_{j,i+1}GTG'''_{1}(t))\\ j=1,2,\cdots ,N,i=1,2,\cdots ,n-1 \end{array} \end{aligned}$$
(18)

From Eq. (11), let \(\mu =3\), we have:

$$\begin{aligned} \begin{array}{l} v_{j,i}=\frac{2\pi ^2}{8+\pi ^2}[\frac{1-\lambda _{i-1}}{h_{i}}(q_{j,i+1}-q_{j,i})+\frac{\lambda _{i-1}}{h_{i-1}}(q_{j,i}-q_{j,i-1})],i=2,\cdots ,n-1,j=1,2,\cdots ,N \end{array} \end{aligned}$$
(19)

In order to apply the mathematic model, the kinematics constraints should be formulated, for convenience, let

$$\begin{aligned} \begin{array}{l} VC_{j}=velocity\;constraint\;for\;the\;jth\;joint\\ WC_{j}=acceleration\;constraint\;for\;the\;jth\;joint\\ JC_{j}=jerk\;constraint\; for\;the\;jth\; joint\\ \end{array} \end{aligned}$$

The optimal problem is formulated mathematically as follows.

Objective function:

$$\begin{aligned} Minimize \qquad T=\sum _{i=1}^{n-1}h_{i} \end{aligned}$$
(20)

Constraints:

$$\begin{aligned} {\left\{ \begin{array}{ll} |S'_{j,i}(x(t))|\leqslant VC_{j},\\ |S''_{j,i}(x(t))|\leqslant WC_{j},j=i,\cdots ,N, i=1,\cdots ,n \\ |S'''_{j,i}(x(t))|\leqslant JC_{j}, \end{array}\right. } \end{aligned}$$
(21)

The above constraints can be expressed in explicit forms by Eqs. (18) and (19) as follows: Objective function:

$$\begin{aligned} Minimize \qquad T=\sum _{i=1}^{n-1}h_{i} \end{aligned}$$

s.t.

$$\begin{aligned} {\left\{ \begin{array}{ll} max\{|v_{j,i}|,|v_{j,i+1}|\}+\frac{\pi }{2h_{i}}|p_{i+1}-p_{i}|+\frac{\pi }{4}\sqrt{v_{j,i}^2+v_{j,i+1}^2}\leqslant VC_{j},\\ \frac{\pi ^2}{2h_{i}^2}|p_{i+1}-p_{i}|+\frac{2v_{j,i+1}}{h_{i}}+\frac{3\pi ^2}{8h_{i}}\sqrt{v_{j,i}^2+v_{j,i+1}^2}\leqslant WC_{j},\\ \frac{\pi ^3}{2h_{i}^3}|p_{i+1}-p_{i}|+\frac{2(v_{j,i}+v_{j,i+1}))}{h_{i}^2}+\frac{9\pi ^3}{16h_{i}^2}\sqrt{v_{j,i}^2+v_{j,i+1}^2}\leqslant JC_{j},\\ h_{i}\geqslant max{\frac{|q_{j,i+1}-q_{j,i}|}{VC_{j}}},\\ \end{array}\right. } j=1,\cdots ,N,i=1,\cdots ,n \end{aligned}$$
(22)

since \(h_{i}\) are the time parameters, and should be subject to a lower bound.

Here, we briefly described the optimization algorithm and will achieve the experiment in simulation for manipulator. The input data has been taken to the same as in [2] (Table 1).

Table 1. Input data for trajectory planning
Table 2. Kinematics limits of the joints
Table 3. Simulation results

5 Conclusions and Discussions

We have proposed a new class of Hermite-like interpolation polynomials and a variable degree trigonometric polynomial interpolation spline. The technique enhances the control capability of curves and surfaces with the control points and parameters \(\mu _{0}\) and \(\mu _{1}\). In addition, we can replace parameters \(\mu _{0}\) and \(\mu _{1}\) by different parameters \(\mu _{i}\) and \(\mu _{i+1}\) in the different interval. So the new curves are locally-controllable via the different parameters \(\mu _{i}\) and \(\mu _{i+1}\). Moreover, the introduced curves can represent straight lines, polynomial curves, conics and some transcendental curves precisely (Tables 2 and 3).

For CAD field, the four points form a control polygon and these control points can be used to adjust curve shape in a predictable and natural way. The form of generalized interpolation model is a good candidate for use in an interactive environment to design curves for CAD system and in computer graphics applications.

The new interpolation methods can offer higher approximation order than normal Hermite polynomial interpolation method, but do not need to solve m-system of equations for proper parameters.

Experiment results show the new presented spline can be introduced in the area of industrial design. It has a better approximation order with GTHIS spline than the case with the cubic interpolation spline in the curves and surfaces modeling, and we can design a continuous trajectory to interpolate the given points in the trajectory planning to ensure that manipulator can move smoothly when it makes high operating speed. The generation process of curves and surfaces modeling and trajectories planning with the variable degree spline possess the lower computational complexity than the one via normal polynomial spline method.