Continuing from part 3 of this series, a formal tension parameter, T = 1-2s, was introduced. All we noted about tension was that T=0 corresponds to s = 1/2. At s=1/2, the Cardinal spline takes on the form of the more familiar Catmull-Rom spline. The Catmull-Rom spline may, however, be derived independently from the notion of Cardinal splines as the blending of two parabolas [1]. The zero-tension Cardinal Spline happens to conforms to a well-known C-1 continuous spline.

What happens as the tension parameter is moved away from zero? Can it reasonably be both positive and negative? To better understand the effect of the tension parameter on the spline, the Cardinal-spline basis matrix is

[ -s 2-s s-2 s ] [ 2s s-3 3-2s -s ] [ -s 0 s 0 ] [ 0 1 0 0 ]

Given four arbitrary knots,

[P_{1}, P_{2}, P_{3}, P_{4}]

the following vector equation applies for an aribrary point P(t) on the curve from P_{2} to P_{3}

P(t) = s(-t^{3} + 2t^{2} – t)P_{1} + s(-t^{3} + t^{2})P_{2} + (2t^{3} – 3t^{2} + 1)P_{2} + s(t^{3} – 2t^{2} + t)P_{3} + (-2t^{3} + 3t^{2})P_{3} + s(t^{3} – t^{2})P_{4}

We have already looked at T = 0, so consider T = 1, corresponding to s = 0. The equation for P(t) reduces to

(2t^{3} – 3t^{2} + 1)P_{2} + (-2t^{3} + 3t^{2})P_{3}, which can be simplified to

(3t^{2} – 2t^{3})(P_{3} – P_{2}) + P_{2}. If u = 3t^{2} – 2t^{3}, then

P(t) = (1-u)P_{2} + uP_{3}, which is the parametric equation of a line from P_{2} to P_{3}.

While u does vary from 0 to 1, the primary curve parameter is t. At t varies from 0 to 1, u is approximately sigmoid but very close to linear throughout its range. So, we can say that as T approaches 1, the spline approaches a straight-line interpolation between knots.

The following screenshot shows a four-knot example with a black line connecting the knots and the spline drawn in blue with T=1. The Degrafa Catmull-Rom spline is drawn in red, which corresponds to the Cardinal spline with zero tension. This allows a comparison of the range of fits available in the tension range from zero to one.

The natural tension range is from zero to one. Values outside this range are possible, although rarely practical. These factors are discussed in the next section of this series.

References:

[1] Salomon, D. “Computer Graphics and Geometric Modeling”, Springer Verlag, NY, 1999.

sounds like s < 0 is going to give our spline cycloid-like look. can't wait for you to make a demo, gotta try it out myself ğŸ™‚

and so it’s done: http://wonderfl.net/code/aaaa010faf0d45bfc91000fe4d61a52c2c9de185

hey, did you just kill my previous response? that sucks.

Hold that thought ğŸ™‚

Nice demo.

sorry ’bout last remark, seems like it only shows last comment before they are approved.

They were both held for moderation (for quite some time considering the time zone difference), then simultaneously approved when I got up and checked the blog this morning.

thx again for the nice demo.

regards,

– jim