1,132
Views
4
CrossRef citations to date
0
Altmetric
Research Articles

Length and curvature variation energy minimizing planar cubic G1 Hermite interpolation curve

ORCID Icon & ORCID Icon
Pages 60-64 | Received 10 Jun 2019, Accepted 06 Dec 2019, Published online: 17 Dec 2019

Abstract

In this paper, we study how to construct a planar cubic G1 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.

1. Introduction

It is known that the planar two-point cubic G1 Hermite interpolation curve can be described as follows, (1) b(t)=p0B03(t)+(p0+13α0d0)B13(t)+(p113α1d1)B23(t)+p1B33(t),(1) where p0 and p1 are two points, d0 and d1 are two unit tangent directions, i.e. ||d0||=||d1||=1, α0 and α1 are positive numbers, Bk3(t)=(3!/k!(3k)!)tk(1t)3k(k=0,1,2,3) are cubic Bernstein basis polynomials. In general, the unit tangent directions d0 and d1 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 G1 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 [Citation1–3]), a natural idea is to find the optimal α0 and α1 for constructing the fair cubic G1 Hermite interpolation curves. The general ways to construct fair curves are achieved by minimizing some energy functional representing the fairness (see [Citation4]). 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 [Citation1, Citation5–8]). Recently, some works on determining suitable α0 and α1 of the planar cubic G1 Hermite interpolation curve via strain energy minimization or curvature variation energy minimization have been proposed (see [Citation4, Citation9–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 G1 Hermite curve with required length. Furthermore, one can even find suitable α0 and α1 to construct a fair cubic G1 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 G1 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.

2. The computing method

2.1. Length minimization

Firstly, we consider minimizing the length of the cubic G1 Hermite interpolation curve for constructing a curve with minimal length. As we know, the length of the curve b(t) can be expressed by (2) s1(b)=01||b(t)||dt.(2)

Because it is too complicated for most practical applications, Equation (2) is often simplified to the following approximate form (see [Citation13]), (3) sˆ1(b)=01||b(t)||2dt.(3)

By a deduction from Equation (1), we can obtain that (4) b(t)=α0(B02(t)B12(t))d0α1(B12(t)B22(t))d1+3B12(t)Δp0,(4) where Δp0:=p1p0, and Bk2(t)=(2!/k!(2k)!)tk(1t)2k(k=0,1,2) are quadratic Bernstein basis polynomials.

By computing from Equation (4), Equation (3) becomes (5) sˆ1(α0,α1)=01||α0(B02(t)B12(t))d0α1(B12(t)B22(t))d1+3B12(t)Δp0||2dt=115(2α02+2α12α0α1(d0d1)3α0(Δp0d0)3α1(Δp0d1)+18||Δp0||2),(5) where ab:=axbx+ayby denotes the dot product of planar vector.

Let (6) h1(α0,α1):=2α02+2α12α0α1(d0d1)3α0(Δp0d0)3α1(Δp0d1)+18||Δp0||2,(6) then Equations (5) and (6) have the same minimum.

The gradients of Equation (6) can be calculated as follows, (7) h1α0=4α0(d0d1)α13(Δp0d0),h1α1=4α1(d0d1)α03(Δp0d1).(7)

We can see from Equation (7) that the Hessian matrix of h1(α0,α1) is (8) H1=4(d0d1)(d0d1)4=4cosθcosθ4,(8) where θ represents the angle between vectors d0 and d1. It can be easily checked from Equation (8) that the matrix H1 is symmetric positive definite. That means the quadratic functional h1(α0,α1) is strictly convex, and it has a unique global minimum. The following unique global minimum can be solved by (h1/α0)=0 and (h1/α1)=0,

(9) α0(1)=116(d0d1)2(12(Δp0d0)+3(Δp0d1)(d0d1)),α1(1)=116(d0d1)2(12(Δp0d1)+3(Δp0d0)(d0d1)).(9)

Then, we can choose the parameters as Equation (9) for constructing the cubic G1 Hermite interpolation curve with minimal length.

2.2. Curvature variation energy minimization

Secondly, we consider minimizing the curvature variation energy of the cubic G1 Hermite interpolation curve for constructing a fair curve. The curvature variation energy of the curve b(t) is defined by (see [Citation5]) (10) s2(b)=01[κ(t)]2dt,(10) where κ(t)=(||b(t)×b(t)||/||b(t)||3) represents the curvature of the curve.

In order to simplify the calculation, Equation (10) can be approximated by (see [Citation12]) (11) sˆ2(b)=01||b(t)||2dt.(11)

By a deduction from Equation (1), we can obtain that (12) b(t)=6(α0d0+α1d12Δp0).(12)

By computing from Equation (12), Equation (11) becomes (13) sˆ2(α0,α1)=01||6(α0d0+α1d12Δp0)||2dt=36(α02+α12+2α0α1(d0d1)4α0(Δp0d0)4α1(Δp0d1)+4||Δp0||2).(13)

Let (14) h2(α0,α1):=α02+α12+2α0α1(d0d1)4α0(Δp0d0)4α1(Δp0d1)+4||Δp0||2,(14) then Equations (13) and (14) have the same minimum.

The gradients of (14) can be calculated as follows, (15) h2α0=2α0+2(d0d1)α14(Δp0d0),h2α1=2α1+2(d0d1)α04(Δp0d1).(15)

We can see from Equation (15) that the Hessian matrix of h2(α0,α1) is (16) H2=21(d0d1)(d0d1)1=21cosθcosθ1.(16)

It can be easily checked from Equation (16) that the matrix H2 is symmetric positive definite when d0 is not parallel to d1. In this case the quadratic functional h2(α0,α1) is strictly convex, and it has a unique global minimum. The following unique global minimum can be solved by (h2/α0)=0 and (h2/α1)=0,

(17) α0(2)=21(d0d1)2((Δp0d0)(Δp0d1)(d0d1)),α1(2)=21(d0d1)2((Δp0d1)(Δp0d0)(d0d1)).(17)

Then, we can choose the parameters as Equation (17) for constructing the cubic G1 Hermite interpolation curve with minimal curvature variation energy.

2.3. 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, (18) min(h1(α0,α1),h2(α0,α1))T,(18) where h1(α0,α1) and h2(α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 (19) minh(α0,α1,λ)=λh1(α0,α1)+(1λ)h2(α0,α1),(19) 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, (20) hα0=λh1α0+(1λ)h2α0=2(1+λ)α0+(23λ)(d0d1)α1+(λ4)(Δp0d0),hα1=λh1α1+(1λ)h2α1=2(1+λ)α1+(23λ)(d0d1)α0+(λ4)(Δp0d1).(20)

In this case, we can see from Equation (20) that the Hessian matrix of h(α0,α1) is H=2(1+λ)(23λ)(d0d1)(23λ)(d0d1)2(1+λ).

Lemma 2.1:

Let d0 be not parallel to d1, the matrix H is symmetric positive definite when 0<λ<1.

Proof: When 0<λ<1, we have 2(1+λ)>0. The determinant of H can be calculated by (21) det(H)=4(1+λ)2(23λ)2cos2θ.(21) When 0<λ<1, it can be easily checked that 4<4(1+λ)2<16 and 1<(23λ)2<4. From (21), we have det(H)>44cos2θ. Since d0 is not parallel to d1, we obtain that det(H)>0. Thus, the matrix H is symmetric positive definite.

Theorem 2.1:

When 0<λ<1 and d0 is not parallel to d1, Equation (19) has a unique global solution given by (22) α0=2(1+λ)(4λ)(Δp0d0)(23λ)(4λ)(Δp0d1)(d0d1)4(1+λ)2(23λ)2(d0d1)2,α1=2(1+λ)(4λ)(Δp0d1)(23λ)(4λ)(Δp0d0)(d0d1)4(1+λ)2(23λ)2(d0d1)2.(22)

Proof: According to Lemma 1, Equation (19) has a unique global solution that can be solved by (h/α0)=0 and (h/α1)=0. By computing from Equation (20), we can obtain the unique global solution expressed in Equation (22).

Then, we can choose the parameters as Equation (22) for constructing the cubic G1 Hermite interpolation curve with minimal length and curvature variation energy.

Now, the only task left is to determine the value of the weight λ in Equation (22). There are several approaches to determine the value of the weight (see [Citation14]). 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 δi(j)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 m1=δ1(2) and m2=δ2(1). In Line 3, we compute the initial weights of the two target functions. It is obvious that the initial weights satisfy λ1,λ20 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.

3. 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.

Example 3.1:

Let us take the following data, p0=(1,0),p1=(1,0),d0=(cosπ/4,sinπ/4),d1=(cosπ/3,sinπ/3).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 .

Table 1. Parameters, length and curvature variation energy of the three methods (Example 1).

Figure  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).

Figure 1. The graphs of the curves (Example 1).

Figure 1. The graphs of the curves (Example 1).

Example 3.2:

Let us take the following data, p0=(1,0),p1=(1,0),d0=(cosπ/4,sinπ/5),d0=(cosπ/4,sinπ/5).We put the results of the parameters, length and the curvature variation energy of the three methods in Table .

In Figure  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, pi=(sinθi,cosθi),di=(cosθi,sinθi),where θi=π/4,π/2,2π/3. In this case, the G1 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 .

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 .

Figure 2. The graphs of the curves (Example 2).

Figure 2. The graphs of the curves (Example 2).

Figure 3. The graphs of the curves (Example 3).

Figure 3. The graphs of the curves (Example 3).

Table 2. Parameters, length and curvature variation energy of the three methods (Example 2).

Table 3. Parameters, length and curvature variation energy of each segment of the three methods.

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.

4. Conclusion and discussion

This paper focuses on how to construct a fair cubic G1 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 G1 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 G1 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 G1 Hermite interpolation curves (see [Citation4]). In addition, it is necessary to impose a feasible region on the two parameters (i.e.{(α0,α1)R2|α0>0,α1>0}) for constructing a cubic G1 Hermite interpolation curve (see [Citation4, Citation10–12]). Therefore, one should select appropriate G1 Hermite data when using the proposed method.

Disclosure statement

No potential conflict of interest was reported by the authors.

Additional information

Funding

This work is supported by the Scientific Research Fund of Hunan Provincial Education Department under the [grant number 18A415], and the Open Research Fund Program of Data Recovery Key Laboratory of Sichuan Province under the [grant number DRN19019].

References

  • Farin G. Curves and surfaces for CAGD: a practical guide. San Diego: Academic Press; 2002.
  • Hofer M, Pottmann H. Energy-minimizing splines in manifolds. ACM T Graphic. 2004;23:284–293. doi: 10.1145/1015706.1015716
  • Fan W, Lee C, Chen J. A realtime curvature-smooth interpolation scheme and motion planning for CNC machining of short line segments. Int J Mach Tool Manu. 2015;96:27–46. doi: 10.1016/j.ijmachtools.2015.04.009
  • Lu L, Jiang C, Hu Q. Planar cubic G1 and quintic G2 Hermite interpolations via curvature variation minimization. Comput Graph. 2018;70:92–98. doi: 10.1016/j.cag.2017.07.007
  • Farin G. Geometric Hermite interpolation with circular precision. Comput Aided Geom D. 2008;40:476–479. doi: 10.1016/j.cad.2008.01.003
  • Renka R. Shape-preserving interpolation by fair discrete G3 space curves. Comput Aided Geom D. 2005;22:793–809. doi: 10.1016/j.cagd.2005.03.003
  • Xu G, Wang G, Chen W. Geometric construction of energy-minimizing Bézier curves. Sci China Inform Sci. 2011;54:1395–1406. doi: 10.1007/s11432-011-4294-8
  • Ahn Y, Hoffmann C, Rosen P. Geometric constraints on quadratic Bézier curves using minimal length and energy. J Comput Appl Math. 2014;255:887–897. doi: 10.1016/j.cam.2013.07.005
  • Yong J, Cheng F. Geometric Hermite curves with minimum strain energy. Comput Aided Geom D. 2004;21:281–301. doi: 10.1016/j.cagd.2003.08.003
  • Jaklič G, Žagar E. Planar cubic G1 interpolatory splines with small strain energy. J Comput Appl Math. 2011;235:2758–2765. doi: 10.1016/j.cam.2010.11.025
  • Jaklič G, Žagar E. Curvature variation minimizing cubic Hermite interpolants. Appl Math Comput. 2011;218:3918–3924.
  • Lu L. A note on curvature variation minimizing cubic Hermite interpolants. Appl Math Comput. 2015;259:596–599.
  • Veltkamp R, Wesselink W. Modeling 3D curves of minimal energy. In: Eurographics 95, Maastricht, Netherlands, 1995;97–110.
  • Lin C, Dong J. The methods and theories of multi-objective optimizations. Changchun: Jilin Education Press; 1992.