1 Introduction

Scattered data interpolation arises in many scientific and engineering fields. This method can be used to represent the observed or computed values of some physical quantities such as global temperature, rainfall distribution at some country or station, digital elevation, or the stress measurement in finite element methods. Furthermore, it can be used for spatial data interpolation.

There are two methods that can be used in scattered data interpolation i.e. meshfree and triangulation-based schemes. For instance, one of the simplest meshfree methods is Shepard’s global surface scheme [2]. Many authors have improved the work of Shepard by proposing many new ideas on the extension of the original method. For instance, RBF, thin plate spline, and compactly supported positive definite function [2, 10, 11]. Crivellaro et al. [5] applied RBFs to reconstruct 3D scattered data. To achieve this, they proposed new algorithms involving an adaptive multi-level interpolating approach based on implicit surface representation and least square approximation to filter the noisy data. Liu [23] proposed local multilevel scattered data interpolation by employing nested scattered data sets and scaled the RBFs compactly. The method guarantees convergence. Majdisova and Skala [25, 26] discussed the applications of RBFs for big geo data as well as finding the best basis for function approximations. A good survey on scattered data interpolation using meshfree methods and other methods can be found in Lodha and Franke [24], Franke and Nielson [10, 11], and Franke [9]. MATLAB implementation for meshfree methods can be found in Fasshauer [7].

In triangulation-based approach for scattered data interpolation, cubic Bézier triangular or quantic Bézier triangular patches are the common methods that have been used. Quartic Bézier triangular has received less attention due to the need to apply an optimization problem in solving the scattered data interpolation problem. This increases the computation time. There are four steps in constructing surface by using a triangulation method: (a) start with triangulation of the domain by using Delaunay triangulation; (b) specify the first partial derivative at the data points (sites) [16]; (c) assign the control points or ordinates for each triangular patch; and (d) finally, construct the surface via convex combination scheme. Lawson in 1977 gave the idea on construction of the surface via triangulation-based approach [13]. Goodman and Said [13] constructed the suitable \(C^{1}\) triangular interpolant for scattered data interpolation using a convex combination scheme from three local schemes. Their work is different from that of Foley and Opitz [8], even though both studies developed a \(C^{1}\) cubic triangular convex combination scheme. Said and Rahmat [29] constructed a scattered data surface by using cubic Ball triangular patches of Goodman and Said [13]. Considering numerical results, the results are almost the same as by using cubic Bézier triangular patches except that the computation is less by 7% by using cubic Ball triangular [14, 15]. Karim and Saaban [21] have proved that the scheme of Said and Rahmat [29] is not producing \(C^{1}\) surface everywhere in the given triangular domain. Karim et al. [20] discussed spatial interpolation for rainfall scattered data by extending the results from Chan and Ong [3]. The cubic Bézier triangular patches with three local schemes are blended to produce \(C^{1}\) surface everywhere. Sometimes in certain applications, the partial derivatives are not given, hence, they must be estimated. Thus, Goodman et al. [16] proposed a method to estimate the partial derivatives of the data for the scattered data interpolation. Throughout our study, we implement [16] scheme to estimate the partial derivatives at data sites.

Zhou and Li [31] also considered scattered noisy data by using bivariate splines on a triangulation domain. Chen and Cao [4] discussed scattered data approximation by employing neural network operators via translations and dilation of logistic function. Bracco et al. [1] discussed the scattered data fitting by utilizing hierarchical splines. They have extended the main idea from local least squares approximation where the local solutions are described in variable degree polynomial spline. Lai and Meile [22] discussed the scattered data interpolation by using bivariate splines with nonnegative property. The spline is constructed on a triangular domain i.e. the given data are triangulated first. Qian et al. [27] discussed scattered data interpolation based on the bivariate recursive polynomials defined on triangulation. Zhu et al. [32] constructed another version of triangular patch with three exponent parameters. Hussain and Hussain [17] constructed \(C^{1}\) scattered data interpolation based triangulation by using side-vertex method where the rational cubic function is used to construct rational interpolant for each side of the triangle. Then the final scheme is a blend between three local schemes. Sarfraz et al. [30] extended the idea in [17] but by using different rational cubic functions. Both papers are quite similar to each other, and the results are also not much different. Hussain et al. [18] also discussed positivity-preserving scattered data interpolation by using cubic trigonometric spline functions. They have tested their scheme to two irregular scattered positive data sets. Unfortunately, in the paper, they showed different surface interpolation for the given data sets.

