# Inverse-Problem-Based Accuracy Control for Arbitrary-Resolution Fairing of Quasiuniform Cubic B-Spline Curves

Authors: Xiaogang Ji; Jie Xue; Yan Yang; Xueming He
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

In the process of curves and surfaces fairing with multiresolution analysis, fairing accuracy will be determined by final fairing scale. On the basis of Dyadic wavelet fairing algorithm (DWFA), arbitrary resolution wavelet fairing algorithm (ARWFA), and corresponding software, accuracy control of multiresolution fairing was studied for the uncertainty of fairing scale. Firstly, using the idea of inverse problem for reference, linear hypothesis was adopted to predict the corresponding wavelet scale for any given fairing error. Although linear hypothesis has error, it can be eliminated by multiple iterations. So faired curves can be determined by a minimum number of control vertexes and have the best faring effect under the requirement of accuracy. Secondly, in consideration of efficiency loss caused by iterative algorithm, inverse calculation of fairing scale was presented based on the least squares fitting. With the increase of order of curves, inverse calculation accuracy becomes higher and higher. Verification results show that inverse calculation scale can meet the accuracy requirement when fitting curve is sextic. In the whole fairing process, because there is no approximation algorithm such as interpolation and approximation, faired curves can be reconstructed again exactly. This algorithm meets the idea and essence of wavelet analysis well.


---

## Body

## 1. Introduction

Because of manufacturing error of existing prototypes and limitation of measuring technology, various noise and error are inevitable in the process of digitization of prototypes and will have a bad effect on fairness of curves and surfaces. Fairing operation for curves and surfaces is a direct and effective way to improve the reconstructing quality of curves and surfaces. Fairing operation has been a key technology in the field of reverse engineering, especially to the parts with functional surfaces, such as compressor rotors, supercharger impellers, and turbine engine blades, which should meet the aerodynamics requirements, and the parts with ornamental surfaces, such as motor vehicles and household appliances, which should meet the artistic characteristics requirement. The technology of multiresolution fairing provides a brand-new way to solve this problem.Wavelet analysis, also called multiresolution analysis, is a new mathematical method of time-frequency analysis to reveal the internal correlation structure of data and has the locality in time domain and frequency domain simultaneously. With the development of wavelet analysis technology, the concept of the B-spline wavelet was proposed to solve the engineering practical problems. Xiang et al. presented a two-dimensional wavelet-based numerical simulation method with Hermite cubic spline wavelet on the interval (HCSWI) to solve the stress intensity factors (SIFs) of plate structures [1]. By using Hermite cubic spline wavelets on the interval, Xiang et al. proposed a multiscale wavelet-based numerical method to compute shafts’ dynamic characteristic accurately [2]. He also constructed a class of flat shell elements by using the scaling functions of two-dimensional tensor product B-spline wavelet on the interval (BSWI) [3] and a class of B-spline-wavelet-based plate elements by interacting and synchronizing wavelet theory in mathematics and variational principle in finite element method [4]. With the further mature of wavelet technology, it has been also adopted in the computer graphics gradually. In 1994, Quak and Weyrich firstly put forward a decomposition and reconstruction algorithm for B-spline wavelets on closed interval for the specific curves with 2
j
+
3 control vertexes [5]. In the same year, taking endpoint interpolation cubic B-spline curve as an example, Finkelstein and Salesin proposed a concept of multiresolution curves at the Siggraph’94 international conference and elaborated the applications of wavelet analysis in multiresolution fairing, editing, and compression [6]. Elber and Gotsman achieved multiresolution analysis and editing for nonuniform B-spline curves and periodic curves with the least squares approximation [7]. Stollnitz et al. also studied the application of wavelet technology in curves and surfaces [8].Although the studies mentioned above realized the wavelet fairing of curves and surfaces, in order to decompose the curves and surfaces continuously at different scales, different B-spline basis functions, which were used to construct wavelets, were scaled doubly; that is, scale translation system of scaling function is binary. For this reason, the above algorithm has a fatal flaw that the number of control vertexes of curves and surfaces must be2
j
+
(
r
-
1
) (r is order). Unfortunately, for the general curves and surfaces, the number of control vertexes is usually arbitrary and the corresponding wavelet fairing algorithm based on dyadic wavelet will not work anymore. So, this flaw limits the application and diffusion of wavelet technology greatly in the field of curve and surface fairing. This is an inherent problem. Although the mathematical derivation of dyadic wavelet construction is easier, it has a strict requirement on the number of control vertexes. Generally this kind of fairing algorithm is called Dyadic Wavelet Fairing Algorithm (DWFA).In order to achieve the multiresolution fairing on curves and surfaces with arbitrary control vertexes, wavelet analysis technology based on arbitrary scale factors, which is another study field of wavelet analysis, must be adopted. Lazar and Bruton presented a method, based on the design of M-band perfect reconstruction (PR) filters, to generate orthonormal wavelets with arbitrary integer scaling factorM [9]. Kovacevic and Vetterli presented a general, direct method for designing perfect reconstruction filter banks with rational sampling rate changes. Such filter banks have N branches, each one having a sampling factor of p
i
/
q
i and their sum equal to one [10]. On this basis, Blu presented a new design algorithm for two-band orthonormal rational filter banks and orthonormal rational wavelets [11]. Muñoz proposed a new B-spline-based method that allows the continuous wavelet transform (CWT) computation at any scale, without being restricted to dyadic or integer scales [12]. In fact, arbitrary resolution wavelet decomposition and reconstruction for common curves and surfaces are a typical multiresolution analysis at arbitrary rational scaling factor, and many scholars try to apply above research results to this field. Kazinnik and Elber took advantage of ideas of an orthogonal wavelet complement to produce a multiresolution orthogonal decomposition of nonuniform B-spline (NUB) spaces. The editing of NUB curves and surfaces can be handled at different levels of resolutions [13]. Generally, this kind of fairing algorithm without special requirements on the number of control vertexes is called arbitrary resolution wavelet fairing algorithm (ARWFA).For these problems mentioned above, the author has deduced and achieved the concrete algorithms of DWFA and ARWFA according to the definition of wavelet mathematically in literature 14 and 15.The studies show that, in the process of fairing, the curves and surfaces become more and more fair while the corresponding error becomes bigger and bigger with the decrease of control vertexes. So how to choose an appropriate wavelet scale to achieve the best fairing quality under the control of fairing accuracy has always been a nodus in the field of multiresolution fairing. Actually, this is an accuracy control problem of multiresolution fairing and its essence is to achieve an appropriate fairing scale.Although there is a certain inherent connection between the number of control vertexes and fairing error, there is no definite numerical correlation between them. In fact, how to solve the number of control vertexes according to the given fairing error is a typical inverse problem. Inverse problem provides a new method for the prediction of fairing scale.Sambridge and Mosegaard introduced the development and application of Monte Carlo methods for inverse problems in the earth sciences and particular geophysics [14]. Based on inverse problem, Zhou et al. proposed a boundary element method to solve the boundary condition in lasticity using PCGM and CGM regularization. The numerical results confirm that this method produced convergent and stable numerical solutions [15]. Bustillo et al. presented a method for ultrasonic characterization of porous silicon in which a genetic algorithm-based optimization is used to solve the inverse problem [16]. Capasso et al. solved inverse problems of differential equations by a ‘‘generalized collage’’ method and application to a mean field stochastic model [17].This paper will study the accuracy control for arbitrary resolution fairing of quasiuniform cubic B-spline curves on the basis of inverse problem.


## 2. Basis of Multiresolution Fairing

### 2.1. Principle of Multiresolution Fairing

