next up previous
Next: Example Up: Fairing of B-Spline Curves Previous: Examples

Extension to sets of Bézier- and B-Spline Curves

If a designer constructs a curve in a way that he splits this curve into a set of Bézier- or B-splines, one possible solution to smooth these curves is to handle each one separately and fix as much as needed control points at the connections to hold the continuity. But by using this method it is not possible to control the whole shape of the curve.

A further method is to convert the curves into one B-spline curve. This can easily be done by using a knot-vector with multiple inner knots. If the degrees of the curves are not all the same we have to do a degree elevation to the highest one. By the way, this is also the procedure if you import a VDA-FS file into your CAD system.

By fairing this B-spline curve with degree-folded inner knots the result may look like the curve in figure 5.

Figure: The disturbed B-spline curve with multiple inner knots and the faired one.
\begin{figure}\centerline{\epsfxsize 110mm \epsfbox{sinus_mult_ori_smooth.ps}}\end{figure}

The shown segments of the curve are smooth (they are nearly lines) whereas the whole curve is not smooth as the continuity of the segments is not optimized. To avoid this, two possible extensions will be described:

  1. Remove as much as possible inner knots to get a minimum continuity of $C^1$ (or higher).
  2. Use an extended fairness functional which is a mixture of energy and continuity.

The usual way to construct a set of splines is to obtain a continuity at the connecting points of at least $C^1$. If the curve has a continuity of $C^1$ at the degree-folded knot $t_r$, $t_r \ne t_{r-1}$,

\begin{displaymath}
\frac{\displaystyle k - 1}{\displaystyle t_r - t_{r-1}}({\bf...
...displaystyle t_{r+k-1} - t_{r+k-2}}({\bf d}_r - {\bf d}_{r-1})
\end{displaymath}
(22)

must hold. In comparison with e.g. theorem 8 in [6] we see that this knot can be removed exactly and the new control points are determined by
\begin{displaymath}
\bar{\bf d}_i =
\left\{
\begin{array}[c]{ll}
{\bf d}_i & ,...
...f d}_{i+1} & ,\;\;\;r \le i \le n-1\;\;\;.
\end{array}\right.
\end{displaymath}
(23)

In the cases, the curve is not overall $C^1$ another possible procedure is to remove as much as possible inner knots with the method described in [6] to get a $C^1$ or higher continuity. Here, also an upper bound for the maximum deviation can be given. Thereafter this curve can be faired with the algorithm described before.

The second extension is to optimize not only the energy functional but also the continuity at the inner knots. By doing so the extended fairness functional

\begin{displaymath}
\hspace*{-10mm}
F = (1-\lambda) \int \limits_a^b \left(\wide...
...{\displaystyle \partial t}
\right)^2
\;\;\;,\;\;\; 0 \le j < 1
\end{displaymath}
(24)

is going to be used. Here ${\tt mult}$ denotes the multiplicity of the knot. Because of the multiplicity of the knots, the left and right derivative in (24) can be calculated easily. With
$\displaystyle \frac{\displaystyle \partial \widetilde{\bf x}(t_j^-)}{\displaystyle \partial t}$ $\textstyle =$ $\displaystyle \frac{\displaystyle k-1}{\displaystyle t_j - t_{j-1}}(\widetilde{\bf d}_{j-1} -
\widetilde{\bf d}_{j-2})\;\;\;,$ (25)
$\displaystyle \frac{\displaystyle \partial \widetilde{\bf x}(t_j^+)}{\displaystyle \partial t}$ $\textstyle =$ $\displaystyle \frac{\displaystyle k-1}{\displaystyle t_{j+k-1} - t_{j+k-2}}(\widetilde{\bf d}_j -
\widetilde{\bf d}_{j-1})\;\;\;,$ (26)

we obtain
$\displaystyle {
\left(
\frac{\displaystyle \partial \widetilde{\bf x}(t_j^-)}{\...
...style \partial \widetilde{\bf x}(t_j^+)}{\displaystyle \partial t}
\right)^2 =}$
    $\displaystyle \;\;\;\;\;\;\;\; (k-1)^2
\left(
\frac{\displaystyle 1}{\displayst...
...isplaystyle 1}{\displaystyle \triangle_{j-1}} \widetilde{\bf d}_{j-2}
\right)^2$ (28)

with the abbreviation $\triangle_j = t_{j+1} - t_j$. Here we can already see that we have to distinguish three cases: firstls, the control point is an inner point or the multiplicity is less than $k-1$, secondly, the control point lies at the segment connection point and thirdly, the control point is a neighbour of the segment connection point.

To find the optimal control point $\widetilde{\bf d}_r$ we have to solve

\begin{displaymath}
\frac{\displaystyle \partial F(\widetilde{\bf d}_r)}{\displa...
...rtial \widetilde{\bf d}_r}
\buildrel \hbox{!} \over = 0\;\;\;.
\end{displaymath}
(29)

After some calculations and with the following abbreviations

\begin{displaymath}
\hspace*{-13mm}
{\bf D} =
\left\{
\begin{array}{ll}
\frac{...
... \;\;\;\mbox{or} \;\;\; {\tt mult} \ne k-1
\end{array}\right.
\end{displaymath} (30)

and ${\bf D} = \widetilde{D}_1 \; \widetilde{\bf d}_r + \widetilde{\bf D}_2$ we do obtain the following formula for the new control point:
\begin{displaymath}
\widetilde{\bf d}_r = -
\frac{\displaystyle
(1-\lambda)
\su...
...^{(l)}(t))^2\;dt +
\lambda (k-1)^2 \; \widetilde{D}_1
}\;\;\;.
\end{displaymath}
(31)

Another spelling for (31) is

\begin{displaymath}
\widetilde{\bf d}_r = (1-\alpha) \; \widetilde{\bf d}_r^E +
\alpha \; \widetilde{\bf d}_r^C
\end{displaymath}
(32)

with
\begin{displaymath}
\alpha = \frac{\displaystyle \lambda (k-1)^2 \; \widetilde{D...
...a^b (N_{r,k}^{(l)}(t))^2 +
\lambda (k-1)^2 \; \widetilde{D}_1}
\end{displaymath}
(33)

where $\widetilde{\bf d}_r^E$ and $\widetilde{\bf d}_r^C$ are the new control points obtained by minimizing only the energy functional ($\lambda=0$) or only the continuity ($\lambda=1$). The incorporation of the distance tolerance (20) and the new control point is the same as described in section 2.3.

In the special case of a cubic B-spline curve with an uniform knot vector, the new control points are determined by (for $l=2$):

\begin{displaymath}
\widetilde{\bf d}_r^E =
\left\{
\begin{array}{ll}
- \fra...
...d}_{r-1}) &
\;\;\;,\;\mbox{inner points}
\end{array} \right.
\end{displaymath}

and

\begin{displaymath}
\widetilde{\bf d}_r^C =
\left\{
\begin{array}{ll}
2 \; \...
... d}_{r+2} &
\;\;\;,\;t_{r+2} \ne t_{r+1}
\end{array} \right.
\end{displaymath}