Professional Documents
Culture Documents
ME/MF F342:
COMPUTER AIDED DESIGN
Learning Outcomes in this Segment
Draftsman
knot
A Duck (weight)
If a uniform knot vector quadratic B-spline curve is generated for 5 control points, which
of the following gives the correct knot vector?
(A) uj=[0,0,0,0,1,2,2,2,2]
(B) uj=[0,0,0,1,2,3,3,3]
(C) uj=[0,0,0,0,3,3,3,3]
(D) uj=[0,0,0,1,2,2,2,2]
n
P (u) Pi Ni ,k (u) , 0 u umax
i 0
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 )
The recursive property of B-Spline
(ui k 1 ui ) (ui k ui 1 )
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
(i)
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
What is the nature of the curve for different choices of the degree (k-
1) upto quintic?
Sketch these curves and comment on the nature of variation in the
shape of the curve.
(A) 1
(B) 2
(C) 3
(D) 4
LEVEL OF INTERPOLATION
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
Pi (u ) u 2 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 P Pi 1
1 0 i 1
For cubic B - Splines, k 3, the analogous form is
1 3 3 1 Pi 1
3 6 3 0 Pi
Pi (u )
1 3 2
6
u u u 1
3 0 3 0 Pi 1
for i [1 : n 2]
1 4 1 0 Pi 2
1 3 3 1 Pi 1 Pi 1
1 3 6 3 0 Pi P
Pi (u ) u 3 u 2 u 1
3 0 3
0 Pi 1 U [ M ]s i
Pi 1
6
0 Pi 2
1 4 1 Pi 2
Srinivasa Prakash Regalla, Professor, BITS-Pilani, Hyderabad Campus
BITS Pilani
Hyderabad Campus
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]
(A) N(4,2)
(B) N(4,3)
(C) N(3,1)
(D) N(1,3)
• Spline curves originate from flexible strips
used to create smooth curves in traditional
drafting applications. Much like Bezier
curves they are formed mathematically
from piecewise approximations of cubic
polynomial functions with zero, first and
second order continuity.
• B-Splines are one type of spline that are
perhaps the most popular in computer
graphics applications
• 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 )