next up previous
Next: dd_splines Up: dd_splines Previous: dd_splines

8. Other possible end conditions

Consider cubic spline curves that interpolate given data points. As we shall discuss below, you can specify two additional vector conditions. Before, these conditions were that the second derivative be zero at each end. Instead, we could make other requirements. One possibility would be to specify the velocity vector at each end, i.e., to specify that $ P'(0) =$   v$ $ and to specify that $ P'(n) =$   w$ $ for specific constant vectors    v$ ,$w$ $, instead of requiring that the second derivative be zero at each end. These are called ``clamped'' end conditions, because they force the curve to have a certain tangent direction at each end, as if they were held with a clamp. Since the ends are twisted by being clamped, we can no longer assume that the ends are relaxed.



Analysis of the clamped case.

We can no longer take $ B_0 = S_0 $ and $ B_n = S_n $, since these choices are what result in having the second derivatives be 0 at each end. Therefore there are $ n+1
$ points $ B_i $ for which to solve. We need $ n+1
$ equations involving points. For $ n-1 $ of them, we can just use

$ B_{i-1} + 4 B_i + B_{i+1} = 6 S_i $, as before (but now for $ i = 1 $ and $ i = n-1 $ as well). For the first end condition, use the first derivative property of Bézier curves: $ P'(0) = 3(P_1 - P_0) $, which here is $ 3([
{\frac 2 3} B_0 + {\frac 1 3} B_1] - S_0) $ $ = $ $ 2 B_0
+ B_1 - 3 S_0 $. This quantity is to equal    v$ $. Therefore an equation is $ 2 B_0 + B_1 = 3 S_0 +$   v$ $. Similarly, at the other end an equation is $ B_{n-1} + 2
B_n = 3 S_n -$   w$ $. In matrix form, the equations look like this (illustrated with $ n=4 $):

$ \left[\begin{array}{ccccc}2&1&0&0&0\\  1&4&1&0&0\\  0&1&4&1&0\\
0&0&1&4&1\\ ...
...t[\begin{array}{c}B _ 0\\  B _ 1\\  B _ 2\\
B _ 3\\  B _ 4\end{array}\right] $ $ = $ $ \left[\begin{array}{c} (3 S _ 0 + \mbox{\bf v})\\
6 S _ 1\\  6 S _ 2\\  6 S _ 3\\  (3 S _ 4 - \mbox{\bf w})\end{array}\right] $

The two extra conditions can be used other ways. If the first and last data points are the same, the two conditions can be used to equate the first derivatives of the two ends and also the second derivatives, so that a ``periodic spline curve'' is obtained. Another possibility is to require the third derivative to be continuous at $ S_1 $ and $ S_{n-1} $.




next up previous
Next: dd_splines Up: dd_splines Previous: dd_splines
Kirby A. Baker 2002-03-01