COMPUTER REALIZATIONS OF THE CUBIC PARAMETRIC SPLINE CURVE OF BÈZIER TYPE

This paper presents a new method for constructing a third degree parametric spline curve of C1 continuity. Like the Bèzier curve, the proposed curve is constructed and operated by control points. The peculiarity of the proposed algorithm is the assignment of some unknown values of the spline in the control points abscissas, which are based on the conditions of the first derivative continuity of the curve at these points. The position of the touch points, as well as the control points, can be set interactively. Changing of these points positions leads to a change in the curve shape. This allows the user to flexibly adjust the shape of the curve. Systems of algebraic equations with tridiagonal matrix for calculating the coefficients of a spline curve are constructed. Conditions for the existence and uniqueness of such a curve are presented. Examples of the use of the proposed curve, in particular, for monotone data sets, approximation the ellipse and constructing the letter "S" are given.


INTRODUCTION
Bèzier method is a powerful tool for constructing curves and surfaces with desired properties in the computer geometric design systems.The combination of Bèzier's curves with the technique of the spline constructing provided significant opportunities for the development of spline curves, which are actively used in computer-aided design systems and computer graphics packages [1,2,3].The general feature of curves and surfaces called Bèzier curves is that they are defined, modified, and operated by control points [4].Due to the interactive choice of these points' spatial positions, the designer can customize and modify the curve shape to meet the requirements of a particular task.
The combination of Bèzier curves with a procedure for building a spline yielded significant possibilities for the development of spline curves.A comparison between the Bèzier curve and methods for interpolation using the Hermitian splines is given in [5].Several Hermite-type interpolation methods for rational cubic are presented in [6].
The historical development and current state of Bernstein polynomial can be found in [7].
Manipulating control points makes it possible to customize the interpolation spline to the shape of the curve selected by a designer.The criteria for choosing the "best" spline to achieve a 2 G continuity of the entire curve are studied in [8].The structure of spline is introduced with additional parameters for retaining the universality and good approximating properties of splines in terms of engineering applications.
Techniques for obtaining piecewise-quadratic polynomial curves with four control points for each segment of the curve and local parameters of the shape are presented in [9].Introducing additional parameters to the basis is a convenient way to adjust the shape of the curves.Numerical and geometrical effects caused by a change in the shape parameters are investigated in [10].
The Bèzier curves are controlled by three additional parameters in [11].Compared with ordinary Bèzier curves, the adjustable Bèzier curves have two main advantages: flexible form and simple continuity condition.Moreover, the curves can reach k G continuity.
The way the shape of the curve changes locally depending on values for the parameters of the shape, which are included in the basis, can be found in [12].An example of constructing and controlling a curve for computer-aided ship hull design is given in [13].
In order to represent conic curves, as well as certain transcendental curves, it is more appropriate to use trigonometric functions as the basis functions of the B-spline curve.In this case, the introduction of parameters to basis functions also provides additional possibilities to adjust the shape of the curve.A trigonometric basis, that contains parameters of the shape to represent an ellipse, are used in [14].Building a new type of splines, which are called quadratic irregular algebraic, trigonometric B-splines with several shape parameters, and which make it possible to globally or locally adjust the shape of the curves, are reported in [15].The dependence of geometrical properties of the proposed cubic trigonometric curves and the Bèzier surfaces on the shape parameters are studied in [16].Cubic trigonometric basis functions of a spline with a local parameter of the shape are considered in [17].Thus, the introduction of parameters makes it possible to build a class of functions among which one can choose the one that is most suitable for a given data set.The rational quadratic trigonometric Bèzier curve with two shape parameters is presented in [18].In this paper a quadratic Bèzier curve was constructed, which has 2 G and 2 C continuity.However, it should be noted, that the method of Bèzier curves may not be able to satisfy all the requirements that may arise during the design process.In particular, the positions of control points can be influenced on the smoothness of neighboring polynomials docking, of which the curve is formed.Therefore, the construction of curves smoothness which does not depend on the location of control points, is relevant.To obtain additional smoothness of the curves, an algorithm for constructing control points, the position of which ensures the 2 C continuity for compound cubic Bèzier curves is proposed in [19].
The local configuration of the curve shape can be accomplished by introducing additional parameters into the basis.Although this enables to manage the curve shape, it is practically impossible to do this interactively.
The approach which was proposed in [20] now we use for parametric curves.An algorithm for constructing a cubic spline curve is proposed and substantiated.Systems of algebraic equations with tridiagonal matrix for calculating the coefficients of polynomials are constructed.Conditions for the existence and uniqueness of such a curve are presented.The proposed curve has a third degree and retains the continuity of 1  C for any number of control points with an arbitrary position.The peculiarity of the proposed algorithm is the assignment of some unknown values of the spline in the control points abscissas, which are based on the first derivatives continuity conditions of the curve at these points.Research parabolic splines with additional knots are in [21].
The proposed algorithm for constructing of a spline curve and the resulting function have the following useful properties: ─ the curve has a continuity of 1  C for any set of control points and their arbitrary location; ─ the obtained curve allows to retain the monotony of the original data set; ─ a strategy for selecting and manipulating control points is intuitively understood; ─ manipulations with parameters that allow you to locally adjust the curve shape can be done interactively; ─ the algorithm for curve constructing is well suited for implementation on a computer, since it requires ( ) O N arithmetic operations, where N is the number of control points.The scientific contribution compared to a modern approach is the ability of the user to construct various curves for a given data set among which the best one is chosen for the problem being solved.This is achieved by combining the method of constructing a spline curve for a specially constructed set of interpolation points and controlling the resulting curve using control points.
The method discussed in the publication is well suited for monotony data sets.Existing methods focus on constructing curves that interpolate source data.The shape of curves between the interpolation knots is difficult to control and may depend on the knots location.Some authors proposed various methods for approximating the derivatives at the interpolation knots to preserve the monotony of the original data.
One of the widely used methods is the Akima's method which was proposed in the research [22].A method for determining the slopes locally at each given point is proposed in this research work.In [23] it was shown that the Akima's method leads to a violation of monotony on some irregular data sets.In this research work, an iterative algorithm for calculating derivatives at the interpolation points was constructed to build a monotone interpolant, which guarantees the function monotonicity on the interval for non-uniform data sets.In [24], the method of calculating the derivatives at the interpolation points as a weighted harmonic average was used to construct monotone interpolation methods.
In contrast to these works, here it is proposed to calculate the derivatives at points located between the control points.As a result, the resulting curve does not always pass through control points.For turning a curve into an interpolation curve for all points, the manipulation of control points is used.
The paper is organized as follows: In Section 2, a problem is formulated and a new method for constructing a spline parametric curve in the form of two Hermite polynomials of third degree is presented.Also, the conditions of existence and uniqueness of the resulting curve are given.Section 3 shows a step-by-step algorithm for constructing a parametric spline curve.Section 4 provides examples of the practical use of the proposed method for different data sets.