Quasiuniform cubic B-spline curves were studied in this paper, so the order of curves isr
=
4. According to Cox-de Boor recursion formula, cubic B-spline can be expressed as φ
(
t
)
=
N
4
(
t
). For scale factor m, the corresponding knot vector can be represented as [
0
,
0
,
0
,
0
,
1
/
m
,
2
/
m
,
…
,
1
-
1
/
m
,
1
,
1
,
1
,
1
]. A group of B-spline basis functions determined by knot vector can be composed of their scaling translation system; that is, φ
(
m
t
-
k
)
=
N
4
(
m
t
-
k
), where k is translation. Let φ
m
k
=
φ
(
m
t
-
k
), and then a linear space V
m can be spanned by Φ
m
=
(
φ
m
0
,
φ
m
1
,
…
,
φ
m
m
+
2
), expressed as V
m
=
span
⁡
{
φ
m
k
}. Studies show that there are m
+
3 B-splines in space V
m and a unique curve can be determined by m
+
3 control vertexes C
m
=
(
c
m
0
,
c
m
1
,
…
,
c
m
m
+
2
)
T. Assuming scale factor m
=
10, then there are m
+
3
=
13 B-splines φ
10
0
,
φ
10
1
,
…
,
φ
10
12, as shown in Figure 2(a).Similarly, for the objective scale factorn (n
<
m), there is also a group of B-spline basis functions φ
n
l
=
φ
(
n
t
-
l
), where l is translation. Then a linear space V
n can be also spanned by Φ
n
=
(
φ
n
0
,
φ
n
1
,
…
,
φ
n
n
+
2
), expressed as V
n
=
span
⁡
{
φ
n
k
}. Studies show that there are n
+
3 B-splines in space V
n and a unique curve can be determined by n
+
3 control vertexes C
n
=
(
c
n
0
,
c
n
1
,
…
,
c
n
n
+
2
)
T. Assuming objective scale factor n
=
5, then there are n
+
3
=
8 B-splines φ
5
0
,
φ
5
1
,
…
,
φ
5
7, as shown in Figure 2(b).Assume thatf
m is a curve in space V
m and f
n is a curve in space V
n. As a constructing tool for low pass filter banks, the essence of curve fairing based on multiresolution analysis is to filter out details g
n from f
m by the constructed filter banks to get a more fairing curve f
n; that is,
(1)
f
m
=
f
n
+
g
n
.
Its tower structure of decomposition and reconstruction is shown in Figure 1.Figure 1
Tower structure of multiresolution wavelet fairing.B-splines and constructed wavelets in different scales.
(a)
(b)
(c)Detail curveg
n can be determined by m
-
n detail vertexes D
n
=
(
d
n
0
,
d
n
1
,
…
,
d
n
m
-
n
-
1
)
T, and the corresponding basis functions are the very wavelets. These basis functions can be expressed as Ψ
n
=
(
ψ
n
0
,
ψ
n
1
,
…
,
ψ
n
m
-
n
-
1
) and can also be spanned a liner space W
n. Based on the above assumptions, m
=
10, n
=
5, and then there are m
-
n
=
5 wavelets ψ
5
0
,
ψ
5
1
,
…
,
ψ
5
4, as shown in Figure 2(c).Usually,W
n is called the wavelet subspace of V
m about V
n. In order to make wavelet decay to zero as soon as possible, V
n
⊥
W
n is required when wavelet is constructed; that is,
(2)
V
m
=
V
n
⊕
W
n
.
In formula (2), ⊕ means direct sum. Because B-spline basis functions themselves have no translation orthogonality, only the orthogonality between Φ
n and Ψ
n at the same scale factor can be ensured when wavelets are constructed; that is,
(3)
〈
φ
n
i
,
ψ
n
j
〉
=
0
,
i
∈
[
0
,
n
+
2
]
,
j
∈
[
0
,
m
-
n
-
1
]
.


### 2.2. Algorithm for Multiresolution Fairing

According to formula (2) and description in Section 2.1, the progress of multiresolution fairing for B-spline curves can be expressed as
(4)
∑
k
=
0
m
+
2
c
k
m
φ
k
m
=
∑
l
=
0
n
+
2
c
l
n
φ
l
n
+
∑
l
=
0
m
-
n
-
1
d
l
n
ψ
l
n
.
According to literature 9, calculate inner product of formula (4) with φ
n
i, i
∈
[
0
,
n
+
2
], respectively, and then
(5)
C
n
=
[
〈
Φ
n
∣
Φ
n
〉
]
-
1
[
〈
Φ
n
∣
Φ
m
〉
]
C
m
.
Take
(6)
A
m
n
=
[
〈
Φ
n
∣
Φ
n
〉
]
-
1
[
〈
Φ
n
∣
Φ
m
〉
]
.
Then the curve decomposition formula can be expressed as
(7)
C
n
=
A
m
n
C
m
,
where A
m
n is a (
n
+
3
)
×
(
m
+
3
) low frequency decomposition matrix, [
〈
Φ
n
∣
Φ
m
〉
] is a (
n
+
3
)
×
(
m
+
3
) matrix formed by inner product 〈
φ
n
i
,
φ
m
j
〉, and [
〈
Φ
n
∣
Φ
n
〉
] is a (
n
+
3
)
×
(
n
+
3
) matrix formed by inner product 〈
φ
n
i
,
φ
n
j
〉.Similarly, calculate inner product of formula (4) with ψ
n
i, i
∈
[
0
,
m
-
n
-
1
], respectively, and then
(8)
D
n
=
[
〈
Ψ
n
∣
Ψ
n
〉
]
-
1
[
〈
Ψ
n
∣
Φ
m
〉
]
C
m
.
Take
(9)
B
m
n
=
[
〈
Ψ
n
∣
Ψ
n
〉
]
-
1
[
〈
Ψ
n
∣
Φ
m
〉
]
.
Then the detail decomposition formula can be expressed as
(10)
D
n
=
B
m
n
C
m
,
where B
m
n is a (
m
-
n
)
×
(
m
+
3
) detail decomposition matrix, [
〈
Ψ
n
∣
Ψ
n
〉
] is a (
m
-
n
)
×
(
m
-
n
) matrix formed by inner product 〈
ψ
n
i
,
ψ
n
j
〉, and [〈
Ψ
n
∣
Φ
m
〉] is a (
m
-
n
)
×
(
m
+
3
) matrix formed by inner product 〈
ψ
n
i
,
φ
m
j
〉.Switch around formula (4) and calculate inner product with φ
n
i, i
∈
[
0
,
n
+
2
] and ψ
n
j, j
∈
[
0
,
m
-
n
-
1
], respectively, and then
(11)
[
〈
Φ
n
∣
Φ
n
〉
]
C
n
=
[
〈
Φ
n
∣
Φ
m
〉
]
C
m
,
[
〈
Ψ
n
∣
Ψ
n
〉
]
D
n
=
[
〈
Ψ
n
∣
Φ
m
〉
]
C
m
.
Merge these two formulas into a (
m
+
3
)
×
(
m
+
3
) square matrix, and then
(12)
[
[
〈
Φ
n
∣
Φ
n
〉
]
-
1
[
〈
Φ
n
∣
Φ
m
〉
]
[
〈
Ψ
n
∣
Ψ
n
〉
]
-
1
[
〈
Ψ
n
∣
Φ
m
〉
]
]
C
m
=
[
C
n
D
n
]
,
∴
C
m
=
[
[
〈
Φ
n
∣
Φ
n
〉
]
-
1
[
〈
Φ
n
∣
Φ
m
〉
]
[
〈
Ψ
n
∣
Ψ
n
〉
]
-
1
[
〈
Ψ
n
∣
Φ
m
〉
]
]
-
1
[
C
n
D
n
]
.
Take
(13)
[
P
m
n
∣
Q
m
n
]
=
[
[
〈
Φ
n
∣
Φ
n
〉
]
-
1
[
〈
Φ
n
∣
Φ
m
〉
]
[
〈
Ψ
n
∣
Ψ
n
〉
]
-
1
[
〈
Ψ
n
∣
Φ
m
〉
]
]
-
1
.
Then
(14)
C
m
=
[
P
m
n
∣
Q
m
n
]
[
C
n
D
n
]
.
Formula (14) is exactly the reconstruction equation of multiresolution fairing, where [
P
m
n
∣
Q
m
n
] is reconstitution matrix, P
m
n is a (
m
+
3
)
×
(
n
+
3
) matrix, and Q
m
n is a (
m
+
3
)
×
(
m
-
n
) matrix.


## 2.1. Principle of Multiresolution Fairing

