- About this Journal ·
- Abstracting and Indexing ·
- Advance Access ·
- Aims and Scope ·
- Annual Issues ·
- Article Processing Charges ·
- Articles in Press ·
- Author Guidelines ·
- Bibliographic Information ·
- Citations to this Journal ·
- Contact Information ·
- Editorial Board ·
- Editorial Workflow ·
- Free eTOC Alerts ·
- Publication Ethics ·
- Reviewers Acknowledgment ·
- Submit a Manuscript ·
- Subscription Information ·
- Table of Contents

Journal of Applied Mathematics

Volume 2013 (2013), Article ID 531497, 10 pages

http://dx.doi.org/10.1155/2013/531497

## Data Visualization Using Rational Trigonometric Spline

School of Mathematical Sciences, Universiti Sains Malaysia, 11800 Penang, Malaysia

Received 26 March 2013; Accepted 11 May 2013

Academic Editor: Francisco Chiclana

Copyright © 2013 Uzma Bashir and Jamaludin Md. Ali. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

This paper describes the use of trigonometric spline to visualize the given planar data. The goal of this work is to determine the smoothest possible curve that passes through its data points while simultaneously satisfying the shape preserving features of the data. Positive, monotone, and constrained curve interpolating schemes, by using a piecewise rational cubic trigonometric spline with four shape parameters, are developed. Two of these shape parameters are constrained and the other two are set free to preserve the inherited shape features of the data as well as to control the shape of the curve. Numerical examples are given to illustrate the worth of the work.

#### 1. Introduction

Data visualization, the technique of using images to represent information, has its history in the days back to the second century AD. But most of the developments are made in the last couple of centuries, predominantly during the last 30 years. It has extensively been used in industrial design, image processing, computer vision, computer aided geometric design, computer graphics, and many more. Shape preserving interpolation is a powerful tool to visualize the data in the form of curves and surfaces. The problem of curve interpolation to the given data has been studied with various requirements. One may be concerned with the smoothness of the interpolating curves, the preservation of the underlying shape features of the data, the computational complexity, or the fulfillment of certain constraints. Shape preserving signifies preserving the three basic and crucial geometrical features such as positivity, monotonicity, and convexity of the data. These shape characteristics can be easily observed when data arises from a physical experiment. In this case, it becomes vital that the interpolant produces curves more smooth and represent physical reality as close as possible. For this purpose, designers and engineers want such approximation methods that represent such physical situations accurately.

At present, spline methods have become the main tools for solving the majority of problems involving the approximation of functions, which also includes interpolation problems. Many spline functions exist that generate smooth and visually pleasant curves. Sarfraz et al. [1] studied shape preserving curve interpolation for positive, monotone, convex data and data lying above a line, using a piecewise rational cubic function with four shape parameters. Hussain et al. [2] visualized scientific data with shape preserving rational cubic interpolation by developing positive, monotone, and constrained data preserving schemes.

In recent years, polynomial splines and NURBS are replaced by trigonometric splines in order to prevail over the difficulties faced in using the former. Polynomial splines are not able to represent circular arcs and conics which are the most basic geometrical entity in almost every modeling system [3]. Also conics find a widespread application in optical and telecommunication instruments. NURBS offers great flexibility and precision for handling both analytic and freeform shapes but at the expense of intuitiveness and ease of implementation. A number of authors have contributed to trigonometric splines to represent curves and surfaces [4–11]. Lately, an alternative approach in shape preserving, using the trigonometric splines is introduced. Liu et al. [10] studied cubic trigonometric polynomial B-spline curves and surfaces with shape parameter. Ibraheem et al. [12] introduced a piecewise rational trigonometric cubic function and piecewise rational trigonometric bicubic function with four shape parameters to visualize the positivity of positive curve and surface data. Zhu et al. [13] constructed shape preserving quartic trigonometric interpolation spline curves with shape parameters. The authors obtained continuous shape preserving spline curves, for any shape parameters satisfying the shape preserving conditions.

In this paper, we present a piecewise rational cubic trigonometric interpolating curve scheme for positive, monotone, and constrained data. Four positive shape parameters are used in the description of the interpolating scheme. Two of these parameters are constrained by simple data-dependent conditions to preserve the inherited shape feature of the data while the other two are kept free to modify the shape of the positive, monotone, and constrained curve. The scheme is useful for both equally and unequally spaced data.

This paper is arranged as follows. In Section 2, a piecewise rational cubic trigonometric spline with four shape parameters is constructed. Sections 3, 4, and 5 describe positive, monotone, and constrained curve interpolation schemes, respectively, to visualize positive, monotone, and constrained 2D data. Section 5 concludes the paper with some future work.

