next up previous
Next: A simple extension of Up: Energy fairing Previous: The algorithm


Examples

We will now demonstrate the behaviour and some special effects of our fairing algorithm in three examples. Here, the first two curves are constructed in an somewhat academical manner whereas the third example is a real-life curve coming out of a CAD system. All current computations have been done on a HP 9000/735 machine.


In order to construct a non-uniform B-spline curve containing some maybe unwanted wiggles we proceeded as follows: We started with a planar cubic B-spline curve ($k=4$) having the 61 control points

\begin{displaymath}
\mbox{\bf d}_i = \left({x_i \atop \sin x_i}\right)
\;\;\;,\;...
...
x_i = -3 + \frac{i}{10}
\;\;\;,\;\;\;
0 \leq i \leq 60\;\;\;,
\end{displaymath}

and being defined over an equidistant knot vector with $k$-fold knots at the two ends. Then 57 inner control points were disturbed with help of random numbers whereby the maximal allowed disturbance of each control point was 0.02 absolute. Next, we removed 26 interior knots using an automatic algorithm recently developed by the two authors (Eck and Hadenfeld, 1994a) in order to end up with a non-uniform disturbed B-spline. Here the bound of the maximal allowed knot removal error was preselected to 0.01 whereby $C^1$ continuity was preserved at both end points. The final curve is shown in Fig. 2, and only for completeness we also list the underlying knot vector:

\begin{displaymath}
\begin{array}{rl}
T = &(3,3,3,3,5,10,11,13,15,16,19,20,21,24...
...46,47,50,51,52,53,56,57,59,61,61,61,61 ) \; \; \; .
\end{array}\end{displaymath}

Figure 2: Given B-spline curve of example 1.
\begin{figure}\centerline{\epsfxsize 155mm \epsfbox{pic2.ps}}\end{figure}

Following criterion (C2), the curvature of the curve is drawn as porcupines to make all the wiggles and unfair regions visible. We have chosen these porcupines, because we only want to illustrate the shape of the curvature here. The porcupines are scaled large enough and equal in every picture. Further in the curves shown in this section all knots are marked.


For the actual fairing of that curve we selected the two open parameters to be $rank$_$repeat$ = 34 and $\delta = 0.03$ what exactly is identical to the summed amount of the disturbance and the knot removal error. The fairing results (each obtained in 0.09 CPU-seconds after 272 control point changes) are as follows: In Fig. 3a the fairness criterion $E_2$ is applied whereas in Fig. 3b criterion $E_3$ is used.

Figure 3: B-spline curve faired with criterion $E_2$ (a) and $E_3$ (b).
\begin{figure}\centerline{\epsfxsize 155mm \epsfbox{pic3.ps}}\end{figure}

It is obvious that both curves are much smoother than the disturbed curve in Fig. 2 and at least the porcupines in Fig. 3a are in a rather good shape now. The curve in Fig. 3b is not totally convincing since the porcupines are more uneven or wavy. Moreover an unexpected inflection point is appearing at the right end point.

However, such end point inflections can always happen here because we let the two control points at each boundary unchanged during the fairing process. So in Fig. 3b this inflection point would vanish if we only would fix one control point at each boundary.

Next we look at the fairing results if the number of ranking list loops is increased considerably. So for $rank$_$repeat$ = 1000 and again $\delta = 0.03$ we obtain the results illustrated in Fig. 4 (each obtained in 0.37 CPU-seconds after 15500 total control point changes). Now we realize that both curves are in really good shape according to the porcupines. Moreover, the result from $E_3$ is even better than the one from $E_2$. Also the end point inflection has vanished.

Figure 4: B-spline curve faired with criterion $E_2$ (a) and $E_3$ (b).
\begin{figure}\centerline{\epsfxsize 155mm \epsfbox{pic4.ps}}\end{figure}

This observation however seems to be true in general. In order to get satisfying results using criterion $E_3$ one has to execute the algorithm a large number of times. But then the results may (not in every case, as we will see later) even be better than the one obtained with $E_2$. That means that the velocity of convergence is much smaller in the case of $E_3$. This indolent behaviour is not advantageous for the CPU-time behaviour of our algorithm. However, to be able to compare the two criteria we will choose large numbers for $rank$_$repeat$ also in the remaining examples.


In (17) and (18), it is obvious that not only the control points but also the knot vector with respect to the quality of the parameterization is important for the fairing results. To illustrate this effect we took the control points of example 1 and changed manually 9 entries of the knot vector to

\begin{displaymath}
\begin{array}{rl}
T = &(3,3,3,3,5,10,11,13,15.7,16,20.99,20....
...46,47,51,51.000001,52,53,
56.8,57,59,61,61,61,61 )
\end{array}\end{displaymath}

in order to create the second example. The resulting curve is shown in Fig. 5 where the bad knot distribution on the curve now causes additional wiggles. The changed knots are displayed as filled dots. Please note that we could not introduce double knots here because of the assumption of at least $(k-l)$-fold knots, made before.
Figure 5: Given B-spline of example 2.
\begin{figure}\centerline{\epsfxsize 155mm \epsfbox{pic5.ps}}\end{figure}

Then this new B-spline curve is faired with $rank$_$repeat$ = 1000 and $\delta = 0.03$. The result is again obtained in 0.37 CPU-seconds after 15500 iterations (see Fig. 6). Here, it is obvious that the faired curves are not in such a good shape as before what clearly is an effect of the unfavourable parameterization of the underlying curve.

Figure 6: B-spline curve faired with criterion $E_2$ (a) and $E_3$ (b).
\begin{figure}\centerline{\epsfxsize 155mm \epsfbox{pic6.ps}}\end{figure}

Now, the first curve (derived from $E_2$) is obviously better. Here all porcupines point at least into the expected direction. That is even not the case for the faired curve with $E_3$ which contains two (nearly invisible) inflection points in the interior.

So, our somewhat subjective conclusion, obtained from many practical tests, is that the energy integral $E_2$ has in general less problems with these kind of parameterizations. Altogether, the resulting curves appear more stiff or stable in such situations at least for cubic splines which we mainly considered.


The third example presented here is a boundary curve of a Bézier spline surface named Surf B and originating from the car body industry; see (Eck and Hadenfeld, 1994b) for details. This Bézier spline curve of degree $k=5$ has at first been converted to a B-spline curve with simple interior knots (see Fig. 7a). Then 14 inner control points are additionally disturbed with help of random numbers (see Fig. 7b) whereby the maximal disturbance at each control point is at least 3.0 absolute. The disturbance in this case is larger than in the first two examples because the distance from the first to the last control point is nearly 367 units.

Figure 7: Given B-spline curve (a) and with a maximal disturbance of 3.0 (b).
\begin{figure}\centerline{\epsfxsize 115mm \epsfbox{pic7.ps}}\end{figure}

Using the fairness criteria $E_2$ and $E_3$ with $\delta = 3.0$ and $rank$_$repeat$ = 1000, the fairing results (obtained in 0.44 CPU-seconds after 7000 iterations) can be seen in Fig. 8. Here, both results are nearly perfect meaning that the curvature distribution is obviously even better than the one of the original curve in Fig. 7a.

Figure 8: B-spline curve faired with criterion $E_2$ (a) and $E_3$ (b).
\begin{figure}\centerline{\epsfxsize 115mm \epsfbox{pic8.ps}}\end{figure}


Altogether we can recommend the usage of the fairing criterion $E_2$ because it is not so susceptible for bad parameterizations and moreover a suitable result is obtained after fewer iteration steps (meaning fewer CPU-time). However, it is always worth to try also the criterion $E_3$ if (nearly) real-time behaviour is not required.