Abstract
This paper discusses scattered data interpolation by using cubic Timmer triangular patches. In order to achieve C1 continuity everywhere, we impose a rational corrected scheme that results from convex combination between three local schemes. The final interpolant has the form quintic numerator and quadratic denominator. We test the scheme by considering the established dataset as well as visualizing the rainfall data and digital elevation in Malaysia. We compare the performance between the proposed scheme and some well-known schemes. Numerical and graphical results are presented by using Mathematica and MATLAB. From all numerical results, the proposed scheme is better in terms of smaller root mean square error (RMSE) and higher coefficient of determination (R2). The higher R2 value indicates that the proposed scheme can reconstruct the surface with excellent fit that is in line with the standard set by Renka and Brown’s validation.
1. Introduction
Many computer graphics and vision problems involve scattered data interpolation (SDI). SDI methods aims to build a smooth function from a set of data, which consist of functional values corresponding to points, which do not obey any structure or order between their relative locations. These methods have a wide range of uses in surface reconstruction, visualization, image restoration, computer graphics, surface deformation, image processing, engineering, and technology, etc.
Most researchers have investigated surface interpolation based on triangulations of scattered data and there are several scattered data fitting techniques, such as the Delaunay triangulation method [1], radial basis function (RBF) [2], and moving least square (MLS) [3]. Very recently, new techniques for interpolating scattered data have been developed [1,4,5], which can be implemented in fast algorithms [6].
The most popular method that is usually used to generate the surface of scattered from the data points is Delaunay triangulation method [7]. It is a very famous method, applied to produce the triangle meshes, where vertices of the triangle are made up of the sample data points.
The property of shape preserving interpolation is an important technique usually applied in curve and surface modeling. Several research papers [2,7,8,9,10,11,12,13] have been published on shape preservation in the last couple of years. Ibraheem et al. [14] proposed a scheme that is suitable for surface reconstruction and deformation. The objective of the scheme is to develop a local positivity preserving when the data points are used.
A new big data infrastructure for the management of cultural items was proposed by Su et al. [15]. It is a multilayer architecture to create new applications based on the modules that were offered by APIs. Streams of data from social networks are mostly captured by this module to handle and update the information. They tested their system by created an application of the Android devices called the Smart Search Museum. This application will access the map that has all the museums of a given area in Italy. Nowadays, the demand for information monitoring and recommendation technology is getting bigger, which is suggested by the systems proposed by [1]. They proposed a novel, collaborative, and user-centered approach for big data application.
This study is an extension of the paper discussed by Ali et al. [16]. The main objective of this study is to construct the SDI using Timmer triangular patches, which are used to visualize the energy data i.e., spatial interpolation in visualizing rainfall data. Firstly, we triangulate the domain data using Delaunay triangulation. Next, we specify the derivatives at the data points and assign Timmer ordinate values for each triangular patch. Lastly, we generate the Timmer triangular patches of the surface. The main novelty of this work is that we construct new cubic triangular Timmer patches and apply them for scattered data interpolation. The proposed scheme has higher accuracy as well as requiring smaller CPU times (in seconds) than some existing schemes.
The rest of the paper is organized as follows. The method of the study is discussed in Section 2 including the derivation of cubic Timmer triangular patches with some examples. In Section 3, we discuss the derivation of the sufficient condition for continuity on all adjacent triangles. Numerical and graphical results including comparison with some established schemes are presented in Section 4. In the final section, some conclusions and recommendations for future studies are made.
2. Cubic Timmer Triangular Patches
Ali et al. [16] introduced a new cubic triangular basis function, which was actually the extension of the univariate cubic Timmer basis proposed by Timmer [17]. The new cubic Timmer triangular patch is different from the cubic Ball and cubic Bezier triangular patches [16].
The cubic Timmer patch is defined as follows [16]:
Equation (1) can be written as
where denotes the control point, while are cubic Timmer triangular basis functions defined in [16]. Some properties of the Timmer triangle patch described in Equation (1) are the following:
- (a)
- Partition of unity: The new cubic Timmer triangular basis satisfies:
- (b)
- Symmetry: The surfaces generated from two different ordering of its control points will look the same.
- (c)
- Positivity: In each of the cubic Timmer triangular basis functions, the positivity or nonnegativity behavior is fulfilled, except for the following: when and both and when .
- (d)
- Convex hull: The Timmer triangular patches may not lie within the convex hull of the control polygon. If the positivity property is fulfilled for the Timmer triangular patches as discussed in (c), it will satisfy the convex hull property.
Figure 1, Figure 2 and Figure 3 show the cubic Timmer triangular basis functions, the Timmer ordinates for the cubic Timmer triangular patch, and the cubic Timmer triangular bases, respectively.

