Calculation of Space NURBS Curve Interpolation Error

Aiming at the problem of low accuracy of interpolation error calculation of existing NURBS curves, an approximate method for the distance between a point and a NURBS interpolation curve is proposed while satisfying the accuracy of the solution. Firstly, the minimum parameter interval of the node vector corresponding to the data point under test in the original data point sequence is determined, and the parameter interval is subdivided according to the corresponding step size, and the corresponding parameter value is obtained. Secondly, the distance from the measured point to the NURBS curve is calculated, and the nearest distance is found out. The node interval is subdivided again on one side of the nearest distance. Finally, the distance between the data point to be measured and each subdivision point is calculated again, and the minimum distance is taken as the interpolation error between the point and the NURBS curve. The simulation results of actual tool position data show that this method can more accurately obtain the error of spatial NURBS interpolation curve.


Introduction
NURBS curve and surface interpolation technology has a broad application prospect in Computer-Aided Design, and has become the most popular mathematical expression as early as the 1980s [1] [2] [3]. In the design and production process in the field of numerical control machining, it is necessary to seek the optimal NURBS curve and surface expression from a large number of original cutter point data [4]. Gofuku et al. [5] proposed a technique to interpolate B-spline curves through geometric algorithm, which has a compact representation and does not need to be given the size of the tangent vector and the normal vector. Yoshimoto et al. [6] proposed a genetic algorithm based on real number coding, which can achieve a better fitting effect when dealing with smooth data.
Park et al. [7] proposed a B-spline curve approximation method based on error adaptive control, which can obtain the minimum control point curve satisfying the preset fitting accuracy without the given number of control points.
The interpolation error is an important basis for measuring the distance between the spatial uninvolved interpolation data points and the NURBS interpolation curves. The above scholars have given corresponding interpolation error calculation models for the interpolation error calculation problem, and the quality of the error calculation model directly affects the number of iterations of the NURBS interpolation curve and the number of interpolation data points, and finally affects the efficiency in the actual processing process. In addition to the above scholars, Hu et al. [8] proposed a method to calculate the minimum distance between a point and a curve by using the projection method. This method has a fast convergence rate, but strict requirements on the selection of initial values in the iterative process. Stakhov [9] proposed a golden section method to calculate the minimum distance from the point to the curve. The method has a slow convergence speed and uncertain direction. Shopova et al. [10] and Vallex et al. [11] proposed genetic algorithm and particle swarm optimization algorithm respectively. These methods can obtain the global optimal solution, but the algorithm is complex and the calculation takes a long time. Theoretically, the interpolation error value is the radius of the circular arc tangent to the NURBS curve at the data point to be measured. The radius value is taken as the theoretical interpolation error value. Due to the complexity of the calculation of this method, most scholars have not adopted this method for calculation. Currently, the most extensive deviation calculation method is to carry out parametric calculation on all data points to be tested, calculate the corresponding points of each parameter value on the NURBS curve, and take the distance between the data points and the corresponding points on the NURBS curve as the actual interpolation error value [12]. In view of the above calculation method, it is easy to produce the problem of low accuracy and poor reliability, which will greatly increase the number of iterations and the selection of interpolation data points.
Based on the above analysis, this article will elaborate on the following four parts. In the first part, the method steps of interpolating the global curve of a given data point are introduced in detail. In the second part, this paper proposes a new method for calculating spatial NURBS curve interpolation error, and explains the calculation process of this method in detail. In the third part, the error calculation method is compared with the existing method to show the superiority of accuracy in error calculation. The fourth part summarizes the whole paper and explains the application value of the NURBS curve error calculation method.

A Basic Definition of a NURBS Curve
A p-degree NURBS curve is defined as [13] (1) In Equation (1) (2)

Calculation of NURBS Curve
For the data point set of NURBS curve interpolation, the following interpolation calculation method can be used to calculate the NURBS curve interpolation.

Parametric Calculation of Feature Points
First, we need to parameterize the set of data points participating in the interpolation. In this paper, the most commonly used string length parameterization method is used to parameterize the feature data points.
For data point set { }( ) 0,1, 2, , j j n = Q  , let the total chord length be D, then there will be Then, the parameters corresponding to each data point { }(

Node Vector Calculation
Let the node vector be where U is equal to 

The Calculation of Control Points
Establish the following system of linear Equations for the control point i P In Equation (7), The parameter j u and the node vector U can be obtained by using Equations    , as shown in Figure 2(b).

Interpolation Error Calculation of NURBS Curve
In the parameter node interval ( ) The calculation formulas of the distance between data point , w ε and s ε can be respectively calculated as (14) Now, the specific algorithm steps of the approximate solution method for interpolation error can be summarized as follows:  Search the minimum parameter node interval ( ) , a b u u in the node vector corresponding to the data point s Q in the original data point sequence, divide the parameter interval by the step length h calculated by Equation (9) into R equal parts, and obtain the value of each parameter at the equal point respectively.
 The distance r ε between s Q and various points on the curve corresponding to parameter r u is calculated by using Equation (10), and the minimum distance c ε is obtained by combining Equation (11). Meanwhile, the point u u + is obtained, and the R′ bisection is performed by using Equation (12), and the value w u ( ) 0,1, 2, , w R ′ =  at the same bisection point of each parameter is obtained, respectively. w ε and s ε are calculated by using Equation (13) and Equation (14).

Actual Data Calculation Results and Comparative Analysis
In order to verify the accuracy and feasibility of the interpolation error calculation method proposed in this paper, firstly, { } j Q set of data points to be interpolated and a measurement point Q outside the data points are given in this  Figure 3. Using the interpolation error calculation method proposed in this paper, the distance between the measured point Q and the NURBS interpolation curve is calculated by using the existing neighborhood comparison method [12] and the stepwise scanning method [14] respectively. The calculation results and calculation time of various methods are listed in Table 2. The theoretical distance in Table 2 is calculated by using UG/NX software.   As can be seen from Table 2, the approximate error solutions can be obtained by the three calculation methods. Among them, the minimum distance calculated by the stepwise scanning method is 0.0115 mm larger than the theoretical minimum distance, but the calculation time is the shortest. The minimum distance calculated by the neighborhood comparison method is 0.0010 mm larger than the theoretical minimum distance, and the calculation time is much longer than that by the neighborhood comparison method. The minimum distance calculated by the method in this paper is 0.0007 mm larger than the theoretical minimum distance and takes the longest time to calculate. However, the actual distance calculated by the method in this paper is closer to the theoretical distance calculated by using UG/NX software, which can more accurately express the error results of NURBS curve interpolation. Therefore, the interpolation error calculation method proposed in this paper is effective in the actual interpolation error calculation process.

Conclusion
Solution space for NURBS curve point to the curve of minimum distance problem, this paper puts forward a new type of computing space discrete data points to NURBS curve distance method, and the correctness of the method through examples, and compared with other existing methods, the calculation precision of the method is higher, to reflect the NURBS curve interpolation error and improve the efficiency of iteration has good application value.