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

The Algorithm

We can now build an automatic fairing algorithm for fairing B-spline curves with the results of the previous sections:
  1. Compute the ranking-numbers $z_i \; ; \; 0 \le i \le n \;$.
  2. Find $z_r = \max \{ z_i \; : \: 0 \le i \le n \} \;$.
  3. Compute the new location $\widetilde{\mbox{\bf d}}_r$ (resp. $\widetilde{\mbox{\bf d}}_r^{\;\ast}$ satisfying the $\delta$-distance constraint).
  4. If a suitable criterion to stop is fulfilled, then exit, else goto step 1.

There are two criteria to stop:

-
The ranking-numbers are less than a certain value.
-
The number of iterations of the fairing algorithm is restricted.

If the number of control points is very large the calculation of the ranking-list is the most time-consuming part. A faster strategy to get a smooth curve is to change more than one control point from the beginning of the ranking-list. The list is then rebuild and the process is repeated again.