Xref: utzoo comp.graphics:1394 sci.math:2514
Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!umd5!brl-adm!husc6!psuvax1!burdvax!sdcrdcf!trwrb!simpson
From: simpson@trwrb.UUCP (Scott Simpson)
Newsgroups: comp.graphics,sci.math
Subject: Spline Algorithms (for the mathematically inclined)
Keywords: Algorithms, Splines
Message-ID: <4090@trwrb.UUCP>
Date: 16 Dec 87 02:45:56 GMT
Organization: TRW SDS, Redondo Beach, CA
Lines: 50

I am trying to get a simple spline algorithm and am having a heck of a time.
I purchased the book "Computer Graphics" by Donald Hearn and M. Pauline Baker,
Prentice-Hall 1986 because I saw they had a spline algorithm in it.  
Unfortunately, I have come to the conclusion their spline equation is wrong.
The computer seems to agree with me when I test it.  The equation they give 
for the blending function is the recursive equation
			
		   {	1      if u  <= u < u
	N   (u) =  {		   k         k+1
	 k,1       {
		   {    0      otherwise


		      u-u		    u   - u
		         k		     k+t
	N   (u) =  --------- N     (u)  +   ---------- N       (u)
	 k,t       u    - u   k,t-1	    u   - u     k+1,t-1
		    k+t-1  k                 k+t  k+1

This is a parametric equation for a spline.  There are n+1 control points
and u varies from 0 to n-t+2.  We set up n+t subintervals.  If the denominators
evaluate to 0, the term is assigned 0.
	The book has some pictures of 5 blending functions that seems to make
sense.  In the first one, N   (u), the blending function with u equal zero
			   0,3
has the value 1, and the rest of the pictures have the value 0.  This means
that we should get the first point at u=0 if we combine all the blending 
functions.  However, the equation above never yields the value 1 at u=0
as it should.  If we substitute N   (0) in the above equation, we get
				 0,3
0 rather than 1.  Here is why: the first term of N   (0) is
						  0,3
zero because the numerator u-u = u-u = 0.  The second term is also zero
			      k     0
since N   (0) is zero.  The reason N   (0) is zero is because it expands
       1,2              	    1,2
into a function with the two "N" terms N   (0) and N   (0).  Now notice
					1,1         2,1
that we must go to ending condition of the recursion.  This ending condition
will only be 1 if k=0, which it is not in either of these two "N" terms.
Consequently, N   (0) always yields zero.  Do any spline experts out there
	       0,3
have a fix?  I have perused many spline books and papers and I am not
making any headway.  I'm not a math expert so please don't inundate me
with theory.
-- 
		Scott Simpson
		TRW Space and Defense Sector
		...{decvax,ihnp4,ucbvax}!trwrb!simpson	(UUCP)
		trwrb!simpson@trwind.trw.com		(ARPA)