Bored

K.I.L.E.R

Retarded moron
Veteran
I needed to use splines, so I decided to derive them all again, most interesting being the B-Spline.

B-Spline equation:
p = x.A.B

p = control points
x = parameterised vector
A = matrix of conditions
B = control point definitions

A defined:
c0 = current point
c1 = point after
c2 = sum of all points
c3 = tangent

B defined:
r0 = Simpson's rule for 1st half of curve
r1 = end point tangent
r2 = Simpson's rule for 2nd half of curve
r3 = next half of curve's tangent at start point

A =
[1,0,0,0]
[0,1,0,0]
[1,1,1,1]
[0,1,2,3]

B =
[1/6,2/3,1/6,0]
[-1/2,0,1/2,0]
[0,1/6,2/3,1/6]
[0,-1/2,0,1/2]

Common factor of B is 1/6.

invert(A) * b =
[1/6,2/3,1/6,0]
[-1/2,0,1/2,0]
[1/2,-1,1/2,0]
[-1/6,1/2,-1/2,1/6]

mul * 6:
[1,4,1,0]
[-3,0,3,0]
[3,-6,3,0]
[-1,3,-3,1]

http://en.wikipedia.org/wiki/B-spline#Uniform_cubic_B-splines

Whatever you do, do not ask how I interpreted it. I had been working, creating my own splines for various purposes and when I came back to the computer graphics usage of splines, I went through it again and seen things differently this time around. I have part of a book, in which I've scribbled in dedicated to deriving higher order spline methods.

It seems like people these days just use NURBS and ignore everything else.
 
Kiler,
Why do you have a read through Jim Blinn's articles which are titled something like "How many different cubic curve are there?".
 
Back
Top