Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Computer Graphics
Spline
A long flexible strips of metal used by
draftspersons to lay out the surfaces of
airplanes, cars and ships
Ducks weights attached to the splines
were used to pull the spline in different
directions
The metal splines had second order
continuity
Computer Graphics
Lecture 14
Curves and Surfaces II
10/10/2008
Computer Graphics
Lecture 5
Computer Graphics
B-splines
Local control
10/10/2008
Lecture 5
Computer Graphics
Computer Graphics
Basis Functions
Generating a curve
X(t)
12
Opposite we see an
example of a shape to be
generated.
knots
Lecture 5
t
10/10/2008
Lecture 5
Computer Graphics
Computer Graphics
Cubic B-Splines
ti t t i +1
for
Q (i) = ( xi 3 , ... , xi )
where :
1 3 3
1 3 6 3
M=
3
6 3 0
4
1
1
1
0
,
0
0
t T = (t ti )3 , (t ti ) 2 , t ti ,1
10/10/2008
t : knots,
i
3i
Lecture 5
Computer Graphics
Lecture 5
t
m+1
Computer Graphics
6
3
10/10/2008
Knot.
Control point.
domain, t3 t t10
t
m+1
10/10/2008
Computer Graphics
Lecture 5
10
Computer Graphics
Knot.
Control point.
P1
Knot.
Control point.
P1
P3
P3
P4
Q3
P0
10/10/2008
Q4
P2
P2
Lecture 5
11
10/10/2008
Lecture 5
12
Computer Graphics
B-Spline :
A more general definition
10/10/2008
p(t ) = Pi Bi , n (t )
Computer Graphics
i =0
1, t t < t i +1
Bi ,1 (t ) = i
0, otherwise
t ti
t t
Bi , k (t ) =
Bi ,k 1 (t ) + i + k
Bi +1, k 1 (t )
ti + k Lecture
ti + k 1 ti
1 ti5
13
Computer Graphics
Lecture 5
14
http://www.ibiblio.org/e-notes/Splines/Basis.htm
10/10/2008
Computer Graphics
Order = 3, degree = 2
Order = 4, degree = 3
C1 continuous
C2 continuous
10/10/2008
Lecture 5
15
http://www.ibiblio.org/e-notes/Splines/Basis.htm
Computer Graphics
Lecture 5
16
http://www.ibiblio.org/e-notes/Splines/Basis.htm
10/10/2008
Computer Graphics
Non-uniform B-splines.
Blending functions no longer the same for each interval.
Advantages
Continuity at selected control points can be reduced to
C1 or lower allows us to interpolate a control point
without side-effects.
Can interpolate start and end points.
Easy to add extra knots and control points.
Good for shape modelling !
Non-uniform B-splines
10/10/2008
Computer Graphics
Computer Graphics
P0
P2
Control points
Overlapping the control points to make it pass
through a specific point
Knots
Changing the continuity by increasing the
multiplicity at some knot (non-uniform bsplines)
P1
10/10/2008
Computer Graphics
Lecture 5
20
Computer Graphics
P3
P2
P4
P3
P1
10/10/2008
P1=P2
Lecture 5
21
Computer Graphics
10/10/2008
P4
Lecture 5
22
Computer Graphics
P1=P2=P3
i +1
i ,1
10/10/2008
Lecture 5
23
10/10/2008
0, otherwise
t ti
t t
Bi , k 1 (t ) + i + k
Bi +1, k 1 (t ) 24
LectureB5i , k (t ) =
t i + k 1 ti
ti + k 1 ti
Computer Graphics
Computer Graphics
Computer Graphics
Knot multiplicity
Double knot at 5,
knot ={0,1,2,3,4,5,5,6,7,8,9,10,11,12}
6 segments, continuity = 1
Computer Graphics
Knot multiplicity
Consider the uniform cubic (n=4) B-spline curve,
t={0,1, ,13}, m=9 , n=4, 7 segments
Computer Graphics
Knot multiplicity
Triple knot at 5
knot={0,1,2,3,4
,5,5,5,6,7,8,9,10
,11}
5 segments
Computer Graphics
Knot multiplicity
Quadruple knot at 5
4 segments
Summary of B-Splines.
Functions that can be manipulated by a series of control
points with C2 continuity and local control.
Dont pass through their control points, although can be
forced.
Uniform
Knots are equally spaced in t.
Non-Uniform
Knots are unequally spaced
Allows addition of extra control points anywhere in the set.
10/10/2008
Lecture 5
30
Computer Graphics
Computer Graphics
2nd Practical
Summary cont.
Do not have to worry about the continuity at
the join points
For interactive curve modelling
B-Splines are very good.
10/10/2008
Lecture 5
31
Computer Graphics
10/10/2008
Lecture 5
33