Quasiuniform cubic B-spline curves were studied in this paper, so the order of curves isr
=
4. According to Cox-de Boor recursion formula, cubic B-spline can be expressed as φ
(
t
)
=
N
4
(
t
). For scale factor m, the corresponding knot vector can be represented as [
0
,
0
,
0
,
0
,
1
/
m
,
2
/
m
,
…
,
1
-
1
/
m
,
1
,
1
,
1
,
1
]. A group of B-spline basis functions determined by knot vector can be composed of their scaling translation system; that is, φ
(
m
t
-
k
)
=
N
4
(
m
t
-
k
), where k is translation. Let φ
m
k
=
φ
(
m
t
-
k
), and then a linear space V
m can be spanned by Φ
m
=
(
φ
m
0
,
φ
m
1
,
…
,
φ
m
m
+
2
), expressed as V
m
=
span
⁡
{
φ
m
k
}. Studies show that there are m
+
3 B-splines in space V
m and a unique curve can be determined by m
+
3 control vertexes C
m
=
(
c
m
0
,
c
m
1
,
…
,
c
m
m
+
2
)
T. Assuming scale factor m
=
10, then there are m
+
3
=
13 B-splines φ
10
0
,
φ
10
1
,
…
,
φ
10
12, as shown in Figure 2(a).Similarly, for the objective scale factorn (n
<
m), there is also a group of B-spline basis functions φ
n
l
=
φ
(
n
t
-
l
), where l is translation. Then a linear space V
n can be also spanned by Φ
n
=
(
φ
n
0
,
φ
n
1
,
…
,
φ
n
n
+
2
), expressed as V
n
=
span
⁡
{
φ
n
k
}. Studies show that there are n
+
3 B-splines in space V
n and a unique curve can be determined by n
+
3 control vertexes C
n
=
(
c
n
0
,
c
n
1
,
…
,
c
n
n
+
2
)
T. Assuming objective scale factor n
=
5, then there are n
+
3
=
8 B-splines φ
5
0
,
φ
5
1
,
…
,
φ
5
7, as shown in Figure 2(b).Assume thatf
m is a curve in space V
m and f
n is a curve in space V
n. As a constructing tool for low pass filter banks, the essence of curve fairing based on multiresolution analysis is to filter out details g
n from f
m by the constructed filter banks to get a more fairing curve f
n; that is,
(1)
f
m
=
f
n
+
g
n
.
Its tower structure of decomposition and reconstruction is shown in Figure 1.Figure 1
Tower structure of multiresolution wavelet fairing.B-splines and constructed wavelets in different scales.
(a)
(b)
(c)Detail curveg
n can be determined by m
-
n detail vertexes D
n
=
(
d
n
0
,
d
n
1
,
…
,
d
n
m
-
n
-
1
)
T, and the corresponding basis functions are the very wavelets. These basis functions can be expressed as Ψ
n
=
(
ψ
n
0
,
ψ
n
1
,
…
,
ψ
n
m
-
n
-
1
) and can also be spanned a liner space W
n. Based on the above assumptions, m
=
10, n
=
5, and then there are m
-
n
=
5 wavelets ψ
5
0
,
ψ
5
1
,
…
,
ψ
5
4, as shown in Figure 2(c).Usually,W
n is called the wavelet subspace of V
m about V
n. In order to make wavelet decay to zero as soon as possible, V
n
⊥
W
n is required when wavelet is constructed; that is,
(2)
V
m
=
V
n
⊕
W
n
.
In formula (2), ⊕ means direct sum. Because B-spline basis functions themselves have no translation orthogonality, only the orthogonality between Φ
n and Ψ
n at the same scale factor can be ensured when wavelets are constructed; that is,
(3)
〈
φ
n
i
,
ψ
n
j
〉
=
0
,
i
∈
[
0
,
n
+
2
]
,
j
∈
[
0
,
m
-
n
-
1
]
.


## 2.2. Algorithm for Multiresolution Fairing

According to formula (2) and description in Section 2.1, the progress of multiresolution fairing for B-spline curves can be expressed as
(4)
∑
k
=
0
m
+
2
c
k
m
φ
k
m
=
∑
l
=
0
n
+
2
c
l
n
φ
l
n
+
∑
l
=
0
m
-
n
-
1
d
l
n
ψ
l
n
.
According to literature 9, calculate inner product of formula (4) with φ
n
i, i
∈
[
0
,
n
+
2
], respectively, and then
(5)
C
n
=
[
〈
Φ
n
∣
Φ
n
〉
]
-
1
[
〈
Φ
n
∣
Φ
m
〉
]
C
m
.
Take
(6)
A
m
n
=
[
〈
Φ
n
∣
Φ
n
〉
]
-
1
[
〈
Φ
n
∣
Φ
m
〉
]
.
Then the curve decomposition formula can be expressed as
(7)
C
n
=
A
m
n
C
m
,
where A
m
n is a (
n
+
3
)
×
(
m
+
3
) low frequency decomposition matrix, [
〈
Φ
n
∣
Φ
m
〉
] is a (
n
+
3
)
×
(
m
+
3
) matrix formed by inner product 〈
φ
n
i
,
φ
m
j
〉, and [
〈
Φ
n
∣
Φ
n
〉
] is a (
n
+
3
)
×
(
n
+
3
) matrix formed by inner product 〈
φ
n
i
,
φ
n
j
〉.Similarly, calculate inner product of formula (4) with ψ
n
i, i
∈
[
0
,
m
-
n
-
1
], respectively, and then
(8)
D
n
=
[
〈
Ψ
n
∣
Ψ
n
〉
]
-
1
[
〈
Ψ
n
∣
Φ
m
〉
]
C
m
.
Take
(9)
B
m
n
=
[
〈
Ψ
n
∣
Ψ
n
〉
]
-
1
[
〈
Ψ
n
∣
Φ
m
〉
]
.
Then the detail decomposition formula can be expressed as
(10)
D
n
=
B
m
n
C
m
,
where B
m
n is a (
m
-
n
)
×
(
m
+
3
) detail decomposition matrix, [
〈
Ψ
n
∣
Ψ
n
〉
] is a (
m
-
n
)
×
(
m
-
n
) matrix formed by inner product 〈
ψ
n
i
,
ψ
n
j
〉, and [〈
Ψ
n
∣
Φ
m
〉] is a (
m
-
n
)
×
(
m
+
3
) matrix formed by inner product 〈
ψ
n
i
,
φ
m
j
〉.Switch around formula (4) and calculate inner product with φ
n
i, i
∈
[
0
,
n
+
2
] and ψ
n
j, j
∈
[
0
,
m
-
n
-
1
], respectively, and then
(11)
[
〈
Φ
n
∣
Φ
n
〉
]
C
n
=
[
〈
Φ
n
∣
Φ
m
〉
]
C
m
,
[
〈
Ψ
n
∣
Ψ
n
〉
]
D
n
=
[
〈
Ψ
n
∣
Φ
m
〉
]
C
m
.
Merge these two formulas into a (
m
+
3
)
×
(
m
+
3
) square matrix, and then
(12)
[
[
〈
Φ
n
∣
Φ
n
〉
]
-
1
[
〈
Φ
n
∣
Φ
m
〉
]
[
〈
Ψ
n
∣
Ψ
n
〉
]
-
1
[
〈
Ψ
n
∣
Φ
m
〉
]
]
C
m
=
[
C
n
D
n
]
,
∴
C
m
=
[
[
〈
Φ
n
∣
Φ
n
〉
]
-
1
[
〈
Φ
n
∣
Φ
m
〉
]
[
〈
Ψ
n
∣
Ψ
n
〉
]
-
1
[
〈
Ψ
n
∣
Φ
m
〉
]
]
-
1
[
C
n
D
n
]
.
Take
(13)
[
P
m
n
∣
Q
m
n
]
=
[
[
〈
Φ
n
∣
Φ
n
〉
]
-
1
[
〈
Φ
n
∣
Φ
m
〉
]
[
〈
Ψ
n
∣
Ψ
n
〉
]
-
1
[
〈
Ψ
n
∣
Φ
m
〉
]
]
-
1
.
Then
(14)
C
m
=
[
P
m
n
∣
Q
m
n
]
[
C
n
D
n
]
.
Formula (14) is exactly the reconstruction equation of multiresolution fairing, where [
P
m
n
∣
Q
m
n
] is reconstitution matrix, P
m
n is a (
m
+
3
)
×
(
n
+
3
) matrix, and Q
m
n is a (
m
+
3
)
×
(
m
-
n
) matrix.


## 3. Accuracy Control Problem of Multiresolution Fairing

In the process of multiresolution fairing, the number of control vertexes is reduced directly from2
j
+
3 to 2
j
-
1
+
3 for dyadic wavelet fairing, about 50% decrease. This causes a ticklish problem that fairing error is discontinuous and jumping. If fairing process must execute several steps, this defect will not make any bad effect in the middle step of fairing. But in the final step, the fairing error maybe exceeds the given error although it is under control in the previous step. In order to make final fairing error under control, Takahashi et al. [18] proposed two interpolation schemes for the continuous-level shapes: linear interpolation and cardinal-spline interpolation to control fairing error by continuous resolution decomposition of curves and surfaces. As a matter of fact, the essence of this method is linear combination of two adjacent multiresolution curves or surfaces. So this is just an approximate calculation and the faired curves or surfaces cannot be reconstructed accurately again. This is contrary to the essence of the multiresolution analysis.Although arbitrary resolution wavelet fairing has no special requirement for the number of control vertexes, the problem is that we do not know how to choose a reasonable objective scale factorn to ensure fairing accuracy with the least control vertexes. So a reasonable instructional method is needed to solve this problem.On the one hand, because the decompose matrixesP
j and Q
j are known, dyadic wavelet fairing has a high computational efficiency, but it has a strict requirement on the number of control vertexes. On the other hand, arbitrary resolution wavelet fairing has no strict requirement on the number of control vertexes, but its computational efficiency is relatively low because of massive inner product computation for reconstructing new wavelets according to the different scale factors. In order to make a good balance between fairing efficiency and algorithm flexibility, these two algorithms can be used selectively according to the actual requirement in the process of multiresolution fairing on curves and surfaces. In the first step, ARWFA is adopted to make the number of control vertexes suitable for DWFA. In the middle steps, the efficient DWFA is adopted. In the last step, in order to make the fairing error under control, ARWFA is adopted again to achieve the best fairing effect with the least control vertexes.Here, the crucial and difficult problem is how to choose the reasonable fairing scale to meet fairing accuracy in the last step.Combined with these two fairing algorithms mentioned above, an inverse-problem-based multiresolution fairing accuracy control method will be proposed on the basis of analysis of effect of multiresolution fairing on fairing error.


