# Calculate quintic spline with Gauss Seibel

1. Sep 29, 2010

### rhythmchicago

In java, I am trying to implement algorithm found here:

The goal is to take a list of points and generate the quintic spline, then be able to get a point at any time within the dataset.

From what I can tell, given:
Xi(T) = Ai(T-Ti)^5 + Bi(T-Ti)^4 + Ci(T-Ti)^3 + Di(T-Ti)^2 + Ei(T-Ti) + Fi

The formula of A,B,C,D,E, and F become:

Ai = 1/120(T(i+1) – Ti) * (X’’’’i * T(i+1))
Bi = 1/24X’’’’i
Ci = 1/6(T(i+1) – Ti) * (X’’(i+1) – X’’i) - (T(i+1) – Ti)/36 * (X’’’’(i+1) – 2X’’’’i)
Di = 1/2P’’i
Ei = 1 / (T(i+1) – Ti) * (X(i+1) – Xi) – 1/6 * (T(i+1) – Ti) * (X’’(i+1) – 2X’’i)
+ 1/360 * (T(i+1) – Ti)^3 * (7P’’’’(i+1) + 8 X’’’’i)
Fi = Xi

From here, the author seems to do a lot of simplification, then ends up at the matrices:

[ A -B ] [ X’’ ] = [ d ]
[ C A ] [ X’’’’ ] [ 0 ]

The matrices are then supposed to be solved using the Gauss-Seibel method.

I have the following questions:
1. I think I understand Gauss-Seibel, but I don’t see how it applies to a tridiagonal array. Aren’t I only supposed to calculate pieces of the array? Then again, perhaps I don’t understand the Gauss-Seibel method.
2. The formulae entered into the matrices seem to change with the index. I don’t understand this. Can someone explain.
3. I really don’t know where to go from here in terms of a method of calculating the spline and getting a value.

If anyone can point me in the right direction in terms of a method of solving the equation/calculating the spline, it would be much appreciated.