Beruflich Dokumente
Kultur Dokumente
M2-6: Geometric
Modeling of Synthetic
Curves: B-spline Curve
BITS Pilani Dr. Srinivasa Prakash Regalla
Hyderabad Campus Department of Mechanical Engineering
Learning OBJECTIVES
Draftsman
knot
A Duck (weight)
N
i 0
i ,k (u ) 1, for any value of u.
N i ,k 1 (u ) N i 1,k 1 (u )
N i ,k (u ) (u ui ) (ui k u )
(ui k 1 ui ) (ui k ui 1 )
The recursive property of B-Spline
where
1, ui u ui 1
N i ,1 This is a unit step function.
0, otherwise
0 anything
Choose 0, that is if denominators become zero.
0 0
Here ui are the parametric knots or knot value s.
THE RECURSIVE AND NON-RECURSIVE PARTS OF BASIS FUNCTION EQUATIONS
Consider a cubic (k-1=3) B-Spline for five control points, (n+1)=5:
N i ,k 1 (u ) N i 1,k 1 (u )
P(u)=P0N0,4(u)+P1N1,4(u)+P2N2,4(u)+P3N3,4(u)+P4N4,4(u) N i ,k (u ) (u ui ) (ui k u )
(ui k 1 ui ) (ui k ui 1 )
N0,4(u) N1,4(u) N2,4(u) N3,4(u) N4,4(u) where
1, ui u ui 1
N i ,1
0, otherwise
n 1 1; k 1 n 0; k 1;
n k 1 2; 0 j 1; n k 2 1; 0 u 1; u j [0,1]
0
P(u ) Pi N i ,1 (u ) P0 N 0,1 (u ) P0 , 0 u 1
i 0
(ii)
n 1 2; k 1max n 1; k 2;
n k 1 4; 0 j 3; n k 2 1; 0 u 1; u j [0,0,1,1]
1
P(u ) Pi N i , 2 (u ) P0 N 0,1 (u ) P1 N1,1 (u ) P0 u ( P1 P0 ), 0 u 1
i 0
Answer: (k) multiplicity of control points is required. For example, for k-1=2,
quadratic curve, it is as follows.
Pi (u ) 1 u Pi 2u 2 2u 1 Pi 1 u 2 Pi 2
1
2
2
0 u 1
1 2 1 Pi 1
1 2
2
Pi (u ) u u 1 2 2 0 Pi for i [1 : n 1]
1 1 0 Pi 1
1 2 1 Pi 1 Pi 1
Pi (u ) u 2 u 1 2 2 0 Pi U [ M ]s Pi
1
2 1 1 0 Pi 1 Pi 1
For cubic B - Splines, k 3, the analogous form is
1 3 3
1 Pi 1
3 6 30 Pi
6
1 3 2
Pi (u ) u u u 1
3 0 0 Pi 1
3
for i [1 : n 2]
1 4 0 Pi 2
1
1 3 3 1 Pi 1 Pi 1
P
1 3 6 3 0 Pi
Pi (u ) u u u 1
3 2
6
3 0
3 0 Pi 1 U [ M ] s
i
Pi 1
1 4 1 0 i 2
P Pi 2
Srinivasa Prakash Regalla, Professor, BITS-Pilani, Hyderabad Campus
PERIODIC OR CLOSED
B-SPLINE CURVES
Range of u:
0j(n+1) 0j4; 0u(n+1) 0u4
Knot vector:
uj = j [uj]=[0,1,2,3,4]
0 u
1 2 0 3
(n+1)=2 n=1=(k-1)
(n+1)=3 n=2=(k-1)
linear; k=2; uj = [0 1 2]
quadratic; k=3; uj = [0 1 2 3]
Canonical function is
2/3 N0,k=N0,4
0 4
(n+1)=4 n=3=(k-1)
cubic; k=4; uj = [0 1 2 3 4]
• Closed curves can be created by making the first and last points the
same, although continuity will not be maintained automatically.
Courtesy: http://astronomy.swin.edu.au/~pbourke/curves/spline/
• For example in the following the spline on the left
has control points starting and ending at the origin.
The curve on the right has control points on the
same square but the start and end control point is
along the bottom edge and the slope of the first two
and last two control points is the same.
Courtesy: http://astronomy.swin.edu.au/~pbourke/curves/spline/
• the curve always passes through the first
and last point. The following has the same
control points as for the curve on the right
above but for increasing values of the
degree, k-1.
h N
i 0
i i ,k (u )
If we substitute h i 1, Ri ,k (u ) N i ,k (u )
Srinivasa Prakash Regalla, Professor, BITS-Pilani, Hyderabad Campus
n
P (u ) Pi Ri ,k (u ), 0 u umax
i 0
h N
i 0
i i ,k (u )