Professional Documents
Culture Documents
Chong-Jun Li, Lin-Lin Xie, Wen-Bin Du, Hai-Dong Li, Huan Bao
PII: S0377-0427(17)30208-X
DOI: http://dx.doi.org/10.1016/j.cam.2017.04.037
Reference: CAM 11117
Please cite this article as: C.-J. Li, et al., Curve and surface fitting models based on the
diagonalizable differential systems, Journal of Computational and Applied Mathematics (2017),
http://dx.doi.org/10.1016/j.cam.2017.04.037
This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to
our customers we are providing this early version of the manuscript. The manuscript will undergo
copyediting, typesetting, and review of the resulting proof before it is published in its final form.
Please note that during the production process errors may be discovered which could affect the
content, and all legal disclaimers that apply to the journal pertain.
Curve and Surface Fitting models based on the
diagonalizable differential systems I
Chong-Jun Li∗, Lin-Lin Xie, Wen-Bin Du, Hai-Dong Li, Huan Bao
School of Mathematical Sciences, Dalian University of Technology, Dalian 116024,China
Abstract
1. Introduction
I This work was supported by the National Natural Science Foundation of China (Nos.
11290143 and 11471066), the Fundamental Research of Civil Aircraft (MJF-2012-04), and the
Fundamental Research Funds for the Central Universities (DUT15LK44).
∗ Corresponding author: Chong-Jun Li
Email: chongjun@dlut.edu.cn
where s0 is a fixed point in s parameter space and the curve S(s0 , t) is called
an initial curve.
In addition, the machining of free-form surfaces is usually done on 3- or
5-axis CNC machines. When machined surfaces require certain finish quality
or superior aerodynamic effect, it is sometimes desirable to be machined with
boundary-conformed or streamline-like toolpaths [5, 6, 7].
As mentioned above, the construction of streamlines has been involved in
both CAD and CAM. In fact, the streamline can be regraded as a solution
curve determined by a corresponding differential dynamic system with the ini-
tial point. Recently, Yang et al. [8] showed that free-form curves with properly
defined basis functions were the solutions of linear differential systems. Li et al.
[9] proposed a method for reconstruction of a linear ordinary differential sys-
tem with good accuracy from a set of non-degenerate discrete sample points of
the solution. The linear ordinary differential system considered in [9] only con-
2
tains a constant coefficient matrix, thus, the corresponding solution curves are
a special kind of streamlines in exponential matrix form. However, the general
curves can not be represented by a simple homogeneous linear differential sys-
tem with constant coefficients. In this paper, we improve the differential system
by using variable coefficients so that more streamlines can be reconstructed well.
The surface is also reconstructed as a set of streamlines, and each streamline
is represented as a solution curve of a linear differential system with variable
coefficients.
Our main works are as follows. In section 2, we introduce the method for
curve fitting based on homogeneous linear differential system with constant co-
efficients. In section 3, the diagonalizable differential system is adopted, such
that the solutions can be represented explicitly in exponential matrix form. An
algorithm is proposed for constructing the solution curve to fitting the given
discrete points. Several numerical examples show that the algorithm can obtain
good accuracy as the B-spline method, and satisfy the end interpolation condi-
tions. In section 4, we extend this algorithm to the case of surface to fitting the
given discrete points, which can also obtain satisfactory accuracy.
3
where the exponential of the matrix A is defined by the Taylors series
t2 2 tk
eAt = I + tA + A + · · · + Ak + · · · . (4)
2! k!
Parameterized the discrete points by Xi = X(ti ), i = 0, 1, · · · , n, then the re-
construction problem can be expressed as the fitting problem
n
X n
X
P0 model : min kX(ti ) − Xi k2 = min keAti X0 − Xi k2 . (5)
A∈R3×3 A∈R3×3
i=0 i=0
However, the above optimization problem cannot be solved directly, since the
unknown matrix A is involved in the Taylors series of the exponential function.
We need revise the original P0 problem by the following two approximate prob-
lems.
1) By the LDS (2), the P0 model can be transformed to the following problem
Xn
2
dX(ti )
min
− AXi
A∈R 3×3
dt
. (6)
i=0
n
X
P1−1 model : min
3×3
kXi − Xi−1 − ∆ti AXi k2 , (9)
A∈R
i=1
n−1
X
P1−2 model : min
3×3
kαXi+1 + βXi + γXi−1 − δAXi k2 , (10)
A∈R
i=1
4
2) In addition, the LDS (2) can be transformed into the following integral
equations, Z ti
AX(t)dt = Xi − Xi−1 , i = 1, 2, . . . , n. (11)
ti−1
0 −1 0 1
where A = 1 0 0 , X0 = −1 . We take 100 sampled points
0 0 1 1
by the Runge-Kutta method, then use the methods by P1−1 model (9), P1−2
model (10) and P2 model (13) to reconstruct the LDS respectively. In Fig. 1,
we show the reconstructed curves by the three models and the B-spline method in
comparison. The maximal errors of the exponential curves obtained by different
methods are shown in Table 1. Since the curve is determined by the system
with 9 entries of A, we choose the cubic B-spline curves with 4 control points
5
Sample points
P1_1 model
3
P1_2 model
P2 model
2.5 B−spline
1.5
1
0.5
1.5
0 1.4
1.3
−0.5 1.2
1.1
−1 1
Figure 1: Reconstructed curves by P1−1 , P1−2 , P2 models and the B-spline method respec-
tively in Example 1.
(12 entries) or 5 control points (15 entries) for comparison. From the Table 1,
we can see that P2 model can obtain good fitting accuracy as the cubic B-spline
method with more control points.
0 −1 0 1
where A = 1 0 0 , X0 = 0 . The exact solution curve is a
0 0 0 1
circle. We also take 100 sampled points by the Runge-Kutta method, then use the
6
Table 1: The maximal fitting errors of the curves by different methods in Example 1.
Method P1−1 model P1−2 model P2 model B-spline(4 CPs) B-spline(5 CPs)
Table 2: The maximal fitting errors of the curves by different methods in Example 2.
Method P1−1 model P1−2 model P2 model B-spline(4 CPs) B-spline(11 CPs)
methods by P1−1 model (9), P1−2 model (10) and P2 model (13) to reconstruct
the LDS respectively. In Fig. 2, we show the reconstructed curves by the three
models and the B-spline method. The maximal errors by different models are
shown in Table 2. We can see that P2 model can obtain good fitting accuracy as
the cubic B-spline method with 11 control points.
From the Examples 1 and 2, we can see that the P1−2 model and P2 model
1 The data is provided by LMIB and School of Energy and Power Engineering from Beihang
University supported by the National Natural Science Foundation of China (No.11290140).
Table 3: The maximal fitting errors of the curves by different methods in Example 3.
7
Sample points
P1_1 model
P1_2 model
P2 model
B−spline
1.5
1 0.5
1
0
1
1.5 −0.5
1
0.5
0 −1
−0.5
−1
−1.5
−1.5
Figure 2: Reconstructed curves by P1−1 , P1−2 , P2 models and the B-spline method respec-
tively in Example 2.
8
Sample points
P model
1_1
180
P1_2 model
170 P2 model
B−spline
160
150
140
130
120
45
40 186
184
35 182
30 180
178
25 176
Figure 3: Reconstructed curves by P1−1 , P1−2 , P2 models and the B-spline method respec-
tively in Example 3.
can obtain good results for the discrete data taken from the solution curve of a
LDS. However, for a general curve or discrete data such as in Example 3, it is
hard to reconstruct the curve only by a simple LDS with constant coefficients.
So we need consider the LDS with variable coefficients in next section.
In order to improve the versatility of the LDS, we consider the case with
variable coefficients, i.e.,
dX(t)
= A(t)X(t),
dt
(14)
X(0) = X ,
0
9
In addition, there is another difficulty in computation on matrix of functions.
That is, a matrix of functions and its derivative don’t satisfy the commutative
law of multiplication, i.e., A0 (t)A(t) isn’t equal to A(t)A0 (t) in general. Note
that the multiplication between the diagonal matrices can be commutative, we
consider the curve fitting model based on the diagonalizable linear differential
system with variable coefficients in this section.
In this case, the solution of the differential system (14) can be represented
as
Rt
X(t) = T −1 e 0
D(τ )dτ
T X0 , (15)
when the variable coefficient matrix can be diagonalized, i.e., A(t) = T −1 D(t)T ,
where T is an invertible constant matrix and D(t) is a diagonal matrix of func-
tions.
In fact, let Z
t
B(t) = T −1 D(τ )dτ T,
0
then B(t) satisfy
B 0 (t) = T −1 D(t)T = A(t),
and Z Z
t t
T −1 D(t) D(τ )dτ T = T −1 D(τ )dτ D(t)T,
0 0
i.e., A(t)B(t) = B(t)A(t), when A(t) can be diagonalized. Eq. (15) can be
represented as
X(t) = eB(t) X0 and X(0) = X0 . (16)
10
Furthermore, in some cases of curve fitting, it requires not only that the
error is less than a given precision, but also that the fitting curve can interpo-
late the first and last points. So for a given set of discrete points of a target
curve X(t), t ∈ [0, 1], Xi = (xi , yi , zi ) ∈ R3 , i = 0, 1, 2, · · · , n, our problem is
to reconstruct the curve which satisfy the following diagonalizable differential
system with two end conditions [10],
dX(t)
= T −1 D(t)T X(t),
dt
X(0) = X0 , (17)
X(1) = X ,
n
11
determined according to the data points as presented later, i.e., G(t) can be
represented as
p
X
G(t) = Pk Bk,3 (t), (21)
k=1
where Bk,3 (t), k = 1, 2, · · · , p, are the cubic B-spline basis. When G(t) is
determined, we can obtain D(t) by
12
nary unit;
(2) Compute the minimal argument θ1 and maximal argument θ2 : If θ2 − θ1 +
2η < π, go to step (3);
−1
cos(θ1 − η) cos(θ2 + η)
(3) Compute T : T = ;
sin(θ1 − η) sin(θ2 + η)
Output: the matrix T .
Case b) For Xi ∈ R3 , we also need ensure that each element of vector T X(ti ) is
nonzero and has the same sign with the corresponding element of vector T X0 , in
order that Yi = log((T X(ti ))/(T X0 )) are well defined. If Xi , i = 0, 1, 2, · · · , n,
lie in a triangular cone with the origin as the vertex, we can find a T satisfying
the condition as mentioned above. In fact, assume that the three edges of a
triangular cone are q1 , q2 and q3 , and the direction vectors of q1 , q2 and q3 are
a, b, c respectively. Then a, b and c are linearly independent and can be viewed
as a set of bases in R3 . Assume e1 = (1 0 0)T , e2 = (0 1 0)T and e3 = (0 0 1)T ,
U is a matrix satisfying [a b c] = [e1 e2 e3 ]U and U is invertible. Then if
we denote ζi by the coordinates of the points Xi in the system {O; a, b, c}, we
have ζi = U −1 Xi [11]. Clearly, all the points Xi , i = 0, 1, 2, · · · , n, fall in the
same octant in the system {O; a, b, c} and T = U −1 .
13
Output: the matrix T .
14
90
Sample points
Algorithm 3
80 B−spline
70
60
50
40
30
20
10
0
0 20 40 60 80 100 120 140
Figure 4: The fitting curves by the B-spline method and Algorithm 3 respectively in Example
4.
Example 4. In this example, we take 1001 sample points from a NURBS curve
of degree 2 with 9 control points. The knots are 0, 0, 0, 0.17, 0.33, 0.33, 0.67, 0.67,
0.83, 1, 1, 1; the control points are (0, 0), (−150, 50), (−50, 50), (0, 150), (150, 150),
(150, 0), (50, −50), (50, −150), (0, 0); the weights are 1, 2, 3, 1, 0.7071, 1, 3, 2, 1. We
reconstruct the approximate curves by the Algorithm 3 and the cubic B-spline
method with the dominant points selection. The results are
shown in Fig. 4 and
0.9894 −0.0204
the maximal errors are shown in Table 4. The matrix T =
0.0414 0.9887
is computed by Algorithm 1.
15
Table 4: The maximal fitting errors by different methods in Example 4.
16
50
Sample points
Algorithm 3
B−spline
−50
−100
−160 −140 −120 −100 −80 −60 −40 −20
Figure 5: The fitting curves by the B-spline method and Algorithm 3 respectively in Example
5.
Sample points
180
Algorithm 3
170 B−spline
160
150
140
130
120
45
40 186
184
35 182
30 180
178
25 176
Figure 6: The fitting curves by the B-spline method and Algorithm 3 respectively in Example
6.
17
In Examples 4, 5 and 6, the fitting curves are obtained by the standard cubic
B-spline method with selecting dominant points adaptively. In Tables 4, 5 and
6, the results by the Algorithm 3 based on diagonalizable LDS can obtain good
accuracy as the B-spline method.
In this section, we extend the Algorithm 3 for curve fitting to the case of
surface fitting. In order to represent a general surface, we have to revise Eq.(14)
by partial differential equations, that is
∂X(t,s) = A(t, s)X(t, s),
∂t
(23)
X(0, s) = X (s),
0
18
In order to reconstruct the partial differential system (24), T and D(t, s)
need to be computed. The way to compute T is the same as the curve fitting
model. In the following, we discuss the way to determine the D(t, s).
When T is determined, using the solution (25) of differential system (24),
we obtain
Rt
D(τ,s)dτ
T X(t, s) = e 0 T X0 (s). (26)
19
We present the following algorithm to reconstruct the surface based on the
given discrete points.
Example 7. The discrete points lie on a blade surface. There are 15 elemen-
tary profiles and 142 points on each profile2 . In Fig. 7, we show the 15
reconstructed curves, and the maximal errors are shown in Table 7. Fig. 8
shows the reconstruction of the blade surface with refined curves determined by
the partial differential system (24) obtained by Algorithm 4.
2 The data is provided by LMIB and School of Energy and Power Engineering from Beihang
University supported by the National Natural Science Foundation of China (No.11290140).
20
Sample points
Algorithm 4
B−spline
180
170
160
150
250
140
200
130
150
120
100
55 50 45 40 35 30 25 20 15 10
Figure 7: Reconstructions of the elementary profiles by the bicubic B-spline method and
Algorithm 4 respectively in Example 7.
21
Sample points
Algorithm 4
Refined curves
180
170
160
150
250
140
200
130
120 150
55 50 45 40 35 30 25 20 100
15 10
Figure 8: Reconstruction of the blade surface with refined curves by Algorithm 4 in Example
7.
22
5. Conclusion
In this paper, we discussed the curve and surface fitting methods based on
the homogeneous linear differential system. The main works are as follows:
(1) We introduce the methods for curve fitting based on the homogeneous
linear differential system with constant coefficients.
(2) We propose a curve fitting algorithm based on the diagonalizable linear
differential system with variable coefficients, which has explicit solution and
interpolate the end points. The new algorithm can obtain good fitting accuracy
as the B-spline method.
(3) We also propose the diagonalizable partial differential system with vari-
able coefficients and extend the curve fitting algorithm to the case of surface
fitting with satisfactory accuracy.
Acknowledgements
The authors are grateful to Prof. Zhi-Ming Zheng (supported by the Na-
tional Natural Science Foundation of China grants 11290140, 11290141), Prof.
Jia-Lin Hong and Prof. Xun-Nian Yang (supported by NSFC grant 11290142)
for the share of their first idea and early work in [8] on curve reconstruction by
differential dynamic system. Their valuable comments and suggestions on the
earlier works of the present paper are also appreciated.
References
23
[3] K.T. Miura, Unit quaternion integral curve: A new type of fair
free-form curves, Computer Aided Geometric Design, 17 (2000) 39-58.
doi:10.1016/S0167-8396(99)00038-2.
[6] D.C.H. Yang, J.J. Chuang, T.H. Oulee, Boundary-confromed toolpath gen-
eration for trimmed free-form surfaces, Computer-Aided Design, 35 (2003)
127-139. doi:10.1016/s0010-4485(02)00047-7.
[8] X.N. Yang, J.L. Hong, Dynamic evaluation of free-form curves and surfaces,
SIAM Journal on Scientific Computing 39(2017), in press.
[9] C.J. Li, L.L. Xie, H.D. Li, Reconstruction of the linear ordinary differential
system based on discrete points, Journal of Mathematical Research with
Applications, 37 (1) (2017) 73-89.
[11] G.H. Golub, C.F. Van Loan, Matrix computations, Johns Hopkins Univer-
sity Press, 1996, pp. 58-59. doi:10.1137/1028073
[12] H. Park, J.H. Lee, B-spline fitting based on adaptive curve refine-
ment using dominant points, Computer-Aided Design, 39 (2007) 439-451.
doi:10.1016/j.cad.2006.12.006.
24
[13] G.H. Liu, Y.S. Wong, T.F. Zhang et al., Adaptive fairing of digitized point
data with discrete curvature, Computer-Aided Design, 34 (4) (2002) 309-
320. doi:10.1016/S0010-4485(01)00091-4.
[14] H. Park, B-spline surface fitting based on adaptive knot placement using
dominant columns, Computer-Aided Design, 43 (3) (2011) 258-264. doi:
10.1016/j.cad.2010.12.001.
25