Length and curvature variation energy minimizing planar cubic G 1 Hermite interpolation curve

In this paper, we study how to construct a planar cubic G 1 Hermite interpolation curve with minimal length and curvature variation energy. This problem is solved by a bi-objective optimization model. We prove that there is a unique solution to this problem and give the expression of the solution. Some numerical examples show that the proposed method makes the curvature variation energy of the curve as small as possible when the length of the curve as short as possible.


Introduction
It is known that the planar two-point cubic G 1 Hermite interpolation curve can be described as follows, where p 0 and p 1 are two points, d 0 and d 1 are two unit tangent directions, i.e. ||d 0 || = ||d 1 || = 1, α 0 and α 1 are positive numbers, B 3 k (t) = (3!/k!(3 − k)!)t k (1 − t) 3−k (k = 0, 1, 2, 3) are cubic Bernstein basis polynomials. In general, the unit tangent directions d 0 and d 1 are given in advance and the positive numbers α 0 and α 1 are often used as free parameters. One can choose suitable α 0 and α 1 to make the cubic G 1 Hermite interpolation curve meet some certain needs.
Because the construction of fair (or smooth) curves is a fundamental problem in the filed of CAD and related application fields (see [1][2][3]), a natural idea is to find the optimal α 0 and α 1 for constructing the fair cubic G 1 Hermite interpolation curves. The general ways to construct fair curves are achieved by minimizing some energy functional representing the fairness (see [4]). The strain energy (bending energy) and curvature variation energy are two widely adopted metrics to describe the fairness of a planar curve, since curvature is the universal shape measure for curves (see [1,[5][6][7][8]). Recently, some works on determining suitable α 0 and α 1 of the planar cubic G 1 Hermite interpolation curve via strain energy minimization or curvature variation energy minimization have been proposed (see [4,[9][10][11][12]).
As with fairness, length is another usual shape measure for curves. People often need to construct curves with specific length in the filed of CAD and related application fields. It is not difficult to think that one can find suitable α 0 and α 1 to construct a cubic G 1 Hermite curve with required length. Furthermore, one can even find suitable α 0 and α 1 to construct a fair cubic G 1 Hermite curve with required length. Unfortunately, there is little discussion on this issue at present. In this paper, we consider finding suitable α 0 and α 1 for constructing the planar cubic G 1 Hermite curves with minimal length and curvature variation energy. We give the computing method in Section 2. In Section 3 we show some numerical examples to illustrate the effectiveness of the method. We present a short conclusion and discussion in Section 4.

Length minimization
Firstly, we consider minimizing the length of the cubic G 1 Hermite interpolation curve for constructing a curve with minimal length. As we know, the length of the curve b(t) can be expressed by Because it is too complicated for most practical applications, Equation (2) is often simplified to the following approximate form (see [13]), By a deduction from Equation (1), we can obtain that where Δp 0 := p 1 − p 0 , and B 2 By computing from Equation (4), Equation (3) be comeŝ where a · b := a x b x + a y b y denotes the dot product of planar vector. Let then Equations (5) and (6) have the same minimum. The gradients of Equation (6) can be calculated as follows, We can see from Equation (7) that the Hessian matrix of h 1 (α 0 , α 1 ) is where θ represents the angle between vectors d 0 and d 1 . It can be easily checked from Equation (8) that the matrix H 1 is symmetric positive definite. That means the quadratic functional h 1 (α 0 , α 1 ) is strictly convex, and it has a unique global minimum. The following unique global minimum can be solved by (∂h 1 /∂α 0 ) = 0 and Then, we can choose the parameters as Equation (9) for constructing the cubic G 1 Hermite interpolation curve with minimal length.

Curvature variation energy minimization
Secondly, we consider minimizing the curvature variation energy of the cubic G 1 Hermite interpolation curve for constructing a fair curve. The curvature variation energy of the curve b(t) is defined by (see [5]) where represents the curvature of the curve. In order to simplify the calculation, Equation (10) can be approximated by (see [12]) By a deduction from Equation (1), we can obtain that By computing from Equation (12), Equation (11) becomeŝ Let then Equations (13) and (14) have the same minimum. The gradients of (14) can be calculated as follows, We can see from Equation (15) that the Hessian matrix of h 2 (α 0 , α 1 ) is (16) It can be easily checked from Equation (16) that the matrix H 2 is symmetric positive definite when d 0 is not parallel to d 1 . In this case the quadratic functional h 2 (α 0 , α 1 ) is strictly convex, and it has a unique global minimum. The following unique global minimum can be solved by (∂h 2 /∂α 0 ) = 0 and (∂h 2 /∂α 1 Then, we can choose the parameters as Equation (17) for constructing the cubic G 1 Hermite interpolation curve with minimal curvature variation energy.

Length and curvature variation energy minimization
Finally, let us consider minimizing the length and curvature variation energy synchronously for constructing a fair curve with minimal length. In order to achieve this goal, we need to solve the following bi-objective optimization problem, where h 1 (α 0 , α 1 ) and h 2 (α 0 , α 1 ) is expressed in (6) and (14) respectively. By taking the sum of the two objectives with weights as a single objective functional, Equation (18) becomes where λ is the weight and 0 < λ < 1.
If we have determined the value of the weight λ, the gradients of Equation (19) could be calculated as follows, In this case, we can see from Equation (20) that the Hessian matrix of h(α 0 , α 1 ) is   (22). There are several approaches to determine the value of the weight (see [14]). Here, we use the ranking method. The overall algorithm is described in Algorithm 1, with some key steps detailed below. In Line 1, we compute the deviation between the two target functions. It is obvious that the deviation δ (j) i ≥ 0, i, j = 1, 2. In Line 2, we compute the average deviation of the two target functions. Since δ (i) i = 0, the average deviations are actually m 1 = δ (2) 1 and m 2 = δ (1) 2 . In Line 3, we compute the initial weights of the two target functions. It is obvious that the initial weights satisfy λ 1 , λ 2 ≥ 0 and λ 1 + λ 2 = 1. In Line 4, we choose the smaller weight for the objective function with larger average deviation, and the larger weight for the objective function with smaller average deviation.
Algorithm 1: Determining the weight λ by ranking method.
the weight is taken as λ = λ 2 ; else, the weight is taken as λ = λ 1 .

Numerical examples
In this section, we give some numerical examples to illustrate effectiveness of the length and curvature variation energy minimization, and compare this method with the length minimization and the curvature variation energy minimization. All the numerical examples are implemented by MATLAB.  We can obtain the two parameters of the three methods from Equations (9), (17), (22) and Algorithm 1. By substituting the obtained parameters into Equations (5) and (13), we can get the length and the curvature variation energy of the three methods. For the convenience of comparison, we put these results in Table 1. Figure 1 shows the graphs of the following curves: the cubic Hermite interpolation curve with minimal length (in green), the cubic Hermite interpolation curve with minimal curvature variation energy (in blue), the cubic Hermite interpolation curve with minimal length and curvature variation energy (in red), and the polygonal line joining the points (in dotted).  We put the results of the parameters, length and the curvature variation energy of the three methods in Table 2.
In Figure 2 we present the cubic Hermite interpolation curve with minimal length (in green), the cubic Hermite interpolation curve with minimal curvature variation energy (in blue), the cubic Hermite interpolation curve with minimal length and curvature variation energy (in red), and the polygonal line joining the points (in dotted).

Example 3.3:
We take the following data taken from a unit arc, where θ i = π/4, π/2, 2π/3. In this case, the G 1 Hermite interpolation curve consists of two segments (The two segments are named as s1 and s2 for short). We put the  results of the parameters, length and the curvature variation energy of each segment of the three methods in Table 3.
The cubic Hermite interpolation curve with minimal length (in green), the cubic Hermite interpolation curve with minimal curvature variation energy (in blue), the cubic Hermite interpolation curve with minimal length and curvature variation energy (in red), and the unit arc (in dotted) are shown in Figure 3.
The above numerical examples show that the proposed method makes the curvature variation energy of the curve as small as possible when the length of the curve as short as possible. If we need to construct the fair curves with minimal length, the proposed method will come in handy.

Conclusion and discussion
This paper focuses on how to construct a fair cubic G 1 Hermite interpolation curve with minimal length, which is achieved by solving a bi-objective optimization problem to search the optimal values of the two parameters. It can be found that there is a unique solution to this problem, and the expression of the solution is given in this paper. The cubic G 1 Hermite interpolation curves obtained by the proposed method have less curvature variation energy in the case of shorter length. Some numerical examples verify this conclusion.
In this paper, we use the curvature variation energy as the metric to construct a fair cubic G 1 Hermite interpolate curve. In fact, the strain energy is also a metric to construct fair curves. Maybe we can replace the curvature variation energy minimization with the strain energy minimization in the proposed method; however, the curvature variation energy minimization may obtain more satisfactory results in shape and fairness than the strain energy minimization for constructing cubic G 1 Hermite interpolation curves (see [4]). In addition, it is necessary to impose a feasible region on the two parameters (i.e.{(α 0 , α 1 ) ∈ R 2 |α 0 > 0, α 1 > 0}) for constructing a cubic G 1 Hermite interpolation curve (see [4,[10][11][12]). Therefore, one should select appropriate G 1 Hermite data when using the proposed method.

Disclosure statement
No potential conflict of interest was reported by the authors.