## 4. Accuracy Control for Multiresolution Fairing

On the study of fairing algorithms mentioned above, the author has developed a related multiresolution fairing software and achieved the multiresolution fairing on curves and surfaces with any number of control vertexes.


### 4.1. Accuracy Analysis of Multiresolution Fairing

Firstly, we take a complex curve as an example to study the accuracy effect of multiresolution fairing. The given fairing accuracy of this curve isε
=
0.02 mm. The primitive curve is a space curve determined by formula (15) and is shown in Figure 3:
(15)
x
=
(
R
+
a
sin
(
b
t
)
)
cos
⁡
(
t
)
,
y
=
(
R
+
a
sin
(
b
t
)
)
sin
(
t
)
,
z
=
a
cos
⁡
(
b
t
)
.
The primitive curve has 1300 data points, so the corresponding control vertexes are 1302. The curvature distribution of primitive curves is shown in Figure 4. Figure 4 shows that the minimum curvature of this curve is 0.080 mm−1, and the maximum curvature is 0.108 mm−1.Figure 3
Primitive space curve.Figure 4
Curvature distribution of primitive curve.According to the fairing requirement of DWFA, this curve is faired with the scale2
10
=
1024 firstly, so the number of control vertexes is 2
10
+
3
=
1027, and the corresponding number of data points is 1025. Draw this new curve and compare it with the primitive curve. Accuracy analysis result and the distribution of control vertexes in different precision range are shown in Figure 5. In Figure 5, green represents the error 0.000 mm and red represents the error 0.005 mm. According to Figure 5, the minimum fairing error is 0.001 mm and the maximum fairing error is 0.005 mm.Figure 5
Accuracy comparison in the 1st fairing (1302–1027). Minimum 0.001 mm and maximum 0.005 mm.Obviously, the fairing error is much smaller than given accuracy after the first fairing and the curve can be faired further. Because the number of control vertexes now is suitable for the efficient DWFA, DWFA can be adopted to fair this curve in the following steps. Fair the curve to the new with2
9
+
3
=
515 control vertexes, so the corresponding data points are 513. Draw the new curves and compare it to the primitive curve. Accuracy analysis result is shown in Figure 6, where the minimum error is 0.000 mm and the maximum error is 0.006 mm.Figure 6
Accuracy comparison in the 2nd fairing (1027–515). Minimum 0.000 mm and maximum 0.006 mm.According to the given control accuracy, the curve still can be faired by DWFA. With the same method, fair the curve, respectively, to2
8
+
3
=
259, 2
7
+
3
=
131, 2
6
+
3
=
67, 2
5
+
3
=
35, and 2
4
+
3
=
19 and compare them with the primitive curve. Accuracy analysis results are shown in Figures 7, 8, 9, 10, and 11.Figure 7
Accuracy comparison in the 3rd fairing (515–259). Minimum 0.001 mm and maximum 0.006 mm.Figure 8
Accuracy comparison in the 4th fairing (250–131). Minimum 0.000 mm and maximum 0.008 mm.Figure 9
Accuracy comparison in the 5th fairing (131–67). Minimum 0.000 mm and maximum 0.037 mm.Figure 10
Accuracy comparison in the 6th fairing (67–35). Minimum 0.002 mm and maximum 0.352 mm.Figure 11
Accuracy comparison in the 7th fairing (35–19). Minimum 0.029 mm and maximum 3.915 mm.According to the above accuracy analysis, different wavelet scale factor and the corresponding fairing error are shown in Table1.Table 1
Fairing errors correspond to different scale factors.
Data points
1300
1025
513
257
129
65
33
17
Control vertexes
1302
1027
515
259
131
67
35
19
Rational scale
1299
1024
512
256
128
64
32
16
Dyadic scale
10.34
10
9
8
7
6
5
4
Min error
0
0.001
0
0.001
0
0
0.002
0.031
Max error
0
0.005
0.006
0.006
0.008
0.037
0.352
3.915
Log of max error
−2.301
−2.222
−2.222
−2.097
−1.432
−0.453
0.593Setting dyadic scale as abscissa and logarithmlg
(
ε
) of fairing error ε as ordinate, draw a least-square fitting line to reveal the error variation tendency, as shown in Figure 12. It is obvious to find that when the control vertexes become less and less, the fairing error becomes larger and larger in the process of multiresolution fairing.Figure 12
Error changing trend of multiresolution fairing.


### 4.2. Linear Curve-Based Inverse Calculation of Fairing Scale

For the given fairing errorε
=
0.02 mm, its logarithm is lg
(
0.02
)
=
-
1.699. According to Table 1, this error is between the dyadic scales 6 and 7. Now the problem is how to choose quickly a suitable fairing scale from the scale interval [6, 7] to ensure that the maximum fairing error should be close to but not more than the given error 0.02 mm. Assume that accuracy change is linear, and then we can draw a schematic diagram as in Figure 13 to calculate the needed scale under the given error ε. Although the assumption is not always right, fairing error can be made under control by multiple iterations.Figure 13
Schematic diagram of linear assumption.In Figure13, the fairing error determined by the scale x
1 is still smaller than the control error ε, while on the scale x
2, the fairing error is already larger than the control error ε. Define a rectangular coordinate system with dyadic scale as x-axis and logarithm of error as y-axis. Draw the line A
B through point (
x
1
,
a
) and point (
x
2
,
b
), then the corresponding slope can be expressed as
(16)
k
=
b
-
a
x
2
-
x
1
.
So, according to formula (16), line A
B can be expressed as
(17)
y
=
b
-
a
x
2
-
x
1
x
-
a
x
2
-
b
x
1
x
2
-
x
1
.
According to formula (17), scale can be expressed as the function of error:
(18)
x
=
x
2
-
x
1
b
-
a
y
+
b
x
1
-
a
x
2
b
-
a
.
According to formula (18), then
(19)
j
=
x
2
-
x
1
b
-
a
lg
(
ε
)
+
b
x
1
-
a
x
2
b
-
a
.
According to Table 1, x
1
=
7,  x
2
=
6,  a
=
-
2.097,  b
=
-
1.432, and ε
=
0.02, so the dyadic scale is j
=
6.402 and the corresponding rational scale is n
=
2
j
=
84.548; take n
=
85.Now the corresponding control vertexes are 88. Fair the control vertexes of curve from 131 to 88 with ARWFA and draw the corresponding curve to be compared with the primitive curve on accuracy, as shown in Figure14. In Figure 14, the minimum error is 0.001 mm and the maximum error is 0.015 mm, where green represents the error 0.001 mm and red represents the error 0.015 mm.Figure 14
First fairing result in accuracy control progress. Minimum 0.001 mm and maximum 0.015 mm.Because actual error 0.015 mm is smaller than given error 0.02 mm, it means that this curve still can be faired. So, takingx
1
=
6.402, x
2
=
6, a
=
-
1.824, and b
=
-
1.432, calculate the corresponding rational scale n and fair the curve according to formula (19) again. According to the iterative sequence in Figure 15, a series of accuracy analysis results are achieved after multiple iterations, as shown in Table 2.Table 2
Intervals result of accuracy control progress.
x
1
x
2
a
b
Control accuracy lg (ε)
Dyadic scalej
Rational scalen
Number of control vertexes
Actual error
7.000000
6.000000
−2.096910
−1.431798
−1.698970
6.401695
85
88
0.015
6.401695
6.000000
−1.823909
−1.431798
−1.698970
6.273702
77
80
0.021
6.401695
6.273702
−1.823909
−1.677781
−1.698970
6.292261
78
81
0.020Figure 15
Intervals sequence of accuracy control progress.Table2 shows that when the number of control vertexes is exactly equal to 81 after 3 iterations, the curve just meets the given accuracy.Comparing the faired curve determined by 81 control vertexes with the primitive one, the result is shown in Figure16. In Figure 16, the minimum error is 0.001 mm and the maximum error is 0.020 mm. Now a little number of red dots appear, which indicates that the error there becomes relatively larger. Draw the curvature distribution of the faired curve, as shown in Figure 17. The minimum curvature is 0.066 mm−1 and the maximum is 0.086 mm−1. Comparing with the maximum curvature 0.108 mm−1 of the primitive curve, the fairness of the curve is improved because of the decline of curvature. Thus it can be seen that, on the basis of linear hypothesis and inverse calculation, an expected fairing scale is achieved after 3 iterations. This scale can ensure that the curve is faired perfectly and determined by the least control vertexes finally.Figure 16
Accuracy comparison between the faired curve and the original curve.Figure 17
Curvature distribution of the faired curve.In conclusion, the specific progress of accuracy inverse calculation of multiresolution fairing based on linear hypothesis is shown in Figure18.Figure 18
Flowchart of accuracy inverse calculation of multiresolution fairing basis on linear hypothesis.Although the above algorithm achieved the final fairing scale by inverse calculation, multiple iterations are necessary to meet the fairing accuracy. To some extent, this will impact the efficiency and operability of multiresolution fairing. In order to solve the needed fairing scale more quickly, this paper put forward a new inverse calculation method for fairing scale on the basis of least square fit.