#### 2. Piecewise Rational Cubic Trigonometric Spline

In this section, we develop a piecewise rational cubic trigonometric spline with four parameters. Two of these parameters are free that can be used to preserve and control the shape of the interpolating curve while the other two are restricted. Data-dependent constraints are developed for these parameters to preserve the shape characteristics of the data under consideration.

Suppose that for knot spacing , given data points are defined as where are the function values at the knots of the function being interpolated. In each subinterval , , a piecewise rational cubic trigonometric spline with four shape parameters is defined as where The spline in (1) is continuous if the following interpolating conditions are satisfied: where denotes the derivative with respect to “” and are derivative values at given knots that are used for the shape control and smoothness of curve. These are either given or can be computed by some numerical method [14].

Using conditions (3), the values of unknowns , are Thus after using (4), (1) takes the form where , , and , are positive shape parameters. It is to mention that if the values of the shape parameters are chosen on trial basis, the shape characteristics of the data are not always preserved. Thus there arises a need for some conditions to be imposed on these shape parameters.

#### 3. Positive Curve Interpolation

In this section, we utilize piecewise rational cubic trigonometric spline developed in Section 1 to generate a positivity preserving curve using a positive data set.

Theorem 1. *A piecewise rational cubic trigonometric spline defined in (5) preserves the positivity of the positive data in each subinterval , , if the shape parameters satisfy the following conditions:
*

*Proof. * Consider a data set such that
piecewise rational cubic trigonometric spline given in (5) preserves positivity through positive data if .

if
Since , thus the positivity of the interpolant depends on only.

if all the coefficients are positive. It yields
Thus the sufficient conditions for the interpolant defined in (5) to preserve the positivity of positive data are that the shape parameters satisfy
This proves the desired result.

These conditions on the shape parameters can also be expressed as The developed scheme is used to demonstrate the positivity preserving of positive data. The curves in Figures 1 and 3 are drawn by using piecewise rational cubic trigonometric spline for 2D positive data sets given in Tables 1 and 2, respectively. Random values to the shape parameters are assigned and it is clearly visible that the resulting curves do not preserve the positivity. On the other hand, the positivity preserving curves in Figures 2 and 4 are generated for the same data set by using the scheme developed in Section 2. These figures also delineate the role of free shape parameters in shape control of the curve.

#### 4. Monotone Curve Interpolation

A 2D data set with , is said to be monotonically increasing (monotonically decreasing) if This section discusses a monotonicity preserving curve interpolating scheme with four parameters. For a given set of monotone data points, we wish to generate a piecewise cubic trigonometric curve that interpolates the data points and preserves monotonicity as well. We drive data-dependent conditions for two shape parameters while leaving the other two for designer’s choice.

Theorem 2. *The piecewise rational cubic trigonometric spline defined in (5) preserves the monotonicity through monotone data in each subinterval , if the shape parameters satisfy the following conditions:
**
where
*

*Proof. * Let be a monotonically increasing data set, that is,
The case of monotonically decreasing data set can be dealt in a similar fashion.

For monotonicity, the necessary conditions on derivatives are
There arise the following two cases for the interpolant (5) to preserve the monotonicity of monotone data.*Case **1*. when . In this case, reduces to
This proves that the interpolant is monotone. *Case **2*. When , then is monotonically increasing if and only if
For , is presented in a simpler form as
with
The denominator of (20) is always positive. Thus the sufficient conditions for monotonicity preserving curve are
since .

Also , if
Hence, to preserve the monotonicity of monotone data and control the shape of the curve as per desire, (23) and (24) can be written as
with
as required.

To produce a monotone curve using a monotone data, the restrictions on the shape parameters can be rearranged as
To implement the developed scheme, two monotone data sets are given in Tables 3 and 4, respectively. Initially, the curves are generated by assigning arbitrary values to the four shape parameters and nonmonotonicity preserving curves are shown in Figures 5 and 7, respectively. To remedy this deficiency, the scheme developed in Theorem 2 is applied to the same data sets and monotonicity preservation and smoothness of the curves are shown in Figures 6 and 8, respectively.

#### 5. Constrained Curve Interpolation

In this section, we generalize the curve scheme for positive data developed in Section 2. It is assumed that the data under consideration lies not only above the line , but also above any arbitrary line . We wish to drive a scheme for generating a curve which interpolates this data and lies above the line as well.

Theorem 3. * The piecewise rational cubic trigonometric spline defined in (5) preserves the shape of data lying above an arbitrary straight line in each subinterval , , if the following conditions are satisfied:
*

