Shape-Preserving Curve and Surface Data Embedding Algorithm

In this study, shape preserving data driven rational cubic schemes are developed. A rational cubic piecewise function (quadratic denominator and cubic numerator) with two parameters was transformed to C 1 rational cubic piecewise function. Constraints were derived on free parameters by means of some mathematical derivations to train and demonstrate convex curve. The scheme, then, was advanced to partially blended rational bi-cubic function with eight free parameters which were controlled to ascertain convex surface. A numerical comparison with certain existing schemes manifested that the proposed method was economical. The proposed scheme was put into visualization of convex 2D and 3D data using MATLAB software packet. Additionally, the suggested approach produced a more visually appealing interpolating curve for scientific visualization for specific data sets.


INTRODUCTION
A considerable amount of raw data that represents the experiment's outcomes is typically obtained by the scientists when the experiments are carried out in the lab. For instance, the data in a chemical experiment might be the distillation curve, whereas in a biology experiment, it could be the movement of the relevant cell within the system. Additionally, any experiment may have error or noise in the data collecting procedures. The type of error could be systematic, biased, or random. Other methods of data processing, such as data fitting and data smoothing or filtering were applied to these types of data. Interpolation is a preferable alternative for the data if the data is clean, which means there are probably no errors. However, if the data contains noise, approximation, smoothing, or de-noising may be advantageous to gain fruitful results. There are several popular techniques for processing the data including linear regression, polynomial regression (or fitting), any non-polynomial fitting, cubic splines, and smoothing splines. Interpolation, on the other hand, addresses the problem of creating curve or surface that must also maintain the data's geometric shape when it is approximated which is subject of the current research.
Science and engineering, both rely on these continuous visual representations of discrete scientific data in particular which are coherent with intrinsic properties of the data. Computational methods used in these realms are terms as shape preserving algorithms. The design of shape preserving data embedded curves and surfaces lies at the heart of several scientific disciplines in the digital age including computer-aided geometric design (CAGD), computer graphics, and computer-aided design (CAD). These applied areas combine via computational software packets, ideas from numerical techniques, visualization, differential geometry, and linear algebra. Surface and curve drawing schemes offered architects a competitive edge over traditional drafting tool and optimized the likelihood of realizing their ideas by exhibiting their thoughts on computer displays in remarkable short amount of time.
Moreover, the design of machine software, robotics, and chemical processes are among the many fields in which shape-preserving approaches are widely used. For designing ceramics, cutting wood for wooden furniture and creating ornaments, a lathe is utilized. The design of the lathe path is made by using shape-preserving software. Shape-preserving interpolation techniques are employed in both, chemistry and robotics, to plan the path of the robots. In chemistry, they are used for PARFAC modelling of the fluorescence data. There are more applications in the areas of signal processing and photogrammetric data manipulation. Convexity, monotonicity, and positivity are the most dominant data types. All of these applications have to be retained in the process of visualization.
The usual data interpolation algorithms present the data smoothly, however, fail to intact its shapes. The existing shape-preserving algorithms restrain the derivatives at the knots to envisage convex, monotone, and positive data as convex, monotone, and positive surfaces and curves and operate effectively with specific conditions, for instance, the solution of Scientific Inquiry and Review Volume 7 Issue 2, 2023 ordinary and partial differential equations cannot be interpolated by these shape-preserving methods. Another strategy is to add additional knots between the existing data points. Even though these techniques maintain the forms of the data, the amount of computing work has grown larger.
The motivation behind the current research was to devise an efficient and economic algorithm that not only delivers smooth visualizations but confirms convexity in the visual attribute. This research addressed the convex surface and curve interpolation which has become a fundamental element of numerous applications in several areas, such as airplane and automotive industries, architecture, mechanical engineering, and computer graphics. Likewise, convexity in yield curve measures the extent at which price of a bond changes with the rate of interest prevalent in market. It benefits the stakeholders to anticipate price of a bond if market interest rate changes. Furthermore, indifference curve in economics which ranks a consumer's preference for a combination of goods represents convex structure.
Shape conserving convex interpolation was well explored in past few decades and some eminent contributions are . The control points of the boundary of 2D shape are optimized using B'ezier curve in [1] and [2]. BFGS diagonal approximation method was employed in [3] to solve B spline curve fitting problem. Surface reconstruction, using B spline and BFGS diagonal approximation, was discussed in [4]. Kvasov [6] presented two algorithms to preserve the monotonicity and convexity of the discrete data by using weighted 1 quadratic splines. Verlan [7] proposed an algorithm of C 2 interpolation utilizing splines of arbitrary degree for discrete data to achieve the convexity conservation of data. Moreover, in [8][9][10] convexity preserving techniques were global.
Brodlie and Butt [11] presented a piecewise cubic 1 interpolant to preserve the convexity of the data. Hussain et al. [12] suggested a local shape preserving interpolation scheme through 1 bi-quadratic trigonometric spline. The scheme comprised of four free parameters in each rectangular domain. These free parameters were controlled so that no possible fluctuations could be seen. This scheme maintained the smoothness of positive and monotone 3D data. Sarfraz et al. [14] constructed a rational cubic function with two parameters in the vision of captivating positive data. Simple constraints were manipulated on two parameters in the illustration of rational cubic function and extended rational bi-cubic partially blended function. The scheme was local with an approximation order of (ℎ 3 ). Sarfraz et al. [15] developed the smooth shape preserving methods deploying piecewise rational cubic and the rational bi-cubic function to conserve the convexity for 2D and 3D data. The data dependent constraints on free parameters were evaluated to achieve the shape of convex data. The convexity conserving schemes yielded adequate degrees of freedom to facilitate the researcher and user. The convex shape of the data was not preserved by the techniques in [17] when the data was presented with derivatives.
To retain the shape of convex data, Costantini and Fontanella [22] created a semi-global approach. However, this scheme was not economical as degree of interpolant in some rectangular patches became excessively high and the polynomial patches tended to be linear in x and/or y. The resulting surfaces, also, failed to attain a visually pleasant look. In order to create convex surfaces, Asaturyan [23] each rectangular grid was divided into nine smaller rectangles. This scheme was not local which means that by altering the data for one sub rectangle's edge in the x direction, a modification was made to the grid for all of the sub rectangle's edges that were originally situated in the x direction. The convex data visualization techniques created in [24] were global.
In [25], the proposed approach kept the convexity of the surface along the grid lines, but failed to preserve the convexity inside the grids, leading to unfavorable flat areas because second order mixed partial derivatives vanished. A univariate C 2 cubic spline was utilized to preserve convexity. A C 2 quartic \ quadratic interpolant was used by authors in [26] to visualize monotone, convex, and positive data set.
The convex shape of the data was not preserved by the techniques in [17,25] when the data was presented with derivatives.
The main focus of the current paper was to derive data dependent constraints on parameters in the description of piece wise rational cubic and bi-cubic functions in [14] to hold convexity. The research conducted for this purpose was discussed in several sections. Section 2 and Section 3 presents a review of piece wise rational cubic and rational bi-cubic function [14] to be employed. Convexity preserving constraints for curve and surface data were developed in Section 4. Section 5 provides implementation of rational scheme developed on 2D and 3D data sets and corresponding numerical Scientific Inquiry and Review Volume 7 Issue 2, 2023 results were demonstrated in Section 6. Proposed research algorithm was concluded in Section 7.