Even though the study on interpolation based on Bézier and Ball representation is already thirty years old, many researchers are still focusing on how to improve both representations by adding more flexibility to the control point to control the shape of curves or surfaces. For instance, [26] constructed an explicit parametric curve to be taken as the limitation curve of progressive iteration approximation (PIA) which can interpolate some scattered data points by using normalized totally positive (NTP) basis by specially choosing two kinds of NTP bases, Said–Bézier type generalized Ball (SBGB) basis and DP basis. Their results avoid the tedious calculation of the inverse matrix and hence will gain extensive application in reverse engineering. In 2013, [12] solved the parameterization problem for polynomial Bézier surfaces by applying the firefly algorithm, a powerful nature-inspired metaheuristic algorithm introduced recently to address difficult optimization problems. The method has been successfully applied to some illustrative examples of open and closed surfaces, including shapes with singularities. Their method performs very well, being able to yield the best approximating surface with a high degree of accuracy. But in order to obtain the final solution, we need to train the nodes; besidesit is time consuming for certain data.

The outcome of our current study is motivated by the works of Said [28], Goodman and Said [13], and Said and Rahmat [29]. We propose a new cubic Bézier-like triangular basis function with three parameters by extending the univariate cubic Bézier-like of Said [28]. Several properties of the new cubic Bézier-like triangular basis are derived. This new cubic triangular basis reduces to the cubic Ball and Bézier triangular bases with suitable choices of the three parameters. This new triangular basis is extended to the scattered data interpolation. The sufficient condition for \(C^{1}\) continuity along the adjacent triangles with cubic precision method is constructed. Each triangular patch of the interpolating surface is constructed by using convex combination of three local schemes of cubic Bézier-like triangular patches. Several numerical results are presented including comparison with some existing schemes including meshfree methods such as radial basis functions (RBFs) i.e. linear, thin plate spline, Gaussian, and multiquadric.

2 Construction of new cubic Bézier-like triangular patches with shape parameters

In this section, a new Bézier-like triangular basis is constructed. Let the barycentric coordinate u, v, w on triangle T with vertices \(V_{1}\), \(V_{2}\), and \(V_{3}\) be such that \(u + v + w = 1\) and \(u,v,w \ge0\). Any point \(V ( x,y ) \in R^{2}\) inside the triangle (including at the vertices) (Fig. 1) can be expressed as

$$ V = uV_{1} + vV_{2} + wV_{3}. $$
(1)

Now we can establish the construction of new Bézier-like triangular patches with three parameters α, β, and γ as follows.

Figure 1
figure 1

Barycentric coordinates

Definition 1

Let \(\alpha,\beta,\gamma\in ( 0,\infty )\) and \(u \ge0\), \(v \ge0\), \(w \ge0\). The following ten functions are a new cubic Bézier-like triangle basis on a triangular domain \(\mathrm{D} = \{ ( u,v,w ) \vert u + v + w = 1 \}\):

