Documentos de Académico
Documentos de Profesional
Documentos de Cultura
P3
Q0
P0 Q2
Q1
B-Splines
• Polynomial curves
• Ck-1 continuity
– Cubic B-spline: C2 continuity
• Main idea:
– Use blossom form as seen with Bézier
– Instead of using fixed control points (for each segment)
f(0,0,0), f(0,0,1), f(0,1,1), f(1,1,1)
– Allow “sliding window” of control points, defined by knot
vector, e.g.,
f(-2,-1,0), f(-1,0,1), f(0,1,2), f(1,2,3)
with knot vector [-2,-1,0,1,2,3]
1
Example
f(t,t,t) f(t,t,t)
Bézier B-Spline
Knots
• A sequence of scalar values t1, …, t2k with ti≠tj if
i≠j, and ti < tj for i<j (k = degree of polyn.)
• If ti chosen at uniform interval (such as 1,2,3, …),
than it is a uniform knot sequence
Control Points
2
Example: Degree 2 (k=2)
• Knots: t1,t2,t3,t4
• Control points
v0 = f(t1,t2) = a0 + a1 (t1+t2)/2+ a2 t1t2
v1 = f(t2,t3) = a0 + a1 (t2+t3)/2+ a2 t2t3
v2 = f(t3,t4) = a0 + a1 (t3+t4)/2+ a2 t3t4
• Knots: t1,t2,t3,t4,t5,t6
• Control points
v0 = f(t1,t2, t3)
v1 = f(t2,t3, t4)
v2 = f(t3,t4,t5)
v3 = f(t4,t5,t6)
3
Concrete Example for Degree 3
• For t = 3.5 (t must lie in [3,4])
f(3.5,3.5,3) f(3.5,3.5,4)
f(3.5,3.5,3.5)
4
Definition
vi-k,vi-k+1, … , vi
(sliding window)
Definition
– Aside: the k-th degree Bézier curve corresponding to this curve has
the control points:
pj=f(ti, ti, …, ti,ti+1,ti+1,…, ti+1) , j = 0, 1, …, k
k-j j
v1 v1
v3 v3
v0 v4
v0
v2 v6
v2
5
Computation – De Boor Algorithm
• Problem: computing a point on the B-spline for t ∈[ti, ti+1]
P0i-3 (t) = vi-3 P0i-2 (t) = vi-2 P0i-1 (t) = vi-1 P0i (t) = vi
f(ti-2, ti-1, ti) f(ti-1, ti, ti+1) f(ti, ti+1, ti+2) f(ti+1, ti+2, ti+3)
P3i-3 (t)
f(t, t, t)
De Boor Algorithm
• Recursion formula:
6
B-Spline Basis
• Then
7
B-Spline Basis Functions – Visually
• N0,i:
• N1,i:
• N2,i:
8
Cubic B-Splines – Basis Functions Visually
• Chained together
Knot Insertion
Multiple Knots
• Example:
– Cubic B-Spline
– Knot vector:
[0 0 0 0 1 2 3 3 3 3]
9
Bezier vs. B-Splines
Bézier B-Spline
Bézier
BSpline
10
B-splines or Bézier curves?
Relation between
3rd-degree Bézier curves and B-Splines
• Constructing Bézier points from B-Spline points
vj-3 vj-2 vj-1 vj
f(tj-2, tj-1, tj) f(tj-1, tj, tj+1) f(tj, tj+1, tj+2) f(tj+1, tj+2, tj+3)
P1 P2
f(tj-1, tj, tj) f(tj, tj, tj+1) f(tj, tj+1, tj+1) f(tj+1, tj+1, tj+2)
P0 P3
f(tj, tj, tj) f(tj+1, tj+1, tj+1)
new Bézier
control original
points to control
match points as
B-Spline B-Spline
11
Advantages of B-Splines over Bézier curves
12