Figure 1.
Some cubic Timmer triangular basis functions.
Figure 2.
Control nets for cubic Timmer triangular patch.
Figure 3.
Cubic Timmer triangular bases.
Then, one set of control points is used to construct the surface of cubic Timmer triangular patch. Table 1 shows the control point used to construct the surfaces in Figure 4.
Table 1.
Control points.

Figure 4.
Surface interpolation.
It is observed from Figure 4 that cubic Timmer triangular patches lie in close vicinity of the control polygon as compared to cubic Bèzier and Ball triangular patches, respectively. The cubic Bèzier and Ball triangular patches satisfy the convex hull property while the cubic Timmer triangular, in general, does not obey the convex hull property. However, cubic Timmer triangular patches are close to the control polyhedron.
3. Derivation of Sufficient Condition for Continuity on Adjacent Triangles
In this section, we show in detail the derivation of the sufficient condition that have been considered in Ali et al. [2]. The derivatives of with respect to the direction are given by:
From Equation (2), it can be shown that
Local Scheme
Consider a triangle with vertices barycentric coordinates , and edges . Any point on the triangle can be expressed as
We use the following two methods of convex combination among the three local schemes as described below:
where the local scheme is obtained by replacing the inner ordinate with . The derivations of all three local schemes are described in the following paragraphs.
Let be the inward normal direction to the line segment , , as shown in Figure 5, where
Figure 5.
Inward normal direction to the edges of triangle.
The normal derivatives of local scheme are defined by
The boundary ordinates are given as follows [2]:
and
where the first partial derivatives are estimated by using Goodman et al. [18] method. The inner ordinates i.e., are obtained by using two different methods i.e., Goodman and Said [8] and Foley and Opitz [19]. The following paragraphs describes both methods.
The inner ordinates by using Goodman and Said [8] method are given as follows [2]:
and
Foley and Opitz’s [19] method is as follows. Assume two adjacent triangles, as shown in Figure 6 with vertices and with as a common edge (see Figure 6).
Figure 6.
Two adjacent cubic triangular patches for Foley and Opitz [19].
The following equations must be satisfied to produce continuity along the common edge.
where and Equations and will be added together to obtain the inner ordinate . Then, solve for :
This calculation is similar to obtain the inner ordinate . Adding the Equations and and the value of is given as:
To produce the final interpolant, two methods of convex combination mentioned in Equation (6) will be used. The final scheme of scattered data interpolation using cubic Timmer triangular patch can be expressed as Theorem 3.
Theorem 3:
The final interpolating surface T on each triangle can be expressed as:
where
Equivalently
Another version of convex combination scheme is presented in Goodman and Said [8] and is given as follows:
For the purpose of numerical comparison later, we denoted convex combination used in Equation (6) as Choice 1; meanwhile, Goodman and Said [8] is Choice 2.
Theorem 4:
The rational corrected interpolant defined by (8) is in the form quantic numerator and quadratic denominator.
Proof.
From Equation (8), the resulting interpolant is degree 7 i.e., degree five in numerator and degree two in denominator. □
The following Algorithm 1 can be used to construct surface form scattered date.
| Algorithm 1. Construction scattered data interpolation |
| Input: Data points |
Steps 1–4 are repeated for different test function. |
4. Results and Discussions
To test the capability of the proposed scattered data interpolation scheme, we use six well-known test functions , and as shown in Figure 7 [20]. All numerical simulation and graphical visualization are done by using MATLAB R2019a version on Intel® Core i5–6200U 2.3GHz with Turbo Boost up to 2.8GHz.
Figure 7.
Test functions.
- Franke’s exponential function
- 2.
- Cliff function
- 3.
- Saddle function
- 4.
- Gentle function
- 5.
- Steep function
- 6.
- Sphere function
We use three datasets i.e., 36, 65, and 100 number of points, as shown in Table 2, Table 3 and Table 4.
Table 2.
Thirty-six datasets.
Table 3.
Sixty-five datasets.
Table 4.
One hundred datasets.
5. Numerical Results
Delaunay triangulation for all datasets are shown in Figure 8. Meanwhile, Figure 9, Figure 10 and Figure 11 show the 3D linear interpolant for the scattered datasets, respectively. The surface interpolation by using cubic Timmer triangular patches with selected schemes are shown in Figure 12, Figure 13, Figure 14, Figure 15, Figure 16, Figure 17, Figure 18, Figure 19, Figure 20, Figure 21, Figure 22 and Figure 23.