$$ \left \{ \textstyle\begin{array}{l} B_{3,0,0}^{3} ( u,v,w;\alpha,\beta,\gamma ) = u^{2} ( 1 + \alpha ( u - 1 ) ), \\ B_{0,3,0}^{3} ( u,v,w;\alpha,\beta,\gamma ) = v^{2} ( 1 + \beta ( v - 1 ) ), \\ B_{0,0,3}^{3} ( u,v,w;\alpha,\beta,\gamma ) = w^{2} ( 1 + \gamma ( w - 1 ) ), \\ B_{2,1,0}^{3} ( u,v,w;\alpha,\beta,\gamma ) = ( \alpha+ 2 )u^{2}v, \\ B_{2,0,1}^{3} ( u,v,w;\alpha,\beta,\gamma ) = ( \alpha+ 2 )u^{2}w ,\\ B_{1,2,0}^{3} ( u,v,w;\alpha,\beta,\gamma ) = ( \beta+ 2 )uv^{2} ,\\ B_{0,2,1}^{3} ( u,v,w;\alpha,\beta,\gamma ) = ( \beta+ 2 )v^{2}w ,\\ B_{1,0,2}^{3} ( u,v,w;\alpha,\beta,\gamma ) = ( \gamma+ 2 )uw^{2}, \\ B_{0,1,2}^{3} ( u,v,w;\alpha,\beta,\gamma ) = ( \gamma+ 2 )vw^{2}, \\ B_{1,1,1}^{3} ( u,v,w;\alpha,\beta,\gamma ) = 1 - \sum_{\substack{i + j + k = 3\\ i,j,k \ne1}} B_{i,j,k}^{3} ( u,v,w;\alpha,\beta,\gamma ) . \end{array}\displaystyle \right . $$
(2)

Definition 2

The basis function

$$B_{1,1,1}^{3} ( u,v,w;\alpha,\beta,\gamma ) = 1 - \sum _{\substack{ i + j + k = 3\\ i,j,k \ne1}} B_{i,j,k}^{3} ( u,v,w;\alpha,\beta, \gamma ) $$

can be simplified as

$$\begin{aligned} B_{1,1,1}^{3} ( u,v,w;\alpha,\beta, \gamma ) &= 1 - \biggl( \sum_{i + j + k = 3} B_{i,j,k}^{3} ( u,v,w ) - 6uvw \biggr) \\ &= 1 - ( 1 - 6uvw ) = 6uvw. \end{aligned} $$

Thus a new cubic Bézier-like triangular patch can be written as follows.

Definition 3

The cubic Bézier-like triangular patch with three parameters α, β, and γ and control points \(b_{ijk},i + j + k = 3\) is defined as

$$ P ( u,v,w ) = \sum_{ \vert i + j + k \vert = 3} b_{ijk} B_{i,j,k}^{3} ( u,v,w ), u + v + w = 1, $$
(3)

which can be written as

$$ \begin{aligned}[b] P ( u,v,w )& = u^{2} \bigl( 1 + \alpha ( u - 1 ) \bigr)b_{300} + v^{2} \bigl( 1 + \beta ( v - 1 ) \bigr)b_{030} + w^{2} \bigl( 1 + \gamma ( w - 1 ) \bigr)b_{003} \\ &\quad+ ( \alpha+ 2 )u^{2}vb_{210}+( \alpha+ 2 )u^{2}wb_{201} + ( \beta+ 2 )v^{2}ub_{120} + ( \beta+ 2 )v^{2}wb_{021} \\ &\quad+ ( \gamma+ 2 )w^{2}ub_{102}+ ( \gamma+ 2 )w^{2}vb_{012} + 6uvwb_{111}, \end{aligned} $$
(4)

where \(u + v + w = 1\).

Figure 2 shows the Bézier-like ordinates for the cubic Bézier-like triangular on one patch and Fig. 3 shows the distribution of the cubic Bézier-like triangular bases on a triangular domain.

Figure 2
figure 2

Cubic Bézier-like points (control points)

Figure 3
figure 3

New cubic Bézier-like triangular bases

3 Some properties of the new cubic Bézier-like triangular patches

  1. (a)

    When \(\alpha= \beta= \gamma= 0\), then the cubic Bézier-like triangular patches defined by (4) are reduced to cubic Said–Ball triangular [15].

  2. (b)

    When \(\alpha= \beta= \gamma= 1\), then the cubic Bézier-like triangular patches defined by (4) are reduced to cubic Bézier triangular [6].

  3. (c)

    End point interpolation

    $$\begin{gathered} P ( 1,0,0 ) = b_{300}, \\ P ( 0,1,0 ) = b_{030}, \\ P ( 0,0,1 ) = b_{003}. \end{gathered} $$
  4. (d)

    Convex hull and affine invariance.

    Since, for \(\alpha,\beta,\gamma\in [ 0,1 ]\), \(\sum_{ \vert i + j + k \vert = 3} B_{i,j,k}^{3} ( u,v,w ) = 1\) and \(B_{i,j,k}^{3} ( u,v,w ) \ge0\), then the resulting cubic triangular patches will satisfy the convex hull as well as affine invariance.

  5. (e)

    Boundary property: When one of the barycentric coordinates is zero, for instance \(w = 0\), and \(v = 1 - u\), then a new cubic Bézier-like triangular basis will degenerate to a standard univariate Bézier-like basis function such that

    $$\begin{gathered} B_{3,0,0}^{3} ( u,1 - u,0 ) = u^{2} \bigl( 1 + \alpha ( u - 1 ) \bigr), \\ B_{2,1,0}^{3} ( u,1 - u,,0 ) = ( \alpha+ 2 )u^{2} ( 1 - u ), \\ B_{1,2,0}^{3} ( u,1 - u,0 ) = ( \beta+ 2 )u ( 1 - u )^{2}, \\ B_{0,3,0}^{3} ( u,1 - u,00 ) = v^{2} \bigl( 1 + \beta ( v - 1 ) \bigr) = ( 1 - u )^{2} ( 1 - \beta u ), \end{gathered} $$

    which is equivalent to cubic basis \(\varPhi_{i}^{3} ( u )\), \(i = 0,1,2,3\) for \(u \in [ 0,1 ]\) [28].

Figure 4 shows the examples of few basis functions \(B_{i,j,k}^{3} ( u,v,w )\), \(i + j + k = 3\), where α, β, and γ vary.

Figure 4
figure 4

Some cubic Bézier-like triangular bases

4 Scattered data interpolation using new Bézier-like triangular bases

4.1 Local scheme and \(C^{1}\) continuity

The scheme comprising convex combination of three local schemes \(P_{1}\), \(P_{2}\), and \(P_{3}\) is defined as follows:

$$ P ( u,v,w ) = \frac{vwP_{1} + uwP_{2} + uvP_{3}}{vw + uw + uv},\quad u + v + w = 1. $$
(5)

There are two methods that can be used to construct three local schemes \(P_{i}\), \(i = 1,2,3\), i.e. those by Goodman and Said [13] and Foley and Opitz [8], where in [13] the cross-derivative is used, meanwhile Foley and Opitz [8] have implemented the cubic precision method. The local scheme \(P_{i}\), \(i = 1,2,3\), is obtained by replacing \(b_{111}\) in (4) with \(b_{111}^{i}\) so that \(C^{1}\) condition is satisfied only on the boundary \(e_{i}\) of the triangle.

Assume that the barycentric coordinates at the vertices are given as \(V_{1} = ( 1,00 )\), \(V_{2} = ( 0,1,0 )\), and \(V_{3} = ( 0,0,1 )\) where \(u + v + w = 1\). The direction vectors \(e_{i}\), \(i = 1,2,3\), on the side opposite to the vertex \(V_{i}\) are given as \(e_{1} = V_{3} - V_{2} = ( 0, - 1,1 )\), \(e_{2} = V_{1} - V_{3} = ( 1,0, - 1 )\), and \(e_{3} = V_{2} - V_{1} = ( - 1,1,0 )\) (e.g. refer to Fig. 5 [21]). The directional derivatives for \(P ( u,v,w )\) on the direction \(z = ( z_{1},z_{2},z_{3} )\), where \(z_{1} + z_{2} + z_{3} = 0\), are given as

$$ \frac{\partial P}{\partial z} = D_{z}P ( u,v,w ) = z_{1} \frac{\partial P}{\partial u} + z_{2}\frac{\partial P}{\partial v} + z_{3} \frac{\partial P}{\partial w}. $$
(6)

Now, we describe the method to determine the edge coordinates on the triangle.

Figure 5
figure 5

Vertices and edges of the triangle from [21]

From Fig. 5, the directional derivatives at \(V_{1}\) i.e. along the edges \(e_{2}\) and \(e_{3}\) are calculated as follows:

$$ \left . \textstyle\begin{array}{l} D_{e_{3}}P ( 1,0,0 ) = ( \frac{\partial x}{\partial v} - \frac{\partial x}{\partial u} )F_{x} ( V_{1} ) + ( \frac{\partial y}{\partial v} - \frac{\partial y}{\partial u} )F_{y} ( V_{1} ) \\ \phantom{D_{e_{3}}P ( 1,0,0 ) }= ( x_{2} - x_{1} )F_{x} ( V_{1} ) + ( y_{2} - y_{1} )F_{y} ( V_{1} ), \\ D_{e_{2}}P ( 1,0,0 ) = ( \frac{\partial x}{\partial u} - \frac{\partial x}{\partial w} )F_{x} ( V_{1} ) + ( \frac{\partial y}{\partial u} - \frac{\partial y}{\partial w} )F_{y} ( V_{1} ) \\ \phantom{D_{e_{2}}P ( 1,0,0 )}= ( x_{1} - x_{3} )F_{x} ( V_{1} ) + ( y_{1} - y_{3} )F_{y} ( V_{1} ) \end{array}\displaystyle \right \} $$
(7)