### 4.3. Quadratic Curve-Based Inverse Calculation of Fairing Scale

According to the analysis result in Table1, define a rectangular coordinate system with dyadic scale as x-axis and logarithm of error as y-axis, as shown in Figure 19.Figure 19
Quadratic fitting curve.Fit the quadratic curve with the control points by least square method; that is,(20)
y
=
a
x
2
+
b
x
+
c
.
According to the least square principle, quadratic sum of the difference between the fitting curve and the ordinates should be minimum. That is,
(21)
Min
⁡
F
=
∑
(
y
(
x
i
)
-
y
i
)
2
=
(
a
x
i
2
+
b
x
i
+
c
-
y
i
)
2
.
Take the partial derivatives to a, b and c on formula (21), respectively, and then
(22)
∂
F
∂
a
=
0
,
∂
F
∂
b
=
0
,
∂
F
∂
c
=
0
.
So, the decomposition form is expressed as
(23)
∂
F
∂
a
=
∑
i
=
1
7
2
(
a
x
i
2
+
b
x
i
+
c
-
y
i
)
x
i
2
=
0
,
∂
F
∂
b
=
∑
i
=
1
7
2
(
a
x
i
2
+
b
x
i
+
c
-
y
i
)
x
i
=
0
,
∂
F
∂
c
=
∑
i
=
1
7
2
(
a
x
i
2
+
b
x
i
+
c
-
y
i
)
=
0
.
Finally, it could be simplified to a system of linear equations as shown in
(24)
a
∑
i
=
1
7
x
i
4
+
b
∑
i
=
1
7
x
i
3
+
c
∑
i
=
1
7
x
i
2
=
∑
i
=
1
7
y
i
x
i
2
,
a
∑
i
=
1
7
x
i
3
+
b
∑
i
=
1
7
x
i
2
+
c
∑
i
=
1
7
x
i
=
∑
i
=
1
7
y
i
x
i
,
a
∑
i
=
1
7
x
i
2
+
b
∑
i
=
1
7
x
i
+
d
∑
i
=
1
7
1
=
∑
i
=
1
7
y
i
.
The solution of formula (24) is
(25)
a
=
0.12869
,
b
=
-
2.26628
,
c
=
7.59578
.
So, the final fitting quadratic curve is
(26)
y
=
0.12869
x
2
-
2.26628
x
+
7.59578
.
The fitting curve is shown in Figure 19. Substituting y
=
lg
(
0.02
) into this quadratic curve equation, one solution x
=
6.502 in the interval [6, 7] is solved. So, the corresponding rational scale is n
=
2
6.502
=
90.620. Letting n
=
91, then the number of control vertexes by inverse calculation is 94, as shown in Table 3, while, according to Table 2, there is a great difference between fairing scale n
=
91 and objective scale n
=
78.Table 3
Fairing scale determined by curves order.
Order
2
3
4
5
6
Scalen
91
88
81
80
79Taking higher order of fitting curve to improve fitting accuracy is one of the effective methods to predict a more reasonable fairing scale.


### 4.4. Cubic Curve-Based Inverse Calculation of Fairing Scale

In this section, cubic fitting curve is employed to solve the objective scale by inverse calculation.Set the cubic curve as(27)
y
=
a
x
3
+
b
x
2
+
c
x
+
d
.
According to the least squares principle, objective function can be expressed as
(28)
Min
⁡
F
=
∑
(
y
(
x
i
)
-
y
i
)
2
=
(
a
x
i
3
+
b
x
i
2
+
c
x
i
+
d
-
y
i
)
2
.
Take the partial derivatives to a, b, c, and d on formula (28), respectively, and then
(29)
∂
F
∂
a
=
0
,
∂
F
∂
b
=
0
,
∂
F
∂
c
=
0
,
∂
F
∂
d
=
0
.
So, the decomposition form can be expressed as
(30)
∂
F
∂
a
=
∑
i
=
1
7
2
(
a
x
i
3
+
b
x
i
2
+
c
x
i
+
d
-
y
i
)
x
i
3
=
0
,
∂
F
∂
b
=
∑
i
=
1
7
2
(
a
x
i
3
+
b
x
i
2
+
c
x
i
+
d
-
y
i
)
x
i
2
=
0
,
∂
F
∂
c
=
∑
i
=
1
7
2
(
a
x
i
3
+
b
x
i
2
+
c
x
i
+
d
-
y
i
)
x
i
=
0
,
∂
F
∂
d
=
∑
i
=
1
7
2
(
a
x
i
3
+
b
x
i
2
+
c
x
i
+
d
-
y
i
)
=
0
.
Finally, it could be simplified to a system of linear equations as
(31)
a
∑
i
=
1
7
x
i
6
+
b
∑
i
=
1
7
x
i
5
+
c
∑
i
=
1
7
x
i
4
+
d
∑
i
=
1
7
x
i
3
=
∑
i
=
1
7
y
i
x
i
3
,
a
∑
i
=
1
7
x
i
5
+
b
∑
i
=
1
7
x
i
6
+
c
∑
i
=
1
7
x
i
3
+
d
∑
i
=
1
7
x
i
2
=
∑
i
=
1
7
y
i
x
i
2
,
a
∑
i
=
1
7
x
i
4
+
b
∑
i
=
1
7
x
i
3
+
c
∑
i
=
1
7
x
i
2
+
d
∑
i
=
1
7
x
i
=
∑
i
=
1
7
y
i
x
i
,
a
∑
i
=
1
7
x
i
3
+
b
∑
i
=
1
7
x
i
2
+
c
∑
i
=
1
7
x
i
+
d
∑
i
=
1
7
1
=
∑
i
=
1
7
y
i
.
The solution of formula (31) is
(32)
a
=
-
0.00933
,
b
=
0.32462
,
c
=
-
3.57246
,
d
=
10.33876
.
So the final fitting cubic curve is
(33)
y
=
-
0.00933
x
3
+
0.32462
x
2
+
-
3.57246
x
+
10.33876
.
The fitting curve is shown in Figure 20.Figure 20
Cubic fitting curve.Substitutingy
=
lg
(
0.02
) into this cubic curve equation, one solution x
=
6.444 in the interval [6, 7] is solved. So the corresponding rational scale is n
=
2
6.444
=
87.060. Letting n
=
88, then the number of control vertexes by inverse calculation is 91, as shown in Table 3. Similarly, according to Table 2, there is a great difference between fairing scale n
=
88 and objective scale n
=
78. Fairing scale must be further recalculated with high order curve.


### 4.5. Quartic Curve-Based Inverse Calculation of Fairing Scale