Figure 8.
Delaunay triangulation.
Figure 9.
3D linear interpolant for 36 datasets.
Figure 10.
3D linear interpolant for 65 datasets.

Figure 11.
3D linear interpolant for 100 datasets.

Figure 12.
Surface interpolation using Goodman and Said method and Choice 1 for 36 datasets.
Figure 13.
Surface interpolation using Goodman and Said method and Choice 2 for 36 datasets.
Figure 14.
Surface interpolation using Foley and Opitz method and Choice 1 for 36 datasets.

Figure 15.
Surface interpolation using Foley and Opitz method and Choice 2 for 36 datasets.

Figure 16.
Surface interpolation using Goodman and Said method and Choice 1 for 65 datasets.
Figure 17.
Surface interpolation using Goodman and Said method and Choice 2 for 65 datasets.
Figure 18.
Surface interpolation using Foley and Opitz method and Choice 1 for 65 datasets.

Figure 19.
Surface interpolation using Foley and Opitz method and Choice 2 for 65 datasets.

Figure 20.
Surface interpolation using Goodman and Said method and Choice 1 for 100 datasets.
Figure 21.
Surface interpolation using Goodman and Said method and Choice 2 for 100 datasets.
Figure 22.
Surface interpolation using Foley and Opitz method and Choice 1 for 100 datasets.

Figure 23.
Surface interpolation using Foley and Opitz method and Choice 2 for 100 datasets.
Based on Figure 12, Figure 13, Figure 14, Figure 15, Figure 16, Figure 17, Figure 18, Figure 19, Figure 20, Figure 21, Figure 22 and Figure 23, all schemes are capable of producing a smooth surface. The 36, 65, and 100 datasets consist of 54, 100, and 164 triangular patches with continuity for each edge, respectively. Visually, the proposed scheme produces smooth surfaces for all datasets. However, in order to measure the effectiveness of the proposed scattered data interpolation scheme, we calculate root mean square error (RMSE), maximum error (Max error), coefficient of determination (R2), and central processor unit (CPU) time in seconds. For the computation time, a comparison has been made between two different methods to calculate the inner ordinates, i.e., Goodman and Said [8] and Foley and Opitz [19] methods and two distinct calculation of local scheme denoted as Choice 1 and Choice 2. The error analysis for 36, 65, and 100 data points are shown in Table 5, Table 6 and Table 7, respectively.
Table 5.
Error analysis for 36 datasets.
Table 6.
Error analysis for 65 datasets.
Table 7.
Error analysis for 100 datasets.
Based on Table 5, Table 6 and Table 7, the numerical results obtained by using the local scheme with Choice 2 gave larger error than Choice 1 while most of the Foley and Opitz [19] method gave smaller error than the Goodman and Said [8] method. In terms of CPU time (in seconds), the Goodman and Said [8] method takes more time than the Foley and Opitz [19] method. Convex scheme using Choice 2 took longer time than scheme with Choice 1. The main reason is because convex combination using Choice 2 requires more calculation than Choice 1. Furthermore, the reason the Foley and Opitz [19] method has less time is that their scheme considers two triangular patches to calculate the inner ordinates while the Goodman and Said [8] method needs to find the three inner ordinates for each triangular patch.
Hence, we conclude that the best scheme for scattered data interpolation is the cubic Timmer triangular patches with convex combination of Choice 1 and the Foley and Opitz [19] method to calculate the inner ordinates. Figure 24 shows the error comparison of the proposed cubic Timmer triangular patch with all test functions using the best scheme mentioned above with different datasets.