where \(F ( V_{1} ) = b_{300}\), \(F_{x} ( V_{1} )\) and \(F_{y} ( V_{1} )\) are given at the vertex \(V_{1}\). Similarly, we can obtain that \(F ( V_{2} ) = b_{030}\), \(F_{x} ( V_{2} )\) and \(F_{y} ( V_{2} )\) and \(F ( V_{3} ) = b_{003}\), \(F_{x} ( V_{3} )\) and \(F_{y} ( V_{3} )\). The partial derivatives are estimated by using Goodman et al. [16] method. Then, by simple derivation, the following are obtained:

$$ \left . \textstyle\begin{array}{l} D_{e_{3}}P ( 1,0,0 ) = ( \alpha+ 2 ) ( - b_{300} + b_{210} ) ,\\ D_{e_{2}}P ( 1,0,0 ) = ( \alpha+ 2 ) ( b_{300} - b_{201} ) . \end{array}\displaystyle \right \} $$
(8)

By substituting (7) to (8), we obtain

$$b_{210} = b_{300} + \frac{1}{\alpha+ 2} \bigl( ( x_{2} - x_{1} )F_{x} ( V_{1} ) + ( y_{2} - y_{1} )F_{y} ( V_{1} ) \bigr) $$

and

$$b_{201} = b_{300} - \frac{1}{\alpha+ 2} \bigl( ( x_{1} - x_{3} )F_{x} ( V_{1} ) + ( y_{1} - y_{3} )F_{y} ( V_{1} ) \bigr). $$