In this section, quartic fitting curve is employed to solve the objective scale by inverse calculation.Set the quartic curve as(34)
y
=
a
x
4
+
b
x
3
+
c
x
2
+
d
x
+
e
.
According to the least squares principle, objective function can be expressed as
(35)
Min
⁡
F
=
∑
(
y
(
x
i
)
-
y
i
)
2
=
(
a
x
i
4
+
b
x
i
3
+
c
x
i
2
+
d
x
i
+
e
-
y
i
)
2
.
Take the partial derivatives to a, b, c, d, and e on formula (35), respectively, and then
(36)
∂
F
∂
a
=
0
,
∂
F
∂
b
=
0
,
∂
F
∂
c
=
0
,
∂
F
∂
d
=
0
,
∂
F
∂
e
=
0
.
So, the decomposition form can be expressed as
(37)
∂
F
∂
a
=
∑
i
=
1
7
2
(
a
x
i
4
+
b
x
i
3
+
c
x
i
2
+
d
x
i
+
e
-
y
i
)
x
i
4
=
0
,
∂
F
∂
b
=
∑
i
=
1
7
2
(
a
x
i
4
+
b
x
i
3
+
c
x
i
2
+
d
x
i
+
e
-
y
i
)
x
i
3
=
0
,
∂
F
∂
c
=
∑
i
=
1
7
2
(
a
x
i
4
+
b
x
i
3
+
c
x
i
2
+
d
x
i
+
e
-
y
i
)
x
i
2
=
0
,
∂
F
∂
d
=
∑
i
=
1
7
2
(
a
x
i
4
+
b
x
i
3
+
c
x
i
2
+
d
x
i
+
e
-
y
i
)
x
i
=
0
,
∂
F
∂
e
=
∑
i
=
1
7
2
(
a
x
i
4
+
b
x
i
3
+
c
x
i
2
+
d
x
i
+
e
-
y
i
)
=
0
.
Finally, it could be simplified to system of linear equations as shown in type (38):
(38)
a
∑
i
=
1
7
x
i
8
+
b
∑
i
=
1
7
x
i
7
+
c
∑
i
=
1
7
x
i
6
+
d
∑
i
=
1
7
x
i
5
+
e
∑
i
=
1
7
x
i
4
=
∑
i
=
1
7
y
i
x
i
4
,
a
∑
i
=
1
7
x
i
7
+
b
∑
i
=
1
7
x
i
6
+
c
∑
i
=
1
7
x
i
5
+
d
∑
i
=
1
7
x
i
4
+
e
∑
i
=
1
7
x
i
3
=
∑
i
=
1
7
y
i
x
i
3
,
a
∑
i
=
1
7
x
i
6
+
b
∑
i
=
1
7
x
i
5
+
c
∑
i
=
1
7
x
i
4
+
d
∑
i
=
1
7
x
i
3
+
e
∑
i
=
1
7
x
i
2
=
∑
i
=
1
7
y
i
x
i
2
,
a
∑
i
=
1
7
x
i
5
+
b
∑
i
=
1
7
x
i
4
+
c
∑
i
=
1
7
x
i
3
+
d
∑
i
=
1
7
x
i
2
+
e
∑
i
=
1
7
x
i
=
∑
i
=
1
7
y
i
x
i
,
a
∑
i
=
1
7
x
i
4
+
b
∑
i
=
1
7
x
i
3
+
c
∑
i
=
1
7
x
i
2
+
d
∑
i
=
1
7
x
i
+
e
∑
i
=
1
7
1
=
∑
i
=
1
7
y
i
.
The solution of formula (38) is
(39)
a
=
-
0.00997
,
b
=
0.26974
,
c
=
-
2.51019
,
d
=
8.76626
,
e
=
-
9.01933
.
So the final fitting quartic curve is
(40)
y
=
-
0.00997
x
4
+
0.26974
x
3
-
2.51019
x
2
+
8.76626
x
-
9.01933
.
The fitting curve is shown in Figure 21.Figure 21
Quartic fitting curve.Substitutingy
=
lg
(
0.02
) into this quartic curve equation, one solution x
=
6.3343 in the interval [6, 7] is solved. So the corresponding rational scale is n
=
2
6.3343
=
80.687. Letting n
=
81, then the number of control vertexes by inverse calculation is 84, as shown in Table 3. Visibly, with the increase of curve order, fitting accuracy becomes higher and higher and the fairing scale n
=
81 is very close to the objective scale n
=
78.


### 4.6. Verification of Least-Square-Fitting-Based Inverse Calculation of Fairing Scale

With the same method, quintic curve and sextic curve are also adopted to solve the objective scale by inverse calculation, the results are shown in Table3. According to Table 3, effect of curve order on accuracy of inverse calculation is shown in Figure 22.Figure 22
Effect of curve order on accuracy of inverse calculation.Table3 and Figure 22 show that, with the increase of curve order, when the curve order is 6, the solution of inverse calculation is n
=
79 and is very close to the objective scale n
=
78. Here, accuracy analysis is applied again to estimate whether the faired curve meets the accuracy requirement. Now fairing scale is 79 and the number of the control vertexes is 82. Comparing the new curve with primitive curve, the corresponding accuracy analysis is shown in Figure 23.Figure 23
Accuracy comparison between the new curve and the original curve (79 data points).According to Figure23, the maximum error is 0.019 mm, less than and very close to the control error 0.02 mm, and meets the accuracy requirement.To sum up, when the order of least squares curve is 6, the solved scale by inverse calculation can meet the accuracy requirement quickly. As a result, the operability of the multiresolution fairing is greatly improved.


## 4.1. Accuracy Analysis of Multiresolution Fairing

Firstly, we take a complex curve as an example to study the accuracy effect of multiresolution fairing. The given fairing accuracy of this curve isε
=
0.02 mm. The primitive curve is a space curve determined by formula (15) and is shown in Figure 3:
(15)
x
=
(
R
+
a
sin
(
b
t
)
)
cos
⁡
(
t
)
,
y
=
(
R
+
a
sin
(
b
t
)
)
sin
(
t
)
,
z
=
a
cos
⁡
(
b
t
)
.
The primitive curve has 1300 data points, so the corresponding control vertexes are 1302. The curvature distribution of primitive curves is shown in Figure 4. Figure 4 shows that the minimum curvature of this curve is 0.080 mm−1, and the maximum curvature is 0.108 mm−1.Figure 3
Primitive space curve.Figure 4
Curvature distribution of primitive curve.According to the fairing requirement of DWFA, this curve is faired with the scale2
10
=
1024 firstly, so the number of control vertexes is 2
10
+
3
=
1027, and the corresponding number of data points is 1025. Draw this new curve and compare it with the primitive curve. Accuracy analysis result and the distribution of control vertexes in different precision range are shown in Figure 5. In Figure 5, green represents the error 0.000 mm and red represents the error 0.005 mm. According to Figure 5, the minimum fairing error is 0.001 mm and the maximum fairing error is 0.005 mm.Figure 5
Accuracy comparison in the 1st fairing (1302–1027). Minimum 0.001 mm and maximum 0.005 mm.Obviously, the fairing error is much smaller than given accuracy after the first fairing and the curve can be faired further. Because the number of control vertexes now is suitable for the efficient DWFA, DWFA can be adopted to fair this curve in the following steps. Fair the curve to the new with2
9
+
3
=
515 control vertexes, so the corresponding data points are 513. Draw the new curves and compare it to the primitive curve. Accuracy analysis result is shown in Figure 6, where the minimum error is 0.000 mm and the maximum error is 0.006 mm.Figure 6
Accuracy comparison in the 2nd fairing (1027–515). Minimum 0.000 mm and maximum 0.006 mm.According to the given control accuracy, the curve still can be faired by DWFA. With the same method, fair the curve, respectively, to2
8
+
3
=
259, 2
7
+
3
=
131, 2
6
+
3
=
67, 2
5
+
3
=
35, and 2
4
+
3
=
19 and compare them with the primitive curve. Accuracy analysis results are shown in Figures 7, 8, 9, 10, and 11.Figure 7
Accuracy comparison in the 3rd fairing (515–259). Minimum 0.001 mm and maximum 0.006 mm.Figure 8
Accuracy comparison in the 4th fairing (250–131). Minimum 0.000 mm and maximum 0.008 mm.Figure 9
Accuracy comparison in the 5th fairing (131–67). Minimum 0.000 mm and maximum 0.037 mm.Figure 10
Accuracy comparison in the 6th fairing (67–35). Minimum 0.002 mm and maximum 0.352 mm.Figure 11
Accuracy comparison in the 7th fairing (35–19). Minimum 0.029 mm and maximum 3.915 mm.According to the above accuracy analysis, different wavelet scale factor and the corresponding fairing error are shown in Table1.Table 1
Fairing errors correspond to different scale factors.
Data points
1300
1025
513
257
129
65
33
17
Control vertexes
1302
1027
515
259
131
67
35
19
Rational scale
1299
1024
512
256
128
64
32
16
Dyadic scale
10.34
10
9
8
7
6
5
4
Min error
0
0.001
0
0.001
0
0
0.002
0.031
Max error
0
0.005
0.006
0.006
0.008
0.037
0.352
3.915
Log of max error
−2.301
−2.222
−2.222
−2.097
−1.432
−0.453
0.593Setting dyadic scale as abscissa and logarithmlg
(
ε
) of fairing error ε as ordinate, draw a least-square fitting line to reveal the error variation tendency, as shown in Figure 12. It is obvious to find that when the control vertexes become less and less, the fairing error becomes larger and larger in the process of multiresolution fairing.Figure 12
Error changing trend of multiresolution fairing.


## 4.2. Linear Curve-Based Inverse Calculation of Fairing Scale