RATIONAL CUBIC FUNCTION
The rational cubic function introduced by Sarfraz et al. [14] is explained in this section.

THE PROPOSED ALGORITHM
This section uses the rational cubic function and rational bi-cubic function to build convexity-preserving for regular surface data (2).
Additionally, the following condition is fulfilled by the derivative values: are the parameters in the interval [ , +1 ].

The piecewise rational cubic function
The value of (2) ( ) is computed as follows: The denominator quantity ( ) in (9) is a cube quantity and is positive if In addition to this, the requisite condition for convexity in each subinterval is given as: After numerous manipulations, we successfully procure the constraints on and given by which can be rearranged as The above discussion is summarized as:

RESULTS AND DISCUSSIONS
This section describes algorithm for the proposed shape preserving techniques in section 4 and verify its effectiveness through graphical results in the subsequent numerical examples.
Step 3: Using Theorem 1, evaluate free parameters and .
Step 4: Insert the above values in Eq. (4.1). Table 1 encloses convex data set. MATLAB programming software packet was used to implement constraints on shape parameter in order to visualize convex curve. Numerical results were recorded in Table 5. Figure 1 clearly reflects the shape characteristic of convexity. Example 2. Another convex data set was considered to implement the proposed algorithm using MATLAB software packet and results are shown in Table 6, while Figure 2 clearly depicts convexity of data.   Table 1 Using Convex Rational Cubic Spline Function  Table 2 Using Convex Rational Cubic Spline Function

Scientific Inquiry and Review
Volume 7 Issue 2, 2023 Step 2: Approximate the derivatives ̃, and ̃, at the nots using Arithmetic mean method.
Step 4: Insert the above values in (3). Table 3 which is created by the function particularized in the following Eq. (6.1). Convexity is conserved by utilizing convex bi-cubic rational function with the graphical representation illustrated in Figure 3. Numerical results are displayed in Table 7. The uz-view and the vz-view of the convex surface is given in the Figure 4 and Figure 5, respectively. ̃( , ) = 2 + 2 + 0.1. (6.1)   Table 4 is made up by the function given by the subsequent equation (17). The convex rational bicubic functions help to preserve the convexity of the data which can be visualized in Figure 6. Figures 7, and Figure 8 give the uz-view and vz-view of the convex surface, respectively. Numerical results are shown in Table  8. ̃( , ) = ( 2 + 2 − 1) 2 + 0.2. (6.2)

NUMERICAL RESULTS
This section presents the numerical results when proposed algorithm was implemented on 2D convex data set in Table 1 and Table 2. Similarly, for 3D convex data in Table 3 and Table 4, numerical results are given in Table  7 and Table 8. MATLAB software packets were used for programming and visualizing convex curves and surfaces.
Numerical results for ̃,