Figure 24.
Comparison of the proposed method using the best schemes.
Based on Figure 24, as the number of data points increased, the errors such as RMSE and Max error will be decreased. For CPU time, when more data are used, it will take a longer time, while the comparison using R2 shows that when the datasets used increases, the R2 value will increase too.
Next, we compare the proposed cubic Timmer triangular scheme with the established schemes such as Karim and Saaban [21] and Goodman and Said [8]. We use 100 data points as shown in Table 4. The numerical comparisons are shown in Table 8.
Table 8.
Comparison with established schemes.
From Table 8, based on RMSE, max error, and R2, we can see clearly that cubic Timmer triangular patch is on par with Karim and Saaban [21] and Goodman and Said [8] schemes. However, in terms of CPU time (in seconds), the proposed scheme require smaller CPU time compared to the other established methods. Thus, we believed that the proposed cubic Timmer triangular patch is suitable to interpolate dense or big scattered datasets, since it requires less CPU time than [8] and [21].
To validate this, we test the proposed cubic Timmer triangular patch scheme by using the seamount dataset obtained in MATLAB. The seamount dataset represents the surface of underwater mountain that is located at 48.2°S, 148.8°W on the Louisville Ridge in the South Pacific in 1984. The seamount data et contains 294 data points and it consists a set of longitude (X), latitude (Y), and depth-in-feet (Z), as shown in Table 9. Table 9 shows 294 data points of the seamount dataset. There are about 566 triangles. Figure 25 and Figure 26 show the Delaunay triangulation and the 3D visualization of the seamount dataset, respectively. The surface interpolation of 566 triangular patches formed by using the proposed cubic Timmer, cubic Ball, and cubic Bèzier are shown in Figure 27.
Table 9.
Seamount dataset.
Figure 25.
Delaunay triangulation of seamount dataset.
Figure 26.
3D visualization of seamount dataset.

Figure 27.
Surface interpolation.
Then, we calculate the CPU time (in seconds) for each of the construction of the surfaces by using different methods shown in Figure 27. CPU time taken by proposed cubic Timmer triangular patches to construct the surface of the seamount dataset is 102.3931 s. Furthermore, cubic Bèzier and Ball triangular patches required about 103.7781 s and 103.5014 s, respectively. Based on this example, we conclude that the proposed cubic Timmer triangular patch required smaller CPU time especially for big or dense scattered datasets. Furthermore, based on Renka and Brown [22], when the coefficient of determination (R2) is 0.999, the interpolation method can be considered as excellent. Therefore, from all numerical results, the proposed scheme is excellent.
6. Application on Real Data
In this section, the proposed scattered data interpolation using cubic Timmer triangular patch is tested to visualize some real datasets. We use two different datasets i.e., the rainfall data and the digital elevation data. All scattered data discussed in this section are irregularly distributed.
6.1. Visualize the Rainfall Data
First, we test the proposed scattered data interpolation scheme to visualize rainfall data. Based on our previous discussion, we apply the Foley and Opitz [19] method to calculate the inner ordinates and local scheme of Choice 1. The rainfall data sites are obtained from Malaysian Meteorology Department. The data are of average rainfall that were collected at some 25 major stations throughout Peninsular Malaysia. We have chosen the rainfall data for three different months i.e., February, March, and May 2007, as shown in Table 10. Figure 28 shows the Delaunay triangulation of rainfall data at the collected stations.
Table 10.
Rainfall data.
Figure 28.
Delaunay triangulation of rainfall data.
Figure 29 shows the 3D linear interpolant of the rainfall data for each month. The surface of rainfall distribution in Malaysia of cubic Timmer triangular patches according to each month is shown in Figure 30.
Figure 29.
3D Linear Interpolant of the rainfall data.

