B-spline 38
B
B-spline a smooth curve that approximately connects two points.
Bsplines can be joined together to make a smooth curve passing close to
any num-ber of points.
For an illustration see SPLINE.
Each segment of a B-spline curve is influenced by...
More
B-spline 38
B
B-spline a smooth curve that approximately connects two points.
Bsplines can be joined together to make a smooth curve passing close to
any num-ber of points.
For an illustration see SPLINE.
Each segment of a B-spline curve is influenced by four points—the
two that it lies between, plus one more in each direction.
This makes
computation of a B-spline much quicker than computation of a cubic
spline, because every part of a cubic spline is influenced by all the
points to be joined.
To plot a B-spline defined by four points (x1
,y1
), (x2
,y2
), (x3
,y3
), and
(x4
,y4
), let t range from 0 to 1 and compute values of x and y for each t
as follows:
a = –t3
/6 + t2
/2 – t/2+1/6
b = t3
/2 – t2
+ 2/3
c = –t3
/2 + t2
/2+ t/2 + 1/6
d = t3
/6
x = ax1
+ bx2
+ cx3
+ dx4
y = ay1
+ by2
+ cy3
+ dy4
That gives you a curve that lies approximately between (x2
,y2
) and (x3
,y3
).
You can then advance by one point (letting the old x4
become the new x3
,
and so on) to plot the next segm
Less