INTERPOLATION


 BEZIER CURVE ALGORITHM
*
* To construct the cubic Bezier curves C0, ..., Cn-1 in
* parameter form, where Ci is represented by
*
* (xi(t),yi(t)) = ( a0(i) + a1(i)*t + a2(i)*t^2 + a3(i)*t^3,
* b0(i) + b1(i)*t + b2(i)*t^2 + b3(i)*t^3)
*
* for 0 <= t <= 1 as determined by the left endpoint (x(i),y(i)),
* left guidepoint (x+(i),y+(i)), right endpoint (x(i+1),y(i+1)) and
* right guidepoint (x-(i+1),y-(i+1)) for each i = 0, 1, ... , n-1;
*
* INPUT n, ( (x(i),y(i)), i = 0,...,n ),
* ( (x+(i),y+(i)), i = 0,...,n-1 ),
* ( (x-(i),y-(i)), i = 1,...,n ).
*
* OUTPUT coefficients ( a0(i), a1(i), a2(i), a3(i),
* b0(i), b1(i), b2(i), b3(i), i = 0, ... , n-1 ).


 CLAMPED CUBIC SPLINE ALGORITHM
*
* To construct the cubic spline interpolant S for the function f,
* defined at the numbers x(0) < x(1) < ... < x(n), satisfying
* S'(x(0)) = f'(x(0)) and S'(x(n)) = f'(x(n)):
*
* INPUT: n; x(0), x(1), ..., x(n); either generate A(I) = f(x(I))
* for i = 0, 1, ..., n or input A(I) for I = 0, 1, ..., n;
* FPO = f'(x(0)); FPN = f'(x(n)).
*
* OUTPUT: A(J), B(J), C(J), D(J) for J = 0, 1, ..., n - 1.
*
* NOTE: S(x) = A(J) + B(J) * ( x - x(J) ) + C(J) * ( x - x(J) )**2 +
* D(J) * ( x - x(J) )**3 for x(J) <= x < x(J + 1)


 HERMITE INTERPOLATION ALGORITHM
*
* TO OBTAIN THE COEFFICIENTS OF THE HERMITE INTERPOLATING
* POLYNOMIAL H ON THE (N+1) DISTINCT NUMBERS X(0), ..., X(N)
* FOR THE FUNCTION F:
*
* INPUT: NUMBERS X(0), X(1), ..., X(N); VALUES F(X(0)), F(X(1)),
* ..., F(X(N)) AND F'(X(0)), F'(X(1)), ..., F'(X(N)).
*
* OUTPUT: NUMBERS Q(0,0), Q(1,1), ..., Q(2N + 1,2N + 1) WHERE
*
* H(X) = Q(0,0) + Q(1,1) * ( X - X(0) ) + Q(2,2) *
* ( X - X(0) )**2 + Q(3,3) * ( X - X(0) )**2 *
* ( X - X(1) ) + Q(4,4) * ( X - X(0) )**2 *
* ( X - X(1) )**2 + ... + Q(2N + 1,2N + 1) *
* ( X - X(0) )**2 * ( X - X(1) )**2 * ... *
* ( X - X(N - 1) )**2 * (X - X(N) ).


 NATURAL CUBIC SPLINE ALGORITHM
*
* To construct the cubic spline interpolant S for the function f,
* defined at the numbers x(0) < x(1) < ... < x(n), satisfying
* S''(x(0)) = S''(x(n)) = 0:
*
* INPUT: n; x(0), x(1), ..., x(N); either generate A(I) = f(x(I))
* for I = 0, 1, ..., n or input A(I) for I = 0, 1, ..., n.
*
* OUTPUT: A(J), B(J), C(J), D(J) for J = 0, 1, ..., n - 1.
*
* NOTE: S(x) = A(J) + B(J) * ( x - x(J) ) + C(J) * ( x - x(J) )**2 +
* D(J) * ( x - x(J) )**3 for x(J) <= x < x(J + 1)


 NEVILLE'S ITERATED INTERPOLATION ALGORITHM
*
* To evaluate the interpolating polynomial P on the
* (n+1) distinct numbers x(0), ..., x(n) at the number x
* for the function f:
*
* INPUT: numbers x(0),..., x(n) as XX(0),...,XX(N);
* number x; values of f as the first column of Q
* or may be computed if function f is supplied.
*
* OUTPUT: the table Q with P(x) = Q(N+1,N+1).


 NEWTON'S INTERPOLATORY DIVIDED-DIFFERENCE FORMULA ALGORITHM
*
* To obtain the divided-difference coefficients of the interpolatory
* polynomial P on the (n+1) distinct numbers x(0), x(1), ..., x(n)
* for the function f:
*
* INPUT: numbers x(0), x(1), ..., x(n); values f(x(0)), f(x(1)), ...,
* f(x(n)) as the first column Q(0,0), Q(1,0), ..., Q(N,0) OF Q,
* or may be computed if function f is supplied.
*
* OUTPUT: the numbers Q(0,0), Q(1,1), ..., Q(N,N) where
* P(x) = Q(0,0) + Q(1,1)*(x - x(0)) + Q(2,2)*(x - x(0))*(x - x(1))
* +... + Q(N,N)*(x - x(0))*(x - x(1))*...*(x - x(N - 1)).


Back
Hosted by www.Geocities.ws

1