METHOD OF CURVE DESIGN
In this section, the problem of parametric piecewise polynomial interpolation is considered.The systems of algebraic equations for determining the coefficients of polynomials are given.The conditions of existence and uniqueness of its solution are given.
Let we have a sequence of control points ( , ),( , ),..., x y x y ( , ) N N x y .Let's make a polygonal line, by combining each of the adjacent points of a sequence with the segments of a straight line and determine the length of each of these segments We also determine at what distance i  along the polygonal line there is each of the control points of our sequence On each segment we define some points i  such as At points i  , the built spline curve will touch the corresponding segment of the polygonal line.Let's denote because ( ) , ( ) , According to [20] we denote through i  and i  , the unknown values of functions ( )   x S t and ( ) y S t in the knots of the spline i  .
To identify the unknowns i  , i  , two systems of algebraic equations are constructed.These systems are determined from the first derivatives continuity conditions of functions ( )   x S t and ( ) (1) where ) ) ) ) To close the system of equations we add conditions 1 1 , , These systems of equations have three-diagonal matrices.It was shown in [20] that matrices of the equation systems ( 6), ( 7), ( 12) have a diagonal superiority under conditions 1 2 3 3 i    , where i i i h    .These conditions guarantee the existence and uniqueness of these systems solution, and hence the curve itself.
The spline curve points at each of the intervals is determined using the Hermite interpolation polynomial [25] of the third degree , where , x y Q Q are found from the following expressions:

ALGORITHM
The method for constructing a spline parametric curve is presented in this section in the form of a step-by-step algorithm, which can easily be used to build a computer program.
Step 4. Calculate the matrix elements of the equation systems to determine the spline coefficients: by the formula (11).
Step 6. Calculation of values ( ) x S t and ( ) using the formulas ( 13)-( 16).After constructing the curve, the user evaluates whether the curve form satisfies the requirements of a task.If necessary, the shape of the curve can be changed by correction of control points.

