Professional Documents
Culture Documents
BSpline Curves D PDF
BSpline Curves D PDF
BSpline Curves D PDF
B-Spline Curves
1. Open Uniform
Ti 0 ik
Ti i k k t n
Ti n k 1 i n [0, 0, 1, 1]
T=[0 0 1 1] if n=k=1
T=[0 0 0 1 1 1] if n=k=2 [0,0,0,1,1,1]
T=[0 0 0 1 2 2 2] if n=3, k=2
B-Spline Knot vectors
3. Non-uniform
T =[0 2 3 3 5 6 --------n+k+1]
Where n is one less than the number control
Points and k is the degree of the curve
t[i] <= t[i+1]
Basis function calculation For n=2,
k=2, Knot_vector[000111]
0 u 1 1, ti t ti 1
N i ,0 (t )
K=0 K=1 K=2 0, otherwise
N[0][0]=0 t ti t t
N i ,k (t ) N i ,k 1 (t ) i k 1 N
N[0][1]=0 ti k ti ti k 1 ti 1
N[1][0]=0 N[0][2]=(1-u) (1-u)/(1-0)
N[1][1]=(1-u)/(1-0)
N[2][0]=1 N[1][2]=(1-u)(u-0)/(1-0) +u(1-u)/(1-0)
N[2][1]=(u-0)/(1-0)
N[3][0]=0 N[2][2]=u(u-0)/(1-0)
N[3][1]=
N[4][0]=0 N[3][2]= 0
N[4][1]=0
Open Uniform BSpline Curves
t ti ti k 1 t
Ni ,k (t ) Ni ,k 1 (t )
0 u 1 ti k ti ti k 1 ti 1
Ni 1,k 1 (t )
N[2][1]=(2-u)/(2-1)
N[3][0]=1 N[2][2]=(2-u)(u-0)/(2-0) +(u- -3u+4
1)/(2-u)/(2-1)=(-3u*u+8u-
4)/2
N[3][1]= (u-1)/(2-1)
N[4][0]=0 N[3][2]= (u-1)(u-1)/(2-1) 2(u-1)
N[4][1]=0
Open Uniform Basis functions
CP x y Z
1 0 0 0
2 3 9 0
3 6 3 0
4 9 6 0
1 0 0 0
2 3 9 0 t=1.5, k =3
3 6 3 0
4 6 0 0
n
P(t ) N i ,k (t ) Pi , tmin t tmax
i 0
P(1.5) (2 1.5) / 2)P1 (3 *1.5 8 *1.5 4) / 2P2 ((1.5 1) )P3
2 2 2
N[2][1]=u
N[3][0]=0 N[2][2]=u(u-0)/(1-0)
N[3][1]= 0
N[4][0]=0 N[3][2]= 0
N[4][1]=0
t ti ti k 1 t
Ni ,k (t ) Ni ,k 1 (t ) Ni 1,k 1 (t )
N[5][0]=0
ti k ti ti k 1 ti 1
1 u 2
K=0 K=1 K=2
N[0][0]=0
N[0][1]=0
N[1][0]=0 N[0][2]=0
N[1][1]=0
N[2][0]=0 N[1][2]=0
N[2][1]=0
N[3][0]=0 N[2][2]=(3-u)/(2)*(3-u)/(3-1)
N[3][1]= (3-u)/(3-1)
N[4][0]=1 N[3][2]= ((3-u)/2)(u-1)/(3-1)+(u-1)/2*(3-
u)/(3-1)
N[4][1]=(u-1)/(3-1)
N[5][0]=0 N[4][2]= (u-1)/2 (u-1)/2
N[5][1]=0
t ti ti k 1 t
N[6][0]=0 Ni ,k (t ) Ni ,k 1 (t ) Ni 1,k 1 (t )
ti k ti ti k 1 ti 1
Basis function for n=4, k+1 =3
Knot Vector = [0 0 0 1 2 3 3 3] 0 u 1
K=0 K=1 K=2
N[0][0]=0
N[0][1]=0
N[4][0]=0 N[3][2]= 0
N[4][1]=0
N[5][0]=0 N[4][2]=0
N[5][1]=0
N[6][0]=0
Basis function for n=4, k+1 =3
Knot Vector = [0 0 0 1 2 3 3 3]
1 u 2
K=0 K=1 K=2
N[0][0]=0
N[0][1]=0
N[1][0]=0 N[0][2]= ]= 0
N[1][1]=0
N[2][0]=0 N[1][2]= ]= (2-u)(2-u)/(2-0)
N[2][1]= (2-u)
N[3][0]=1 N[2][2]= (2-u)(u-0)/2+ (u-1)(3-u)/(3-1)
N[3][1]= (u-1)/(2-
1)
N[4][0]=0 N[3][2]= (u-1)(u-1)/(3-1)
N[4][1]=0
N[5][0]=0 N[4][2]=0
N[5][1]=0
Basis function for n=4, k+1 =3
Knot Vector = [0 0 0 1 2 3 3 3] 2u3
K=0 K=1 K=2
N[0][0]=0
N[0][1]=0
N[1][0]=0 N[0][2]= ]= 0
N[1][1]=0
N[2][0]=0 N[1][2]= ]= 0
N[2][1]= 0
N[3][0]=0 N[2][2]= (3-u)(3-u)/2
N[3][1]= (3-u)/(3- 2)
N[4][0]=1 N[3][2]= (3-u)(u-1)/(3-1)+(u-2)*(3-
u)/(3-2) =((-3*u*u)+14*u-15)/2
N[4][1]=(u-2)/(3-2)
N[5][0]=0 N[4][2]=(u-2)(u-2)/(3-2)
N[5][1]=0
Find points on open uniform quadratic B-Spline
Curves for given Control Points(CP)
n
P(t ) N i , k (t ) Pi , t min t t max
i 0
CP x y Z
1 0 0 0
2 .409 1.378 0
3 3 2.874 0
4 5.591 1.377 0
u=.2, k =2, u=1.5, k =2
5 6 0
U= .62 and u= 1.38
n
P(t ) N i ,k (t ) Pi , t min t t max
i 0
P(.2) (1 0.2) )P0 .2(4 3 *.2 ) / 2P2 (.2 / 2)P2
2 2
P(2.5) (3 3.5)2 / 2)P1 (3 * 2.52 14 * 2.5 15) / 2P2 ((2.5 2)2 )P
N[4][0]=0 N[3][2]= 0
N[4][1]=0
N[5][0]=0 N[4][2]=0
N[5][1]=0
N[6][0]=0
1 u 2
K=0 K=1 K=2
N[0][0]=0
N[0][1]=0
N[1][0]=0 N[0][2]= 0
N[1][1]= 0
N[2][0]=0 N[1][2]= (2-u) *(2-u)/(2-0) = (2-u) * (2-u)/2
N[2][1]=(2-u)
N[3][0]=1 N[2][2]= (2-u)(u-0)/(2-0) +( u-1)(3-u)/(3-1)
= ( -2u*u+6u-3)/2
N[3][1]=(u-1)/(2-1)
N[5][0]=0 N[4][2]=0
N[5][1]=0
N[6][0]=0
2u3
K=0 K=1 K=2
N[0][0]=0
N[0][1]=0
N[1][0]=0 N[0][2] =o
N[1][1]= 0
N[2][0]=0 N[11][2] =0
N[2][1]=0
N[3][0]=0
N[3][1]=(3-u)/(3-2)
N[4][0]=1
N[3][1]=(u-2)/(3-2)
N[5][0]=0
N[5][1]=0
N[6][0]=0
3u 4
K=0 K=1 K=2
N[0][0]=0
N[0][1]=0
N[1][0]=0 N[0][2]= 0
N[1][1]= 0
N[2][0]=0 N[0][2]= 0
N[2][1]=(2-u)
N[3][0]=0 N[0][2]= 0
N[3][1]=0
N[4][0]=0 N[0][2]= (4-u)(4-u)/2
N[4[[1] =(4-u]
N[5][0]=1 N[0][2]= (4-u)(u-2)/(4-2) +(u-3)(4-u)/(4-
3)
N[5][1]=(u-3)
N[6][0]=0 N[0][2]= (3-u)*(3-u)
BSpline Curves
Knot Vector = [0 0 0 12 3 4 4 4]
B-Spline Blending functions
Find curvature at u= 0.6 for a cubic open
Uniform BSpline Curves defined by the
following four control points((0,0),
(100/3,50/3), (116.667, 37.5), (100,50)).
N[0][0] = (1-u)3
N[1][2] = 3 u(1-u)2
N[2][3] = 3 u2(1-u)
N[3][3] = u3
Derivatives at u= 0.6
N’[0][0] = -3(1-u)2 =-.48
N’[1][2]=-6u(1-u)+ 3(1-u)2=3(1-4u+3u2)=-.96
N’[2][3] = 6 u(1-u)- 3u2= 3u(2-3u) =.36
N’[3][3] = 3u2 = 1.08
K= 5.027 x10 -3
Find curvature at u= 0.6 for a cubic open
Uniform BSpline Curves defined by the
following four control points((0,0),
(100/3,50/3), (116.667/2, 37.5), (100,50)).
(97,51.5)
(40,-20) K=3.0197x10-3
BSpline Curves
n=5, k =3,t=(0000123333), 0<=u<1
K=0 K=1 K=2 K=3
N[0][0]=0
N[0][1]=0
N[1][0]=0 N[0][2]=0
N[1][1]=0 N[0][3]= (1-u)(1-u)(1-u)
N[2][0]=0 N[1][2]= (1-u)(1-u)
N[2][1]= 0 N[1][3]= 0
N[3][0]=0 N[2][2]=0
N[3][1] =0 N[2][3]= (3-u)(3-u)(3-u)/6
N[4][0]=0 N[3][2]= (3-u)(3-u)/2
N[4][1]=3-u N[3][3]= t/6(3-u)(3-u)+(3-u)/2((u-
1))(3-u)/2+(3-u)(u-2))
N[5][0]=1 N[4][2]=(u-1)(3-
u)/2+(3-u)(u-2)
N[5][1]=u-2 N[4][3]=(u-1)/2((u-1)(3-u)/2+(3-
u)(u-2))+(3-u)(u-2)(u-2)
N[6][0]=0 N[5][2]= (u-2)(u-2)
N[5][3] (u-2)(u-2)(u-2)
Open uniform B-Spline cubic basis
functions for seven control points having
knot_vector(0 0 0 0 1 2 3 4 4 4 4)
Cubic B-Spline Curves for 7 control points
Uniform BSpline Curves
k u n 1
P(t ) (87.5,87.5)
2u3
K=0 K=1 K=2
N[0][0]=0
N[0][1]=0
N[1][0]=0 N[0][2] =(3-u) (3-u)/(3-1)
N[1][1]= (3-u)
N[2][0]=1 N[11][2] =(3-u)(u-1)/(3-1) +(u-2)(4-
u)/(4-2)
N[2][1]=(u-2)
N[3][0]=0 N[2][2]= (u-2) (u-2)/(4-2)
N[3][1]=0
N[4][0]=0
N[3][1]=0
N[5][0]=0
N[5][1]=0
Uniform B-Spline Curves
u x y
3 3.03 6.514
3.25 3.66 6.51
3.5 4.5 5.875
3.75 5.13 5.216
4.0 5.97 4.515
k = order = degree +1
k = order = degree +1
u x y
3 3.03 6.514
3.25 3.66 6.51
3.5 4.5 5.875
3.75 5.13 5.216
4.0 5.97 4.515
Uniform B_Spline with another control pts
u x y
3 1.717 8.383
3.25 2.973 9.191
3.5 5.0 9.583
3.75 6.544 9.363
4.0 8.283 8.383
Non-Uniform B-Spline Example 5-14(Fig5-50(a)
Quadratic Uniform and non-uniform B-Spline
P(2.5)=(2,4.87) P(4.25)=(5.518,5.185)
4th order Uniform B-Spline Curves for knot=[0 1 2 3 4 5 6 7 8 9]
Bézier Curve
Clamped B-Spline
(degree 10!)
Curve
B-Spline Curves Important Properties
2. Equality m = n + k + 1 must be satisfied.
3. Clamped B-spline curve C(u) passes
through the two end control points P0 and
Pn.
4. Strong Convex Hull Property: A B-
spline curve is contained in the convex
hull of its control polyline. More
specifically, if u is in knot span [t,
ti+1), then C(u) is in the convex hull of
control points Pi-k , Pi-k+1, ..., Pi.
B-Spline Curves Important Properties
t13 to t1 t18 to t2
t0 to t4 t5 t6 and t7 t8 t9 to t11 t12 t17
6 2
a b
Closed quadratic Periodic B-Spline
If N is not
square matrix
Techniques to find parametric value of
input points
1. Proportional Technique
2. Chord length approximation
3. Centripetal
0 u 1 1 u 2
N[2][2]= (3-u)(3-u)/2
N[3][2]= (3-u)(u-1)/(3-1)+(u-
2)*(3-u)/(3-2)
N[4][2]=(u-2)(u-2)/(3-2)
Basis functions
u=0 u=0.918 u=1.5
N 0, 2 (u) 1 N 0, 2 (u) 0.007 N1, 2 (u) 0.125
N1, 2 (u) 0 N1, 2 (u) 0.571
N1, 2 (u) 0.75
N 2, 2 (u) 0.422
N 2, 2 (u) 0 N3, 2 (u) 0.125
u=2.07 u=3
N 2, 2 (u) 0.422 N 2, 2 (u) 0
N3, 2 (u) 0.571 N3, 2 (u) 0
N 4, 2 (u) 0.007 N 4, 2 (u) 1
+ .571x1+ .422x2+ = 1.5
.125x1+.75x2+.125x3= 3
.422x2+.571x3=4.5
[x] =[0, 0.4218 , 2.983 , 5.6757 , 6]
+ .571y1+ .422y2+ = 2
.125y1+.75y2+.125y3= 2.5
.422y2+.571y3=2
[y] =[0, 1.379 , 2.874 , 1.379 , 0]
Verify the third input point which is at u=1.5
P(1.5) = N[0][2] P[0] + N[1][2]P[1] +
N[2][2]p[2] + P[4]N[4][2]
= (3.0025, 2.500)
N[1][2]= ]= (2-u)(2-
Find curvature at u=1.5 u)/(2-0)
N[2][2]= (2-u)(t-0)/2+ (u-
1)(3-u)/(3-1)
N[3][2]= (u-1)(u-1)/(3-1)
B-Spline Curve Fit by four control points
N=3, k=2
Knot vector=[0 0 0 1 2 2 2]
O<=u<1 1<=u<2
N[0][2]=(1-u) (1-u)/(1-0) N[1][2]=0 +(2-u)(2-u)/(2-0)
1 0.15 0 0 0
0 0.662 0.5 0.188 0
0 0.188 0.5 0.662 0
0 0 0 0 1
B-Spline Curve Fit
N T D N T N Bi
1 0.15 0 0 0
0 0.662 0.5 0.188 0
0 0.188 0.5 0.662 0
0 0 0 0 1
1 0.15 0 0 0
0 0.662 0.5 0.188 0
0 0.188 0.5 0.662 0 Bi
0 0 0 0 1
B-Spline Curve Fit
B1x B1y 0.788 2.4139
B 2 x B2y 5.212 2.4139
0.0
0.788 2.414
Bi
5.213 2.414
6.0 0.0
B-Spline Curve Fit
B-Spline Curve Fit Question
n
P(t ) Ri ,k (t ) Pi , tmin t tmax
i 0
wi N i ,k (t )
Ri ,k (t ) n
N
j 0
j j ,k (t )
Non-Uniform third order Rational
Bspline basis fns for five control ponts
having weights for B3 (0, 0.25, 1.0, 5.0)
and other vertices have unit weight
Find points on non-uniform third order Rational B-
Spline curves at parmetric value 1.5. The curve is
defined by the five control points(B1(0 0), B2(1,2),
B3(2.5,0), B4(4,2), b5(5,0). The vertex B3 have weights
(0, 0.25, 1.0, 5.0) respectively other vertices have unit
weight.
Knot vector[0 0 0 1 2 3 3 3]
Final B-Spline curves
K=6 and n=8
Non-Uniform third order Rational B-Spline curves for
three control points having weights for B2 (0, 0.25, 1.0,
5.0) and others having weight 1.0, indicate straight line,
elliptical , parabolic and hyperbolic curves
2 2
P(t ) N i , 2 (t ) Pi wi / N i , 2 (t ) wi , tmin t tmax
i 0 i 0
2 2
P(t ) Pi N i , 2 (t ) wi / N i , 2 (t ) wi , 0 t 1
i 0 i 0
n n .
P(t ) N i ,k (t ) Pi wi / N i ,k (t ) wi , tmin t tmax
i 0 i 0
. .72)(.8536)
P(1.5) (145.72,145
P(1.5) (170.71,170.71)
.
U=1.5 1<=u<2 [000112233444]
K=0 K=1 K=2
N[0][0]=0
N[0][1]=0
N[1][0]=0 N[0][2]=0
N[1][1]=0
N[2][0]=0 N[1][2]=0
N[2][1]=0
N[3][0]=0 N[2][2]=(2-u)(2-u)/(2-1)
N[3][1]= (2-u)/(2-
1)
N[4][0]=1 N[3][2]= (2-u)(u-1)/(2-1)+(u-
1)(2-u)/(2-1)
N[4][1]=(u-1)/(2-
1)
N[5][0]=0 N[4][2]= (u-1)(u-1)/(2-1)
N[5][1]=0
N[6][0]=0
Derivatives of pth degree B-Spline
Curves
n
P' (u ) N 'i , p (u ) Pi , umin u umax
i 0
n
P' ' (u ) N ' 'i , p (u ) Pi , tmin u tmax
i 0
Derivatives of pth degree B-Spline
Curves
p p
N 'i , p (t ) N i , p 1 (t ) N i 1, p 1 (t )
ui p ti ui p 1 ui 1
Derivatives of Cubic B-Spline Curves
Curvature for B-Spline curves
1 0 0 0
2 3 9 0
3 6 3 0
4 9 6 0
n
P(t ) N i , k (t ) Pi , t min t t max
i 0
n
P' (t ) N 'i ,k (t ) Pi , tmin t tmax
i 0
P (.2) (15,30)
tt
Curvature for B-Spline curves
P (.2) (15,30)
tt
Find point, first second derivatives and curvature
for a uadratic open uniform B-Spline Curves for
given Control Points(CP) at parametric value
t=1.5.
CP x y Z
u=1.5, k =2
1 0 0 0
2 3 9 0
3 6 3 0
4 6 0 0
n
P(t ) N i ,k (t ) Pi , tmin t tmax
i 0
P(1.5) (2 1.5) / 2)P1 (3 *1.5 8 *1.5 4) / 2P2 ((1.5 1) )P3
2 2 2
P' (1.5) (2 1.5))P1 (6 *1.5 8 *1.5 4) / 2P2 (2 * (1.5 1))P3
Ntt tt
P (1.5) (3,0)
tt
K=0.076
Find curvature on quadratic uniform B-Spline
Curves for given Control Points(CP) at parametric
value t=3.5
n
P(t ) N i , k (t ) Pi , t min t t max
i 0
CP x y Z
1 0 0 0
2 3 9 0 t=3.5, k =3
3 6 3 0
4 6 0 0
n
P' (t ) N 'i ,k (t ) Pi , tmin t tmax
i 0
P' (1.5) (2 1.5))P1 (6 *1.5 8 *1.5 4) / 2P2 (2 * (1.5 1))P3
(1.5,.6)
n
P' (t ) N 'i ,k (t ) Pi , tmin t tmax
i 0
P (3.5) (3,3)
tt
CP x y Z
1 0 0 0
2 0 100 0 t=3.5, k =3
3 100 100 0
4 100 0 0
P (3.5) (0,100)
tt
wi N i ,k (t ) f1 (t )
Ri ,k (t ) n
N
f 2 (t )
j j ,k (t )
j 0
n
P' (t ) R'i ,k (t ) Pi , tmin t tmax
i 0
Derivatives of NURBS curves
f '1 (t ) * f 2 (t ) f 2 ' (t ) * f1 (t )
R'i ,k (t )
f 2 (t ) * f 2 (t )
Derivatives of NURBS curves
• as a genuine generalizations of non-
rational B-spline forms
as well as rational and non-rational Bezier
curves and surfaces
• Offer a common mathematical form for
representing both standard
analytic shapes (conics, quadratics,
surface of revolution, etc) and
free-from curves and surfaces precisely. B-
splines can only
approximate conic curves.
Advantages of NURBS Curves
• Provide the flexibility to design a large
variety of shapes by using
control points and weights. increasing the
weights has the effect of
drawing a curve toward the control point.
• Have a powerful tool kit (knot
insertion/refinement/removal, degree
elevation, splitting, etc.
• Invariant under scaling, rotation, translation,
and projections.
• Reasonably fast and computationally stable.
• Clear geometric interpretations
Advantages of NURBS curves
• Serve as a genuine generalizations of
non-rational B-spline forms
as well as rational and non-rational Bezier
curves and surfaces
• Offer a common mathematical form for
representing both standard
analytic shapes (conics, quadratics,
surface of revolution, etc) and
free-from curves and surfaces precisely. B-
splines can only
approximate conic curves.
Advantages of NURBS curves
Advantages of NURBS curves
Advantages of NURBS curves
NURBS curves
NURBS curves representing circle
NURBS curves degree 3, degree 2
K=3
K=2
NURBS curve with degree 2
weight for point_2 2, 5
weight for point_2 10
Advantages of NURBS curves
Weight of p2 =0
Weight of p2 =.25
Weight of p2 =1
Advantages of NURBS curves
Weight of p2 =0
Weight of p2 =.25
Weight of p2 =1
Advantages of NURBS curves
Weight of p2 =5
NURBS representing uniform curve
NURBS Close to half circle
Weight of p2 is 0.707
NURBS
NURBS represented Half circle
Rational Uniform B-Spline
u x y
3 1.234 2.653
3.25 2.138 3.803
3.5 3.789 4.947
3.75 4.949 5.032
4.0 5.97 4.516
Rational Uniform B-Spline
u x y
3 1.234 2.653
3.25 2.138 3.803
3.5 3.789 4.947
3.75 4.949 5.032
4.0 5.97 4.516
Rational Uniform B-Spline have knot(0 1 2 3 4 5 6 7 )
u x y
3 0.6999 3.414
3.25 1.737 5.3690
3.5 4.211 8.07
3.75 6.313 9.032
4.0 8.383 8.383
Different between Bezier and B-Spline curves
Sr Bezier curve B-Spline curves
No.
1. Bezier curve is global in nature B-Spline curves are local in
nature
2. Degree of curves is one less than the Degree will be any valyes
number of contro points less than the number of
control poinrs.
3. It is a single curves It is a composite curves