# Cardinal Splines

1. Jul 22, 2007

### Gepard

Hi,

I'm trying to draw a Cardinal Spline and understand them - however I can't get my head around the formula.

Now, after lots of research I keep coming back to this formula:

Ti = a * (Pi+1 - Pi-1 )

However I don't understand how that formula can provide a tangent. In the past all the formulae I have used have been of function types where I'd put through say the X co-ordinate and it would tell me the Y co-ordinate.

Can someone please provide a better explanation as to how I use it please?

Michael

2. Jul 31, 2007

### hotvette

I think maybe you are looking for a physical interpretation of the formula and how that relates to the slope at the free end. It might help to break P into its' x & y components:

Tix = a * ( xi+1 - xi-1)
Tiy = a * ( yi+1 - yi-1)

In a parametric curve, the slope of the curve is dy/dx = (dy/ds) / (dx/ds). The formulas above represent (dy/ds) and (dx/ds). I hope this helps.

With splines, the end points are arbitrarily chosen by the person implementing them. I can freely choose to say T1 = -42 and T2 = 0.4 and have a perfectly valid spline. It doesn't really matter how I derived them. In the case of cardinal splines, they provide a special mechanism (a control point and tension parameter) as a convenient way to specify the end condition.

Last edited: Jul 31, 2007