Similarly, by considering the other directional derivatives at \(V_{2}\) i.e. along the edges \(e_{1}\) and \(e_{3}\) as well as at \(V_{3}\) i.e. along the edges \(e_{1}\) and \(e_{2}\), the cubic Bézier-like ordinates \(b_{021}\), \(b_{120}\), \(b_{102}\), and \(b_{012}\) are given as follows:

$$\begin{gathered} b_{120} = b_{030} - \frac{1}{\beta+ 2} \bigl( ( x_{2} - x_{1} )F_{x} ( V_{2} ) + ( y_{2} - y_{1} )F_{y} ( V_{2} ) \bigr), \\ b_{021} = b_{030} + \frac{1}{\beta+ 2} \bigl( ( x_{3} - x_{2} )F_{x} ( V_{2} ) + ( y_{3} - y_{2} )F_{y} ( V_{2} ) \bigr),\\ b_{102} = b_{003} + \frac{1}{\gamma+ 2} \bigl( ( x_{1} - x_{3} )F_{x} ( V_{3} ) + ( y_{1} - y_{3} )F_{y} ( V_{3} ) \bigr),\\ b_{012} = b_{003} - \frac{1}{\gamma+ 2} \bigl( ( x_{3} - x_{2} )F_{x} ( V_{2} ) + ( y_{3} - y_{2} )F_{y} ( V_{2} ) \bigr).\end{gathered} $$

Now, we just need to determine the inner Bézier-like ordinate \(b_{111}^{i}\) for each local scheme \(P_{i}\), \(i = 1,2,3\). To achieve this, we have adopted the main idea from the scheme proposed by Foley and Opitz [8]. Consider the two adjacent triangles (as shown in Fig. 6), let the first triangle \(T_{1}\) be represented in terms of the cubic Bézier-like triangular defined in (3) and \(T_{2}\) be represented by

$$ Q ( u,v,w ) = \sum_{ \vert i + j + k \vert = 3} c_{ijk} B_{i,j,k}^{3} ( u,v,w ),\quad u + v + w = 1. $$
(9)
Figure 6
figure 6

Two adjacent cubic triangular patches

There are three cases that can be considered as follows.

Case I:

If \(e_{1}\) is a common edge of \(T_{1}\) and \(T_{2}\), then we have \(c_{030} = b_{003}\), \(c_{003} = b_{030}\), \(c_{021} = b_{012}\), and \(c_{012} = b_{123}\). The inner coefficients across the edge \(e_{1}\), \(b_{111}^{1}\), and \(c_{111}^{1}\) of the respective triangles are given by the following equations (see [8] for further details):

