| Literature DB >> 28319131 |
Van Than Dung1, Tegoeh Tjahjowidodo1.
Abstract
B-spline functions are widely used in many industrial applications such as computer graphic representations, computer aided design, computer aided manufacturing, computer numerical control, etc. Recently, there exist some demands, e.g. in reverse engineering (RE) area, to employ B-spline curves for non-trivial cases that include curves with discontinuous points, cusps or turning points from the sampled data. The most challenging task in these cases is in the identification of the number of knots and their respective locations in non-uniform space in the most efficient computational cost. This paper presents a new strategy for fitting any forms of curve by B-spline functions via local algorithm. A new two-step method for fast knot calculation is proposed. In the first step, the data is split using a bisecting method with predetermined allowable error to obtain coarse knots. Secondly, the knots are optimized, for both locations and continuity levels, by employing a non-linear least squares technique. The B-spline function is, therefore, obtained by solving the ordinary least squares problem. The performance of the proposed method is validated by using various numerical experimental data, with and without simulated noise, which were generated by a B-spline function and deterministic parametric functions. This paper also discusses the benchmarking of the proposed method to the existing methods in literature. The proposed method is shown to be able to reconstruct B-spline functions from sampled data within acceptable tolerance. It is also shown that, the proposed method can be applied for fitting any types of curves ranging from smooth ones to discontinuous ones. In addition, the method does not require excessive computational cost, which allows it to be used in automatic reverse engineering applications.Entities:
Mesh:
Year: 2017 PMID: 28319131 PMCID: PMC5358887 DOI: 10.1371/journal.pone.0173857
Source DB: PubMed Journal: PLoS One ISSN: 1932-6203 Impact factor: 3.240
Fig 1Sampled data from a piecewise polynomial function.
Fig 2Optimal knot solving.
Fig 3Bisecting method for subdivision data in knot identifying process.
Fig 4Parallel bisecting.
a) Start at 2 spline pieces, b) first step, c) second step, d) joining test e) shifting.
Fig 5Interior knot location versus fitting error of two-piece B-spline, top panels: Two-piece spline curves, middle panels: Fitting error versus interior knot location, bottom panels: Joining kink angel versus interior knot position.
Fig 6Knots and basis functions of discontinuous two-piece cubic B-spline (p = 3).
Fig 7Two-piece B-spline at its derivatives.
Identified interior knots.
| Ground truth knots | Residual errors from proposed method |
|---|---|
| 0.0439 | -1.318e-13 |
| 0.0653 | -5.273e-12 |
| 0.2293 | -3.972e-12 |
| 0.2367 | -1.771e-09 |
| 0.4821 | -1.160e-10 |
| 0.4907 | -2.216e-10 |
| 0.5408 | -1.840e-12 |
| 0.5408 | -1.840e-12 |
| 0.6209 | -3.926e-12 |
| 0.7051 | -1.126e-13 |
| 0.9407 | -5.221e-11 |
Fig 8Approximation of a cubic B-spline.
Differences between Serial and Parallel bisecting.
| Parameters | Serial bisection | Parallel bisection |
|---|---|---|
| Spline Degree | ||
| Control error | ||
| Minimum kink angle (degree) | ||
| Maximum smoothness C(k) | ||
| Data bisecting time (ms) | 25.7 | 27.6 |
| Coarse knots by bisecting step | 1, | 1, |
| Optimal interior knot residual errors |
Fig 9Fitted cubic splines of butterfly (left panel) and spur gear (right panel) curves.
Dotted points: sample data, solid curves: fitted spline.
Some selected cases of the fitting butterfly curve.
| Case No. | Fitting parameters | Results | ||||||
|---|---|---|---|---|---|---|---|---|
| Degree | Max error | Min kink angle | Continuity Ck | Max fitting error (ME) | Mean squared error (MSE) | No. interior knot (K) | No. pieces (Ψ) | |
| 1 | 3 | 1e-3 | 15 | -1 | 0.0019 | 1.5948e-6 | 31 single-knots | 32 |
| 2 | 3 | 1e-5 | 15 | -1 | 8.8161e-5 | 1.3989e-9 | 72 single-knots | 73 |
| 3 | 2 | 1e-5 | 15 | -1 | 1.9663e-4 | 8.5433e-9 | 126 single-knots, 1 triple-knot | 128 |
| 4 | 4 | 2e-6 | 15 | -1 | 7.5484e-5 | 1.0302e-9 | 60 single-knots | 61 |
Some cases of fitting the spur gear curve.
| Case no. | 1 | 2 | 3 | |||
|---|---|---|---|---|---|---|
| Fitting parameters | Serial bisecting | Parallel bisecting | Serial bisecting | Parallel bisecting | Serial bisecting | Parallel bisecting |
| Spline Degree | 3 | 3 | 3 | 3 | 2 | 2 |
| Control error | 1e-2 | 1e-2 | 1e-3 | 1e-3 | 1e-3 | 1e-3 |
| Minimum kink angle (degree) | 1 | 1 | 1 | 1 | 5 | 5 |
| Maximum smoothness C(k) | -1 | -1 | -1 | -1 | -1 | -1 |
| Data bisection time (ms) | 130 | 100 | 197 | 105 | 269 | 107 |
| Coarse knots by bisection step | 52 interior knots | 52 interior knots | 78 interior knots | 78 interior knots | 130 interior knots | 181 interior knots |
| Multiple knot | 52 Triple-knots | 52 Triple-knots | 52 triple-knots, 26 single-knots | 52 triple-knots, 26 single-knots | 78 single-knots, 52 double-knots | 129 single-knots, 52 double-knots |
| Fitting error: MSE (ME) | 2.341e-06 (0.0060) | 2.421e-06 (0.0055) | 1.562e-07 (0.0013) | 6.099e-08 (0.0012) | 7.4063e-7 (0.0018) | 1.1562e-7 (8.862e-4) |
| Total processing time (ms) | 2490 | 2501 | 3640 | 3715 | 3970 | 5635 |
Fig 10Noisy functions for benchmarking with Elitist clonal selection methods [29].
a) φ1(t), b) φ2(t), c) φ3(t) (dots: sample data, solid lines: fitted curve, triangle marker: knot position).
Average Root Mean Squared Error RMSEs and Standard Deviations (SD) for 50 simulation replications, comparison with Elitist clonal selection method (data are reproduced from Tables 2, 3 and 4 of [29]).
| Functions | Proposed method | Elitist clonal selection | ||
|---|---|---|---|---|
| RMSE(SD) | Run time (second) | RMSE | Run time (second) | |
| 0.4153 (0.1135) | 0.275 | 1.06581 | 10.92 | |
| 0.5272 (0.1360) | 0.229 | 0.87377 | 21.71 | |
| 0.3909 (0.0859) | 0.147 | 0.89368 | 24.87 | |