Professional Documents
Culture Documents
p 3 p 4
p
p 2
5
p p 6
1
p 7
p 0
p 8
Uniform B-Spline
B-spline control points: p0 ::: pn
v0 = 21 ( p0 +3 2p1 + 2p1 3+ p2 )
= 16 (p0 + 4p1 + p2)
1
v3 = (p1 + 4p2 + p3)
6
In general, i-th segment of B-splines is determined by
pi pi+1 pi+2 pi+3
v1 =
2 p +1 + p +2
3
i i
p +1 + 2p +2
v2 =
3
i i
1
v0 = (p + 4p +1 + p +2)
6 i i i
1
v3 = (p +1 + 4p +2 + p +3)
6 i i i
In matrix form
2 3 2 32 3
v0 1 4 1 0 pi
= 61 00 4 2 0
6
6 v1 7
7 66 77 66 p 77
75 64 i+1
6
4 v2
7
5 64
2 4 0 pi+2
75
v3 0 1 4 1 pi+3
Approximation
Local control
Each segment are determined by four control points
Convex hull
Questions: what happens if we put more than one
control points in the same location???
{ double vertices
{ triple vertices
{ collinear vertices
End conditions
{ double endpoint: curve will be tangent to line
between rst distinct points
{ triple endpoint: curve interpolate endpoint, start w
a line segment
Display B-splines: transform it to Bezier curves
Catmull-Rom Splines
Keep interpolation
Give up 2 continuity
C
c(1) = p +1 = v3
i
v1 = +1 6
p +6p p ;1
i i; i
v2 =
; p +2+6p +1+p
i i i
6
In matrix form
2 3 2 32 3
v0 0 6 0 0 pi;1
= 61 01 6 1 0
6
6 v1 7
7 66 ; 77 66 p 77
6
4 v2
7
5 64
1 6 ;1 75 64 i 75
pi+1
v3 0 0 6 0 pi+2
non-convex-hull
Catmull-Rom Splines
v 1
v 2
v 0
v 3
p
p i
i+1
p i−1 p i+2
B-Splines
Mathematics
X
( )= ()
n
c u piBi k u
i=0
Control points: p i
Piecewise polynomials
How to formulate ( ) Bi k u
u in uk ; 1 un+1 ]
B-spline Curves
Curve: c( ) = =0 p ( )
u
Pn
i i Bi k u
Parametric variable: u
n+ 1 control points: p i
n+ + 1 non-decreasing knots:
k u 0 u1 : : : un+k
Control Points
Knots
B-spline Example
p 2
n=7 p 6
p k=4
1
p 5
p 3
p
p
7
p
0
4
u 0 u 3
u 8 u 11
B-Spline Properties
c( ): piecewise polynomial of degree
u k ; 1
Continuity at joints: 2
C
k;
n + 1 control points
n + 1 basis (blending) functions
( ) is dened over
+ ], which includes + 1
Bi k u ui ui k
n + + 1 knots
k
sub-intervals
Parametric domain:
1 +1]
uk ; un
Local control!!!
Convex hull
The degree of B-spline polynomial can be independen
from the the number of control point
Compare B-spline with Bezier!!!
Key components: control points, basis functions, orde
knots, parametric domain, local vs. global control,
continuity
Basis Functions
Linear examples
(
0 2( ) = 2 ;
0 1]
2
1 2]
u u
B u
u u 2
(
;1 2
1 2]
B 12 (u) = 3 ; 2
2 3]
u
u
u
(
;2 2
2 3]
B 22 (u) = 4 ; 2
3 4]
u
u
u
8
< 2 ( ; 1) 2
1 2]
>
> 1 u
2 u
1 3( ) = > 2 ( ; 1)(3 ; ) + 2 (4 ; )( ; 2) 2
2 3]
B u
1 u u
1 u u u
: 1 (4 ; )2
>
2
3 4]
2 u u
How does it look like???
Cubic example
81 3
>
>
> 6u
>
<1 2
( ) = >> 6 ( (2 ; ) + (3 ; )( ; 1) + (4 ; )( ; 1)2
u u u u u u u
B 04 u
>
>
1
6 ( (3 ; )2 + (4 ; )( ; 1)(3 ; ) + (4 ; )2(
u u u u u u
: 1
6 (4 ; )3
u
B-spline Basis Functions
One example: quadratic
Knot vector:
0 1 2 3 4 5 6]
8
>
>
<
1 u2
2 for 0 u < 1
B 03 ( )=
u
> (2 ) + 21 ( ; 1)(3 ;
1u ; u
2 u u) for 1 u < 2
>
:(3 )
1 ;u 2
2 for 2 u < 3
8
< 2 ( ; 1) for 1
>
> 1 u
2 u <
B 2 3( ) =
u :::
B 3 3( ) =
u :::
B-spline Basis Functions
(
( ) = 1 for +1
0 otherwise
ui u < ui
Bi 1u
Bi k u( ) = + ;1
ui
u;ui
k ;ui1( ) + +
Bi k ;
+u
ui
ui
k ;u
k ;ui+1 B +1
i k; 1 ()
u :
Basis Functions
0 1 2 3 4 5 6 7
B-Spline Basis Functions
B-spline Properties
Control points and basis functions: + 1
n
Local control
Special case: Bezier splines
Ecient algorithms & tools
{ evaluation
{ knot insertion
{ degree elevation
{ derivative, integration
{ continuity
Composite Bezier curves for B-splines
Another formulation
Uniform B-spline
Matrix representation
Normalization to 2
0 1]
u
1
c (1) = (p3 ; p1)
2
0
2 3
c(0)
66 c(1) 77
c( ) =
c (0) 5
u U Mh 640 7
0
c (1)
2 3
p0
6 77
= 06
U Mh M 6
4
p1
p2
75
p3
= UM p
Basis matrix
2 3
1 3 ;3 1
;
= 61 33 ;06 33 00
66 77
M 64 75
;
1 4 1 0
Basis functions ( 2
0 1]):
u
( ) = 1 (1 ; )3
B04 u
6 u
( ) = 1 (3 3 ; 6 2 + 4)
14
B u
6 u u
( ) = 1 ( ;3 3 + 3 2 + 3 + 1)
24
B u
6 u u u
( ) = 1 3
B34 u
6 u
Uniform B-Spline
p 1 p 2
p 0
p
Uniform B−Spline 3
B-Spline Rendering
Transform it to a set of Bezier curves
Display B-Spline (fp0 p g)
::: n
For = 0 to ; + 1 do
i n k
::: k;
c u 64 75 Bi k u
i=0
pi z wi
wi
Homogeneous representation
2 3
( ) X" #
() =
x u
6 77
6 p
()
n
()
y u i wi
6
4 75 Bi k u
w
()
z u
=0 i
i
w u
c(1) (0) =
1 (1 ; )
(1 + )(1 ; )(v ; v ) + (1 ; )(1 + )(v ; v )]
2 1 0 2 1
c(1)(1) =
1 (1 ; )
(1 + )(1 + )(v ; v ) + (1 ; )(1 ; )(v ; v )]
2 2 1 3 2
Tension parameter:
Bias parameter:
Continuity parameter:
Summary
Parametric curves and surfaces
Polynomials and rational polynomials
Free-form curves and surfaces
Other commonly used geometric primitives sphere,
ellipsoid, torus, superquadrics, blobby
Motivation: fewer degrees of freedom more geometri
coverage
Interpolation Splines
Approximation Splines
Interpolation/Approximation
Natural C 2 Cubic Splines
A set of piecewise cubic polynomials
C
2 continuity at each vertex
2 3
()
c( )= ()
x u
64 7
5
()
i u y u
z u
Natural C 2 Cubic Splines
From Curve to Surface