$$ \begin{aligned}[b] b_{111}^{1}& = \frac{1}{2r(s + t)}(c_{201} + c_{210} - r^{2}(b_{210} + b_{201}) - s^{2}(b_{030} + b_{021}) - t^{2}(b_{012} + b_{003}) \\ &\quad- 2st(b_{021} + b_{012}) - rsb_{120} - 2rtb_{102} \end{aligned} $$
(10)

and

$$ \begin{aligned}[b] c_{111}^{1} &= \frac{1}{2u(v + w)}(b_{201} + b_{210} - u^{2}(c_{210} + c_{201}) - v^{2}(c_{030} + c_{021}) - w^{2}(c_{012} + c_{003}) \\ &\quad- 2vw(c_{021} + c_{012}) - uvc_{120} - 2uwc_{102}. \end{aligned} $$
(11)

Case II:

If \(e_{2}\) is a common edge of \(T_{1}\) and \(T_{2}\), then \(c_{300} = b_{003}\), \(c_{003} = b_{300}\), \(c_{201} = b_{102}\), and \(c_{102} = b_{201}\). The inner coefficients across the edge \(e_{2}\) are as follows:

$$ \begin{aligned}[b] b_{111}^{2} &= \frac{1}{2r(s + t)}(c_{021} + c_{120} - r^{2}(b_{120} + b_{021}) - s^{2}(b_{003} + b_{102}) - t^{2}(b_{201} + b_{300}) \\ &\quad- 2st(b_{201} + b_{102}) - rsb_{012} - 2rtb_{210} \end{aligned} $$
(12)

and

$$ \begin{aligned}[b] c_{111}^{2}& = \frac{1}{2r(s + t)}(b_{021} + b_{120} - r^{2}(c_{120} + c_{021}) - s^{2}(c_{003} + c_{102}) - t^{2}(c_{201} + c_{300}) \\ &\quad- 2st(c_{201} + c_{102}) - rsc_{012} - 2rtc_{210}. \end{aligned} $$
(13)

Case III:

If \(e_{3}\) is a common edge of \(T_{1}\) and \(T_{2}\), then \(c_{300} = b_{030}\), \(c_{030} = b_{300}\), \(c_{210} = b_{120}\), and \(c_{120} = b_{210}\). The inner coefficients across the edge \(e_{3}\) are as follows:

$$ \begin{aligned}[b] b_{111}^{3} &= \frac{1}{2r(s + t)}(c_{012} + c_{012} - r^{2}(b_{012} + b_{102}) - s^{2}(b_{300} + b_{210}) - t^{2}(b_{120} + b_{030}) \\ &\quad- 2st(b_{120} + b_{210}) - rsb_{201} - 2rtb_{021} \end{aligned} $$
(14)

and

$$ \begin{aligned}[b] c_{111}^{3} &= \frac{1}{2r(s + t)}(b_{012} + b_{012} - r^{2}(c_{012} + c_{102}) - s^{2}(c_{300} + c_{210}) - t^{2}(c_{120} + c_{030}) \\ &\quad- 2st(c_{120} + c_{210}) - rsc_{201} - 2rtc_{021}. \end{aligned} $$
(15)

Note that the coefficients \((s + t)r\) and \(u(v + w)\) in Eqs. (10)–(15) are not equal to zero because \(r, u < 0\) and \(s+t, v+w > 0\) [8]. Thus, if \(e_{i}\), \(i = 1, 2, 3\), is a common edge to two triangles, we assign values to both \(b_{111}^{i}\) and \(c_{111}^{i}\) according to Eqs. (10)–(15) in order to have a cubic precision when the data and the derivatives come from cubic. A minor modification of the cubic precision method is required for boundary triangles because adjacent triangles are considered. For example, if \(e_{1}\) is on the boundary of the triangulated domain and edges \(e_{2}\) and \(e_{3}\) are interior, we first compute \(b_{111}^{2}\) and \(b_{111}^{3}\) with the cubic precision method and define \(b_{111}^{1}\) as \(\frac{1}{2}(b_{111}^{2} + b_{111}^{3})\). If both \(e_{1}\) and \(e_{2}\) are boundary edges and \(e_{3}\) is an interior edge, we first compute \(b_{111}^{3}\) and then set \(b_{111}^{1} = b_{111}^{2} = b_{111}^{3}\). In this case, the hybrid patch will be a standard cubic patch. By using all calculated Bézier ordinates of the three local schemes, the final interpolating surface P on each triangle can now be constructed. It is well described in the following paragraphs.

5 Graphical examples

The construction of scattered data interpolation using new Bézier-like triangular patches is described as follows:

  1. (a)

    Triangulate the domain by using Delaunay triangulation [13].

  2. (b)

    Specify the derivatives at the data points, then assign Bézier-like ordinate (control point) values for each triangular patch by using [16].

  3. (c)

    Generate the triangular patches for each of the triangle domains to form composite \(C^{1}\) surface by using the local scheme defined by (16) with three parameters α, β, and γ.

  4. (d)

    Calculate the error measurement such as maximum error (Max. Error) and coefficient of determination (COD) i.e. \(r^{2}\).

The final \(C^{1}\) scheme can be written as

$$ P ( u,v,w ) = \sum_{\substack{ i + j + k = 3 \\ i,j,k \ne1}} b_{ijk} B_{i,j,k}^{3} ( u,v,w ) + 6uvw \bigl( c_{1}b_{111}^{1} + c_{2}b_{111}^{2} + c_{3}b_{111}^{3} \bigr) $$
(16)

with

$$ c_{1} = \frac{vw}{vw + uw + uv},\qquad c_{2} = \frac{uw}{vw + uw + uv},\qquad c_{1} = \frac{uv}{vw + uw + uv}. $$
(17)

In Goodman and Said [13], the other version of convex combination is used such that

$$ c_{1} = \frac{v^{2}w^{2}}{v^{2}w^{2} + u^{2}w^{2} + u^{2}v^{2}},\qquad c_{2} = \frac{u^{2}w^{2}}{v^{2}w^{2} + u^{2}w^{2} + u^{2}v^{2}}, \frac{u^{2}v^{2}}{v^{2}w^{2} + u^{2}w^{2} + u^{2}v^{2}}. $$
(18)

The main difference between (18) and (17) is that the final degree of the rational patches obtained from (17) is rational quintic with quadratic denominator (5/4), while form (18) will give a rational heptic with quartic denominator (7/4). But both schemes require only 10 control points.

Remark 1

Although the local scheme given in (16) has singularities at the triangle vertices, the scheme in (16) still satisfies \(C^{1}\) with removable singularities at the vertices. This is consequent from the work of Goodman and Said [13].

As an example of the surface interpolation, by using the proposed scheme, we use the following two well-known test functions:

$$\begin{gathered} \begin{aligned} F_{1} ( x,y ) ={}& 0.75e^{ ( - ( 9x - 2 )^{2} + ( 9y - 2 )^{2}/4 )} + 0.75e^{ ( - ( 9x + 1 )^{2}/49 - ( 9y + 1 )^{2}/10 )} + 0.5e^{ ( - ( 9x - 7 )^{2} + ( 9y - 3 )^{2}/4 )} \\ &- 0.2e^{ ( - ( 9x - 4 )^{2} - ( 9y - 7 )^{2} )} ,\end{aligned} \\ F_{2} ( x,y ) = \frac{ ( 1.25 + \cos ( 5.4y ) )}{6 + 6 ( 3x - 1 )^{2}}.\end{gathered} $$

The triangular domain defined on 36 data points in the domain of \([ 0,1 ] \times [ 0,1 ]\) is illustrated in Fig. 7, while the surface interpolation with different values of three parameters α, β, and γ defined on triangulation mesh shown in Fig. 7 is given in Fig. 8(a) for the test function \(F_{1} ( x,y )\) and in Fig. 9(a) for the test function \(F_{2} ( x,y )\) respectively. We compare the proposed method with meshfree method of radial basis function (RBF) consisting of four different basis functions which are linear, thin plate spline, Gaussian, and multiquadric. The interpolating surfaces are given in Fig. 8(b)–8(d) for the test function \(F_{1} ( x,y )\) and in Fig. 9(b)–9(d) for the test function \(F_{2} ( x,y )\). Based on the observation from the interpolating surfaces, the proposed scheme gives a very visually pleasing surface compared to all RBF techniques. This is significant in scattered data interpolation.

Figure 7
figure 7

Triangulation domain of 36 node sets on square grid \([0, 1]\times[0, 1]\)

Figure 8
figure 8

Surface interpolation for 36 data points for the test function \(F_{1}\): (a) The proposed method; (b) RBF (linear); (c) RBF (thin plate spline); (d) RBF (Gaussian); (e) RBF (multiquadric)

Figure 9
figure 9

Surface interpolation for 36 data points for the test function \(F_{2}\): (a) The proposed method; (b) RBF (linear); (c) RBF (thin plate spline); (d) RBF (Gaussian); (e) RBF (multiquadric)

6 Error analysis

To test the capability of the new cubic Bézier-like triangular scheme for scattered data interpolation, we calculate the value of maximum error (Max. Error) and coefficient of determination (COD) i.e. \(r^{2}\) based on the test functions \(F_{1}\) and \(F_{2}\), together with the following two test functions:

$$\begin{gathered} F_{3} ( x,y ) = \frac{1}{3}e^{ ( - 20.25 ( x - 0.5 )^{2} + ( y - 0.5 )^{2} )}, \\ F_{4} ( x,y ) = \frac{1}{9}\sqrt{64 - 81 \bigl( ( x - 0.5 )^{2} + ( y - 0.5 )^{2} \bigr)} - 0.5.\end{gathered} $$

The analysis of error is performed on the domain with 36, 65, and 100 data nodes set in grid square \([ 0,1 ] \times [ 0,1 ]\). The triangulation domain of 36 data points is given in Fig. 7, while for the 65 and 100 data points, sets are given in Fig. 10(a) and (b), respectively.

Figure 10
figure 10

Triangulation domain of (a) 65 data points; (b) 100 data points on square grid \([0, 1]\times[0, 1]\)

Tables 1, 2, 3 show the error analysis for all four functions with respective nodes i.e. 36, 65, and 100 points. We compare the performance between the proposed scheme and RBFs methods such as linear, thin plate spline, Gaussian, and multiquadric. The statistical goodness-fit used are (a) maximum error and (b) coefficient of determination \(r^{2}\). For 36 data points, the proposed scheme is better than RBFs functions except for the data from function \(F_{3}\). Similarly, for 65 and 100 nodes, the proposed scheme is better except for \(F_{3}\). This is understandable, since function \(F_{3}\) looks like a Gaussian-type function. Therefore, maybe this is the main reason why RBFs are better for the data from that function. But if we refer to Table 1, the maximum error for function \(F_{3}\) is 0.00662 (Gaussian) and 0.009586 (the proposed scheme), and the value of \(r^{2}\) is not too much different. For more details on numerical results including graphical images for the proposed method including the comparison between the implementation using Goodman and Said [13] and Foley and Opitz [8] schemes, the reader can refer to Karim and Saaban [19].

Table 1 Error measurement for 36 data points
Table 2 Error measurement for 65 data points
Table 3 Error measurement for 100 data points

Table 4 summarizes the main results for error analysis shown in Tables 1, 2, 3.

Table 4 The best scheme according to error analysis

Our final example considers the irregular scattered data from Ibraheem et al. [18]. The total number of the data is 72 as shown in Table 5.

Table 5 Irregular data from Ibraheem et al. [18]

Figure 11 shows the interpolating surfaces for irregular data obtained by using the proposed scheme with various values of α, β, and γ. Figure 11(a) shows the Delaunay triangulation for data in Table 5. Figure 1(b) shows the linear interpolant for the irregular data. Figure 11(c) to 11(e) show the surface interpolation with different values of the parameters. Meanwhile Fig. 11(f) shows the solid version for Fig. 11(c). Clearly, the produced surface is smooth and visually pleasing. Interestingly, the given data is positive, and the proposed scheme has the capability to preserve the positivity of the data without the need to apply any positivity-preserving as discussed in Ibraheem et al. [18], Hussain and Hussain [17], and Sarfraz et al. [30]. It should be noted that we cannot compare the results with the work of Ibraheem et al. [18], since in [18] their results are shown for different data sets, not for the data given in their paper.

Figure 11
figure 11figure 11

Interpolating scattered data surface for irregular data

7 Conclusion and recommendation

In this study, a new cubic triangular patch with three parameters is constructed. This new basis function is called cubic Bézier-like triangular patches. Some properties of the proposed basis are studied in detail. An application in scattered data interpolation is investigated in detail. We have adopted Goodman and Said [13] method in order to find all Bézier-like ordinates that will ensure that the sufficient condition for \(C^{1}\) is satisfied. The ordinates \(b_{111}^{i}\), \(i = 1,2,3\), respectively for local scheme \(P_{i}\) are obtained by using Foley and Opitz [8] method as discussed in Sect. 4. Throughout this study, we test the proposed scheme with regular and irregular scattered data. For regular data sets, we compare the performance with meshfree based methods i.e. RBFs in terms of maximum error, coefficient of determination \(r^{2}\), and visually pleasing for graphical displays. Based on the validation, the proposed scheme is better than RBFs methods since, for all data sets, the proposed scheme has smaller maximum error and higher \({r}^{{2}}\) value i.e. between 0.999204443 and 0.99999994. Furthermore, based on graphical images, the proposed scheme is more visually pleasing compared with all RBFs. For irregular scattered data, the proposed scheme can reconstruct the surface that is visually pleasing. We would like to stress that the main reason we have adopted the Foley and Opitz [8] method to calculate the inner ordinates \(b_{111}^{i}\), \(i = 1,2,3\), is that, it will give different surface for different values of the shape parameters (of the same scattered data). Meanwhile if we apply Goodman and Said [13] scheme to calculate the inner ordinates, we will obtain same interpolating surface for different values of the parameters. This results as well as comprehensive numerical comparison can be obtained in Karim and Saaban [19]. The proposed scheme can be used for surface reconstruction for cloud data i.e. thousands of data or more. Furthermore, by using the proposed scheme, we can preserve the positivity of the scattered data by manipulating the three parametric values. Work on shape-preserving interpolation is underway. Furthermore, we also can extend the main results in this study to construct more general triangulation surface based on Clough–Tocher splitting method. This will avoid the use of rational corrected as shown in formulas (16) and (17). Such results will be explored in the future.