NUMERICAL EXAMPLES
This section demonstrates the practical applicability of the method for interpolating monotone data sets.The possibilities of the method for describing various flat figures are shown.
In all calculations, all = 1 / 2 i  was put.The local behavior of the spline curve, depending on the i  parameter values, is considered in [20].
Example 1.The results of applying the proposed method to the data from the research [22] are presented (see Table 1).This data (represented by dots in Figure 1) is used to test methods for constructing curves that retain monotonicity.The dashed line indicates the result of applying the proposed method to the data from Table 1.The resulting curve is not interpolation for all points.For turning the curve into an interpolation, manipulation with control points was performed.
The resulting set of control points is shown in Table 2.The reuse of the algorithm gives a curve that is an interpolation for the original set of control points.Since the behavior of the curve between the knots is unknown, an important criterion is its visual perception.The appearance of curve 2 in Figure 1 visually coincides with the best curve drawn by experts [22].Example 2. In the research [23] it was shown that on some non-uniform grids (Table 3) [22] Akima's method breaks the monotony of the curve.In Figure 2 the dots show the data from Table 3, the dashed line shows the result of applying the proposed method to this data.The constructed curve retains monotony, but is not interpolational for all the points.The modified set of control points is presented in Table 4.The curve plotted for these points as control points, is an interpolation curve for the initial data (the solid line on the graph).The obtained curve is visually close to the intuitive idea of the function behavior.The necessary manipulations with the initial set of control points can be easily carried out interactively.Example 3. In this example, the sample data set from the research [24] was used (Table 5).The results of the algorithm are shown in Figure 3.To obtain an interpolation curve, a modified set of points was used (Table 6).The dots indicate the initial control points, the dashed line is the curve corresponding to the data in Table 5, the solid line is the curve corresponding to the data in Table 6.In this example, the number of control points has been increased.Example 5.There are many studies on the approach of conical sections, see, for example [27].
Here we demonstrate the possibility for the approximation of the ellipse using the proposed curve = 2 cos , = sin , = 0, 2 x y     .
The points of an ellipse are selected with a uniform step = / 6    .At these points, tangent ones are constructed.The points of tangents intersection are chosen as control points.To close the curve, control points 1 and 2 are repeated in sequence and have numbers 13, 14.The construction results are shown in Figure 2. The designations in Figure 5 are the same as in Figure 4.The closing point is indicated by a cross in Figure 5.At this point the spline curve also has the 1 C continuity.The example demonstrates a good opportunity of approaching an ellipse with the proposed curve.
Example 6.The algorithm is used to construct a flat figure of complex shape.In [8] splines were used to construct the letter "S".In our example, the letter "S" is used, which is given by thirty control points (Figure 6).The result of the curve construction is shown in the Figure with a thick line.

CONCLUSIONS
In the framework of the study, an algorithm constructing of the third degree parametric spline curve of 1  C continuity for any number of control points and their arbitrary position is proposed and substantiated.The originality of the proposed approach is that the segments of the straight lines connecting the control points are tangent to the curve.The position of the points of contact, as well as the control points, can be set interactively.Changing the position of these points leads to a change in the curve shape.This allows the user to flexibly adjust the curve shape.Conditions are found in the form of inequalities, which must satisfy the parameters i  , under which the curve exists and is unique.These conditions derive from the requirement of the diagonal superiority of the system matrix to determine the coefficients of polynomials.
According to the experiments, the constructed curve makes it possible to approximate the conic sections closely and it can be used to construct complex planar figures and monotone datasets.The disadvantages include only the 1  C continuity, but for most practical applications such continuity is sufficient.Also, the limitations of the proposed algorithm can include the presence of conditions on the shape parameters that must be observed when constructing the curve.
Like Bèzier curves, the proposed curve can be used in the systems of computer graphics and computer-aided design systems.Therefore, algorithmic innovations in this field are very important for the development of the functional capabilities of these systems, for graphically interpreting the results of experiments, creating fonts, templates, creating drawings of technical products, in particular, details and elements of vehicle shells, etc.

Figure 1 -
Figure 1 -Results of the spline curve calculation for Akima's data 1

Figure 2 -
Figure 2 -Results of the spline curve calculation for Akima's data 3

F 9 Example 4 ..
10 9.5 9 8.55 8.5 8.45 3.05 3 2.95 2 1.78 1.56 1.34 1.12 0.Let the sequence of control points , = 1,12 i i  which is marked with numbers from 1 to 12 in Figure 4. Lines connecting adjacent points are thin lines.The results of constructing a spline curve according to the proposed algorithm are shown by a thick line, the curve on the graph is plotted starting from the point lying in the middle of the segment 1 2 ( , )   and ends at a point lying in the middle of the These points are plotted on the graph by crosses.

Figure 3 -Figure 4 -
Figure 3 -Results of the spline curve calculation for data from [24]

Figure 5 -
Figure 5 -Results of a closed curve construction on an example of an ellipse

Figure 6 -
Figure 6 -A combination of two spline curves AC and BD and a straight line segments AB and CD for displaying the letter "S" spline curve, which is parametrically set by two splines of the third degree ( )