*Proof. *Let be a set of data points lying above a given straight line ; that is,
The curve will lie above the straight line if the rational cubic trigonometric spline (5) satisfies the following condition:
For each subinterval , (30) can be expressed as
or
where with and . Using the values of and as defined in (5), (31) can be written in a simplified form as
Using (4), we get
where
Since , , thus (34) is true if .

As :

if
Also if
Thus for a curve constrained by a line, the parameters must satisfy
Equation (38) can also be expressed as
The usefulness of the developed scheme is shown by taking data sets lying above a given line. The data set in Table 5 lies above line , whereas the data set given in Table 6 lies above the line . Figures 9 and 11 are produced by taking the values of the shape parameters on trial and error basis. These figures depict that the curves do not lie above the respective given straight lines. To remove this drawback, curves in Figures 10 and 12 are generated by using the constrained curve scheme developed in the previous theorem. It is clearly shown that the curves not only lie above their same respective lines but also can be made as smooth as required.

#### 6. Conclusion and Future Plan

A piecewise rational cubic trigonometric spline is discussed in this paper to address the problem of scientific data visualization. Four positive shape parameters are used in the description of positive, monotone, and constrained curve interpolation schemes. Two of these four shape parameters are constrained to preserve the shape of data and the other two are left free for the designer to alter the shape of curves in order to look like as he wants them to be. The presented scheme works well for both equally and unequally spaced data. It is tested for different data sets to show its usefulness in curve construction. In future this scheme will be extended to rational bicubic surface interpolation scheme to generate positive, monotone, and constrained surfaces.

#### Acknowledgments

The authors are grateful to the anonymous referees for their valuable comments which improved this paper significantly. This work is supported by School of Mathematical Sciences, Universiti Sains Malaysia.

#### References

- M. Sarfraz, M. Z. Hussain, and M. Hussain, “Shape-preserving curve interpolation,”
*International Journal of Computer Mathematics*, vol. 89, no. 1, pp. 35–53, 2012. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - M. Z. Hussain, M. Sarfraz, and M. Hussain, “Scientific data visualization with shape preserving ${C}^{1}$ rational cubic interpolation,”
*European Journal of Pure and Applied Mathematics*, vol. 3, no. 2, pp. 194–212, 2010. View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - G. E. Farin,
*Curves and Surfaces for Computer-Aided Geometric Design: A Practical Code*, Academic Press, Princeton, NJ, USA, 1996. - X. Han, “Quadratic trigonometric polynomial curves with a shape parameter,”
*Computer Aided Geometric Design*, vol. 19, no. 7, pp. 503–512, 2002. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - X. Han, “Piecewise quadratic trigonometric polynomial curves,”
*Mathematics of Computation*, vol. 72, no. 243, pp. 1369–1377, 2003. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - X. Han, “Cubic trigonometric polynomial curves with a shape parameter,”
*Computer Aided Geometric Design*, vol. 21, no. 6, pp. 535–548, 2004. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - X. Han, “${C}^{2}$ quadratic trigonometric polynomial curves with local bias,”
*Journal of Computational and Applied Mathematics*, vol. 180, no. 1, pp. 161–172, 2005. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - X. Han, “Quadratic trigonometric polynomial curves concerning local control,”
*Applied Numerical Mathematics*, vol. 56, no. 1, pp. 105–115, 2006. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - X. Han, “A class of general quartic spline curves with shape parameters,”
*Computer Aided Geometric Design*, vol. 28, no. 3, pp. 151–163, 2011. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet - H. Liu, L. Li, D. Zhang, and H. Wang, “Cubic trigonometric polynomial B-spline curves and surfaces with shape parameter,”
*Journal of Information and Computational Science*, vol. 9, no. 4, pp. 989–996, 2012. View at Google Scholar - M. Sheng and B. Su, “A class of Bézier-type curves and surfaces by trigonometric polynomials,”
*Journal of Computational Information Systems*, vol. 9, no. 1, pp. 89–96, 2013. View at Google Scholar - F. Ibraheem, M. Hussain, M. Z. Hussain, and A. A. Bhatti, “Positive data visualization using trigonometric function,”
*Journal of Applied Mathematics*, vol. 2012, Article ID 247120, 19 pages, 2012. View at Publisher · View at Google Scholar - Y. Zhu, X. Han, and J. Han, “Quartic trigonometric Bézier curves and shape preserving interpolation curves,”
*Journal of Computational Information Systems*, vol. 8, no. 2, pp. 905–914, 2012. View at Google Scholar - M. Sarfraz, S. Butt, and M. Z. Hussain, “Visualization of shaped data by a rational cubic spline interpolation,”
*Computers & Graphics*, vol. 25, no. 5, pp. 833–845, 2001. View at Publisher · View at Google Scholar · View at Scopus