Figure 30.
Surface Interpolation using the proposed scheme.
Meanwhile, Table 11 shows all the surface interpolations show that the minimum value of the average rainfall less than zero as shown in Table 11.
Table 11.
Minimum value (mm).
6.2. Visualize the Digital Elevation Data of Kalumpang Agricultural Station
Next, we test the proposed scattered data interpolation scheme to visualize the 160 digital elevation data of Kalumpang Agricultural Station (3° 38′ N, 101.34′ E) located about 90 km northeast of Kuala Lumpur, Malaysia (refer to z values in Table 12). We also apply the Foley and Opitz [19] method and Choice 1 to calculate the inner ordinates and local scheme of the proposed cubic Timmer triangular patch. Figure 31 shows the Delaunay triangulation for all 160 data points.
Table 12.
Digital elevation data of Kalumpang Agricultural Station.
Figure 31.
Delaunay triangulation for digital elevation data.
Figure 32 shows the 3D linear interpolant of the data points. The interpolating surfaces using the proposed cubic Timmer, Karim and Saaban [21], and Goodman and Said [8] schemes are illustrated in Figure 33. The final interpolating surface is constructed by combing all 269 triangular patches.
Figure 32.
3D linear interpolant for digital elevation data.
Figure 33.
Surface Interpolation.
Based on Figure 33, all interpolating surface are visually pleasing. However, we can compare the effectiveness of the proposed scheme by calculating the CPU time (in seconds). The proposed cubic Timmer triangular scheme took about 33.6956 s to construct the surface. Furthermore, the Karim and Saaban [21] scheme required 33.8426 s while the Goodman and Said [8] scheme required 33.9239 s to interpolate the surface of digital elevation data. Hence, we can conclude that the proposed cubic Timmer triangular scheme is the best scheme in terms of CPU time compared to other schemes.
7. Conclusions and Future Work
In this paper, the cubic Timmer triangular patches, as implemented in Ali et al. [16], is applied to interpolate the scattered data. Goodman and Said [8] and Foley and Opitz [19] schemes are used in order to calculate the inner ordinates for each local scheme. It is observed that the cubic Timmer triangular patches offer lower CPU time (computational cost) as compared to the cubic Bezier and Ball triangular patches methods. Moreover, the simulation error shows that the cubic Timmer triangular patches have the same values as obtained from Goodman and Said schemes. In addition, we infer from the obtained results that the cubic Timmer triangular patches give better results as compared to some established schemes when the datasets are increasing. Therefore, we can preserve the positivity of the rainfall data by constructing the shape preservation of cubic Timmer triangular patches in our main studies in future.
Author Contributions
Conceptualization, S.A.A.K.; formal analysis, A.G. and D.B.; funding acquisition, S.A.A.K.; methodology, A.G. and K.S.N.; software, F.A.M.A., S.A.A.K., A.S., and M.K.H.; visualization, A.G.; writing—original draft, F.A.M.A., S.A.A.K., A.S., M.K.H., and K.S.N.; writing—review and editing, K.S.N. and D.B. All authors have read and agreed to the published version of the manuscript.
Funding
This study is fully supported by Universiti Teknologi PETRONAS (UTP) through its research grants YUTP:0153AA-H24 and the Ministry of Education, Malaysia through FRGS/ 1/2018/STG06/UTP/03/1015MA0-020.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Amato, F.; Moscato, V.; Picariello, A.; Sperlí, G. Recommendation in social media networks. In Proceedings of the 2017 IEEE Third International Conference on Multimedia Big Data (BigMM), Laguna Hills, CA, USA, 19–21 April 2017; pp. 213–216. [Google Scholar]
- Karim, S.A.B.A.; Saaban, A. Visualization Terrain Data Using Cubic Ball Triangular Patches. In Proceedings of the MATEC Web of Conferences, 18–19 September 2018; Volume 225, p. 06023. [Google Scholar]
- Ni, H.; Li, Z.; Song, H. Moving least square curve and surface fitting with interpolation conditions. In Proceedings of the 2010 International Conference on Computer Application and System Modeling (ICCASM 2010), Taiyuan, China, 22–24 October 2010; Volume 13, pp. V13–V300. [Google Scholar]
- Ali, F.A.M.; Karim, S.A.A.; Dass, S.C.; Skala, V.; Saaban, A.; Hasan, M.K.; Ishak, H. Efficient Visualization of Scattered Energy Distribution Data by Using Cubic Timmer Triangular Patches. In Energy Efficiency in Mobility Systems; Sulaiman, S.A., Ed.; Springer: Singapore, 2020; pp. 145–180. [Google Scholar]
- Awang, N.; Rahmat, R.W. Reconstruction of Smooth Surface by Using Cubic Bezier Triangular Patch in Gui. Malays. J. Ind. Technol. 2017, 2, 61–69. [Google Scholar]
- Cavoretto, R.; Rossi, A.D.; Dell’Accio, F.; Tommaso, F.D. Fast computation of triangular Shepard interpolants. J. Comput. Appl. Math. 2019, 354, 457–470. [Google Scholar] [CrossRef]
- Grise, G.; Meyer-Hermann, M. Surface reconstruction using Delaunay triangulation for applications in life sciences. Comput. Phys. Commun. 2011, 182, 967–977. [Google Scholar] [CrossRef]
- Goodman, T.N.; Said, H. A Triangular Interpolant Suitable for Scattered Data Interpolation. Commun. Appl. Numer. Methods 1991, 7, 479–485. [Google Scholar] [CrossRef]
- Hussain, M.Z.; Hussain, M. Shape preserving scattered data interpolation. Eur. J. Sci. Res. 2009, 25, 151–164. [Google Scholar]
- Hussain, M.Z.; Sarfraz, M. Monotone piecewise rational cubic interpolation. Int. J. Comput. Math. 2009, 86, 423–430. [Google Scholar] [CrossRef]
- Hussain, M.Z.; Hussain, M. C1 positivity preserving scattered data interpolation using rational Bernstein-Bézier triangular patch. J. Appl. Math. Comput. 2011, 35, 281–293. [Google Scholar] [CrossRef]
- Karim, S.A.A. Monotonic Interpolating Curves by Using Rational Cubic Ball Interpolation. Appl. Math. Sci. 2014, 8, 7259–7276. [Google Scholar] [CrossRef]
- Karim, S.A.A.; Saaban, A.; Hasan, M.K.; Sulaiman, J.; Hashim, I. Interpolation using Cubic Bèzier Triangular Patches. Int. J. Adv. Sci. Eng. Inf. Technol. 2018, 8, 1746–1752. [Google Scholar] [CrossRef]
- Ibraheem, F.; Hussain, M.Z.; Bhatti, A.A. C¹ Positive Surface over Positive Scattered Data Sites. PLOS ONE 2015, 10, e0120658. [Google Scholar] [CrossRef] [PubMed]
- Su, X.; Sperli, G.; Moscato, V.; Picariello, A.; Esposito, C.; Choi, C. An Edge Intelligence Empowered Recommender System Enabling Cultural Heritage Applications. IEEE Trans. Ind. Inform. 2019, 15, 4266–4275. [Google Scholar] [CrossRef]
- Ali, F.A.M.; Karim, S.A.A.; Dass, S.C.; Skala, V.; Saaban, A.; Hasan, M.K.; Ishak, H. New cubic Timmer triangular patches with C1 and G1continuity. J. Teknol. 2019, 81, 1–11. [Google Scholar]
- Timmer, H.G. Alternative representation for parametric cubic curves and surfaces. Comput.-Aided Des. 1980, 12, 25–28. [Google Scholar] [CrossRef]
- Goodman, T.N.T.; Said, H.B.; Chang, L.H.T. Local derivative estimation for scattered data interpolation. Appl. Math. Comput. 1995, 68, 41–50. [Google Scholar] [CrossRef]
- Foley, T.A.; Opitz, K. Hybrid cubic Bézier triangle patches. In Mathematical Methods in Computer Aided Geometric Design II; Academic Press: New York, NY, USA, 1992; pp. 275–286. [Google Scholar]
- Awang, N.; Rahmat, R.W.; Sulaiman, P.S.; Jaafar, A. Delaunay Triangulation of a missing points. J. Adv. Sci. Eng. 2017, 7, 58–69. [Google Scholar]
- Karim, S.A.A. Shape Preserving by Using Rational Cubic Ball Interpolant. Far East J. Math. Sci. 2015, 96, 211–230. [Google Scholar]
- Renka, R.J.; Brown, R. Algorithm 792: Accuracy Tests of ACM Algorithms for Interpolation of Scattered Data in the Plane. ACM Trans. Math. Softw. 1999, 25, 78–94. [Google Scholar] [CrossRef]
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).