For the given fairing errorε
=
0.02 mm, its logarithm is lg
(
0.02
)
=
-
1.699. According to Table 1, this error is between the dyadic scales 6 and 7. Now the problem is how to choose quickly a suitable fairing scale from the scale interval [6, 7] to ensure that the maximum fairing error should be close to but not more than the given error 0.02 mm. Assume that accuracy change is linear, and then we can draw a schematic diagram as in Figure 13 to calculate the needed scale under the given error ε. Although the assumption is not always right, fairing error can be made under control by multiple iterations.Figure 13
Schematic diagram of linear assumption.In Figure13, the fairing error determined by the scale x
1 is still smaller than the control error ε, while on the scale x
2, the fairing error is already larger than the control error ε. Define a rectangular coordinate system with dyadic scale as x-axis and logarithm of error as y-axis. Draw the line A
B through point (
x
1
,
a
) and point (
x
2
,
b
), then the corresponding slope can be expressed as
(16)
k
=
b
-
a
x
2
-
x
1
.
So, according to formula (16), line A
B can be expressed as
(17)
y
=
b
-
a
x
2
-
x
1
x
-
a
x
2
-
b
x
1
x
2
-
x
1
.
According to formula (17), scale can be expressed as the function of error:
(18)
x
=
x
2
-
x
1
b
-
a
y
+
b
x
1
-
a
x
2
b
-
a
.
According to formula (18), then
(19)
j
=
x
2
-
x
1
b
-
a
lg
(
ε
)
+
b
x
1
-
a
x
2
b
-
a
.
According to Table 1, x
1
=
7,  x
2
=
6,  a
=
-
2.097,  b
=
-
1.432, and ε
=
0.02, so the dyadic scale is j
=
6.402 and the corresponding rational scale is n
=
2
j
=
84.548; take n
=
85.Now the corresponding control vertexes are 88. Fair the control vertexes of curve from 131 to 88 with ARWFA and draw the corresponding curve to be compared with the primitive curve on accuracy, as shown in Figure14. In Figure 14, the minimum error is 0.001 mm and the maximum error is 0.015 mm, where green represents the error 0.001 mm and red represents the error 0.015 mm.Figure 14
First fairing result in accuracy control progress. Minimum 0.001 mm and maximum 0.015 mm.Because actual error 0.015 mm is smaller than given error 0.02 mm, it means that this curve still can be faired. So, takingx
1
=
6.402, x
2
=
6, a
=
-
1.824, and b
=
-
1.432, calculate the corresponding rational scale n and fair the curve according to formula (19) again. According to the iterative sequence in Figure 15, a series of accuracy analysis results are achieved after multiple iterations, as shown in Table 2.Table 2
Intervals result of accuracy control progress.
x
1
x
2
a
b
Control accuracy lg (ε)
Dyadic scalej
Rational scalen
Number of control vertexes
Actual error
7.000000
6.000000
−2.096910
−1.431798
−1.698970
6.401695
85
88
0.015
6.401695
6.000000
−1.823909
−1.431798
−1.698970
6.273702
77
80
0.021
6.401695
6.273702
−1.823909
−1.677781
−1.698970
6.292261
78
81
0.020Figure 15
Intervals sequence of accuracy control progress.Table2 shows that when the number of control vertexes is exactly equal to 81 after 3 iterations, the curve just meets the given accuracy.Comparing the faired curve determined by 81 control vertexes with the primitive one, the result is shown in Figure16. In Figure 16, the minimum error is 0.001 mm and the maximum error is 0.020 mm. Now a little number of red dots appear, which indicates that the error there becomes relatively larger. Draw the curvature distribution of the faired curve, as shown in Figure 17. The minimum curvature is 0.066 mm−1 and the maximum is 0.086 mm−1. Comparing with the maximum curvature 0.108 mm−1 of the primitive curve, the fairness of the curve is improved because of the decline of curvature. Thus it can be seen that, on the basis of linear hypothesis and inverse calculation, an expected fairing scale is achieved after 3 iterations. This scale can ensure that the curve is faired perfectly and determined by the least control vertexes finally.Figure 16
Accuracy comparison between the faired curve and the original curve.Figure 17
Curvature distribution of the faired curve.In conclusion, the specific progress of accuracy inverse calculation of multiresolution fairing based on linear hypothesis is shown in Figure18.Figure 18
Flowchart of accuracy inverse calculation of multiresolution fairing basis on linear hypothesis.Although the above algorithm achieved the final fairing scale by inverse calculation, multiple iterations are necessary to meet the fairing accuracy. To some extent, this will impact the efficiency and operability of multiresolution fairing. In order to solve the needed fairing scale more quickly, this paper put forward a new inverse calculation method for fairing scale on the basis of least square fit.


## 4.3. Quadratic Curve-Based Inverse Calculation of Fairing Scale

According to the analysis result in Table1, define a rectangular coordinate system with dyadic scale as x-axis and logarithm of error as y-axis, as shown in Figure 19.Figure 19
Quadratic fitting curve.Fit the quadratic curve with the control points by least square method; that is,(20)
y
=
a
x
2
+
b
x
+
c
.
According to the least square principle, quadratic sum of the difference between the fitting curve and the ordinates should be minimum. That is,
(21)
Min
⁡
F
=
∑
(
y
(
x
i
)
-
y
i
)
2
=
(
a
x
i
2
+
b
x
i
+
c
-
y
i
)
2
.
Take the partial derivatives to a, b and c on formula (21), respectively, and then
(22)
∂
F
∂
a
=
0
,
∂
F
∂
b
=
0
,
∂
F
∂
c
=
0
.
So, the decomposition form is expressed as
(23)
∂
F
∂
a
=
∑
i
=
1
7
2
(
a
x
i
2
+
b
x
i
+
c
-
y
i
)
x
i
2
=
0
,
∂
F
∂
b
=
∑
i
=
1
7
2
(
a
x
i
2
+
b
x
i
+
c
-
y
i
)
x
i
=
0
,
∂
F
∂
c
=
∑
i
=
1
7
2
(
a
x
i
2
+
b
x
i
+
c
-
y
i
)
=
0
.
Finally, it could be simplified to a system of linear equations as shown in
(24)
a
∑
i
=
1
7
x
i
4
+
b
∑
i
=
1
7
x
i
3
+
c
∑
i
=
1
7
x
i
2
=
∑
i
=
1
7
y
i
x
i
2
,
a
∑
i
=
1
7
x
i
3
+
b
∑
i
=
1
7
x
i
2
+
c
∑
i
=
1
7
x
i
=
∑
i
=
1
7
y
i
x
i
,
a
∑
i
=
1
7
x
i
2
+
b
∑
i
=
1
7
x
i
+
d
∑
i
=
1
7
1
=
∑
i
=
1
7
y
i
.
The solution of formula (24) is
(25)
a
=
0.12869
,
b
=
-
2.26628
,
c
=
7.59578
.
So, the final fitting quadratic curve is
(26)
y
=
0.12869
x
2
-
2.26628
x
+
7.59578
.
The fitting curve is shown in Figure 19. Substituting y
=
lg
(
0.02
) into this quadratic curve equation, one solution x
=
6.502 in the interval [6, 7] is solved. So, the corresponding rational scale is n
=
2
6.502
=
90.620. Letting n
=
91, then the number of control vertexes by inverse calculation is 94, as shown in Table 3, while, according to Table 2, there is a great difference between fairing scale n
=
91 and objective scale n
=
78.Table 3
Fairing scale determined by curves order.
Order
2
3
4
5
6
Scalen
91
88
81
80
79Taking higher order of fitting curve to improve fitting accuracy is one of the effective methods to predict a more reasonable fairing scale.


## 4.4. Cubic Curve-Based Inverse Calculation of Fairing Scale

In this section, cubic fitting curve is employed to solve the objective scale by inverse calculation.Set the cubic curve as(27)
y
=
a
x
3
+
b
x
2
+
c
x
+
d
.
According to the least squares principle, objective function can be expressed as
(28)
Min
⁡
F
=
∑
(
y
(
x
i
)
-
y
i
)
2
=
(
a
x
i
3
+
b
x
i
2
+
c
x
i
+
d
-
y
i
)
2
.
Take the partial derivatives to a, b, c, and d on formula (28), respectively, and then
(29)
∂
F
∂
a
=
0
,
∂
F
∂
b
=
0
,
∂
F
∂
c
=
0
,
∂
F
∂
d
=
0
.
So, the decomposition form can be expressed as
(30)
∂
F
∂
a
=
∑
i
=
1
7
2
(
a
x
i
3
+
b
x
i
2
+
c
x
i
+
d
-
y
i
)
x
i
3
=
0
,
∂
F
∂
b
=
∑
i
=
1
7
2
(
a
x
i
3
+
b
x
i
2
+
c
x
i
+
d
-
y
i
)
x
i
2
=
0
,
∂
F
∂
c
=
∑
i
=
1
7
2
(
a
x
i
3
+
b
x
i
2
+
c
x
i
+
d
-
y
i
)
x
i
=
0
,
∂
F
∂
d
=
∑
i
=
1
7
2
(
a
x
i
3
+
b
x
i
2
+
c
x
i
+
d
-
y
i
)
=
0
.
Finally, it could be simplified to a system of linear equations as
(31)
a
∑
i
=
1
7
x
i
6
+
b
∑
i
=
1
7
x
i
5
+
c
∑
i
=
1
7
x
i
4
+
d
∑
i
=
1
7
x
i
3
=
∑
i
=
1
7
y
i
x
i
3
,
a
∑
i
=
1
7
x
i
5
+
b
∑
i
=
1
7
x
i
6
+
c
∑
i
=
1
7
x
i
3
+
d
∑
i
=
1
7
x
i
2
=
∑
i
=
1
7
y
i
x
i
2
,
a
∑
i
=
1
7
x
i
4
+
b
∑
i
=
1
7
x
i
3
+
c
∑
i
=
1
7
x
i
2
+
d
∑
i
=
1
7
x
i
=
∑
i
=
1
7
y
i
x
i
,
a
∑
i
=
1
7
x
i
3
+
b
∑
i
=
1
7
x
i
2
+
c
∑
i
=
1
7
x
i
+
d
∑
i
=
1
7
1
=
∑
i
=
1
7
y
i
.
The solution of formula (31) is
(32)
a
=
-
0.00933
,
b
=
0.32462
,
c
=
-
3.57246
,
d
=
10.33876
.
So the final fitting cubic curve is
(33)
y
=
-
0.00933
x
3
+
0.32462
x
2
+
-
3.57246
x
+
10.33876
.
The fitting curve is shown in Figure 20.Figure 20
Cubic fitting curve.Substitutingy
=
lg
(
0.02
) into this cubic curve equation, one solution x
=
6.444 in the interval [6, 7] is solved. So the corresponding rational scale is n
=
2
6.444
=
87.060. Letting n
=
88, then the number of control vertexes by inverse calculation is 91, as shown in Table 3. Similarly, according to Table 2, there is a great difference between fairing scale n
=
88 and objective scale n
=
78. Fairing scale must be further recalculated with high order curve.


## 4.5. Quartic Curve-Based Inverse Calculation of Fairing Scale

In this section, quartic fitting curve is employed to solve the objective scale by inverse calculation.Set the quartic curve as(34)
y
=
a
x
4
+
b
x
3
+
c
x
2
+
d
x
+
e
.
According to the least squares principle, objective function can be expressed as
(35)
Min
⁡
F
=
∑
(
y
(
x
i
)
-
y
i
)
2
=
(
a
x
i
4
+
b
x
i
3
+
c
x
i
2
+
d
x
i
+
e
-
y
i
)
2
.
Take the partial derivatives to a, b, c, d, and e on formula (35), respectively, and then
(36)
∂
F
∂
a
=
0
,
∂
F
∂
b
=
0
,
∂
F
∂
c
=
0
,
∂
F
∂
d
=
0
,
∂
F
∂
e
=
0
.
So, the decomposition form can be expressed as
(37)
∂
F
∂
a
=
∑
i
=
1
7
2
(
a
x
i
4
+
b
x
i
3
+
c
x
i
2
+
d
x
i
+
e
-
y
i
)
x
i
4
=
0
,
∂
F
∂
b
=
∑
i
=
1
7
2
(
a
x
i
4
+
b
x
i
3
+
c
x
i
2
+
d
x
i
+
e
-
y
i
)
x
i
3
=
0
,
∂
F
∂
c
=
∑
i
=
1
7
2
(
a
x
i
4
+
b
x
i
3
+
c
x
i
2
+
d
x
i
+
e
-
y
i
)
x
i
2
=
0
,
∂
F
∂
d
=
∑
i
=
1
7
2
(
a
x
i
4
+
b
x
i
3
+
c
x
i
2
+
d
x
i
+
e
-
y
i
)
x
i
=
0
,
∂
F
∂
e
=
∑
i
=
1
7
2
(
a
x
i
4
+
b
x
i
3
+
c
x
i
2
+
d
x
i
+
e
-
y
i
)
=
0
.
Finally, it could be simplified to system of linear equations as shown in type (38):
(38)
a
∑
i
=
1
7
x
i
8
+
b
∑
i
=
1
7
x
i
7
+
c
∑
i
=
1
7
x
i
6
+
d
∑
i
=
1
7
x
i
5
+
e
∑
i
=
1
7
x
i
4
=
∑
i
=
1
7
y
i
x
i
4
,
a
∑
i
=
1
7
x
i
7
+
b
∑
i
=
1
7
x
i
6
+
c
∑
i
=
1
7
x
i
5
+
d
∑
i
=
1
7
x
i
4
+
e
∑
i
=
1
7
x
i
3
=
∑
i
=
1
7
y
i
x
i
3
,
a
∑
i
=
1
7
x
i
6
+
b
∑
i
=
1
7
x
i
5
+
c
∑
i
=
1
7
x
i
4
+
d
∑
i
=
1
7
x
i
3
+
e
∑
i
=
1
7
x
i
2
=
∑
i
=
1
7
y
i
x
i
2
,
a
∑
i
=
1
7
x
i
5
+
b
∑
i
=
1
7
x
i
4
+
c
∑
i
=
1
7
x
i
3
+
d
∑
i
=
1
7
x
i
2
+
e
∑
i
=
1
7
x
i
=
∑
i
=
1
7
y
i
x
i
,
a
∑
i
=
1
7
x
i
4
+
b
∑
i
=
1
7
x
i
3
+
c
∑
i
=
1
7
x
i
2
+
d
∑
i
=
1
7
x
i
+
e
∑
i
=
1
7
1
=
∑
i
=
1
7
y
i
.
The solution of formula (38) is
(39)
a
=
-
0.00997
,
b
=
0.26974
,
c
=
-
2.51019
,
d
=
8.76626
,
e
=
-
9.01933
.
So the final fitting quartic curve is
(40)
y
=
-
0.00997
x
4
+
0.26974
x
3
-
2.51019
x
2
+
8.76626
x
-
9.01933
.
The fitting curve is shown in Figure 21.Figure 21
Quartic fitting curve.Substitutingy
=
lg
(
0.02
) into this quartic curve equation, one solution x
=
6.3343 in the interval [6, 7] is solved. So the corresponding rational scale is n
=
2
6.3343
=
80.687. Letting n
=
81, then the number of control vertexes by inverse calculation is 84, as shown in Table 3. Visibly, with the increase of curve order, fitting accuracy becomes higher and higher and the fairing scale n
=
81 is very close to the objective scale n
=
78.


## 4.6. Verification of Least-Square-Fitting-Based Inverse Calculation of Fairing Scale

With the same method, quintic curve and sextic curve are also adopted to solve the objective scale by inverse calculation, the results are shown in Table3. According to Table 3, effect of curve order on accuracy of inverse calculation is shown in Figure 22.Figure 22
Effect of curve order on accuracy of inverse calculation.Table3 and Figure 22 show that, with the increase of curve order, when the curve order is 6, the solution of inverse calculation is n
=
79 and is very close to the objective scale n
=
78. Here, accuracy analysis is applied again to estimate whether the faired curve meets the accuracy requirement. Now fairing scale is 79 and the number of the control vertexes is 82. Comparing the new curve with primitive curve, the corresponding accuracy analysis is shown in Figure 23.Figure 23
Accuracy comparison between the new curve and the original curve (79 data points).According to Figure23, the maximum error is 0.019 mm, less than and very close to the control error 0.02 mm, and meets the accuracy requirement.To sum up, when the order of least squares curve is 6, the solved scale by inverse calculation can meet the accuracy requirement quickly. As a result, the operability of the multiresolution fairing is greatly improved.


## 5. Conclusion

On the basis of author’s early research results, the specific algorithm, and software programming, the impact of various scales on fairing accuracy was analyzed firstly. Then a new inverse-problem-based accuracy control method for multiresolution fairing based on linear hypothesis and least square fitting was put forward. This research can be summarized as follows.(1)
For any given fairing error, linear hypothesis was adopted firstly to predict the corresponding wavelet scale according to given control error. Then iterative algorithm was used to eliminate scale error caused by linear hypothesis. So in the condition of fairing accuracy, curves can be determined by a minimum number of control vertexes and have the best faring effect.
(2)
The efficiency of multiresolution fairing is improved greatly with the dynamic integration of dyadic wavelet fairing and arbitrary resolution wavelet fairing.
(3)
Using the idea of inverse problem for reference, a scale inverse calculation algorithm for multiresolution fairing was proposed in this paper. With the increase of order of fitting curves, inverse calculation accuracy becomes higher and higher. When the fitting curve is sextic, needed fairing scale can be calculated in a single step according to the given error and the operability of the multiresolution fairing is improved greatly.
(4)
There is no any approximation algorithm, such as interpolation and approximation, in the whole fairing progress, so faired curves and surfaces can still be reconstructed accurately, which accords with the idea and essence of wavelet analysis.



---

*Source: 912024-2014-08-14.xml*