Professional Documents
Culture Documents
4 CurvesPartII PDF
4 CurvesPartII PDF
4 CurvesPartII PDF
• Shape functions
• Knot vector
• De Casteljau analogy
• De Boor’s algorithm
• Refinement
• Properties
B-Splines
𝑥(𝑡) 𝑃,
𝑪 𝑡 = 𝑦(𝑡) = 𝑁 , (𝑡) ⋅ 𝑷 = 𝑁, 𝑡 ⋅ 𝑃,
𝑧(𝑡) 𝑃,
𝛿 𝑪 𝑡 𝛿 𝑁 , (𝑡)
𝑪( )
𝑡 = = ⋅𝑷
𝛿𝑡 𝛿𝑡
• Shape functions
• Knot vector
• De Casteljau analogy
• De Boor’s algorithm
• Refinement
• Properties
𝑡
𝑡 𝑡 … 𝑡 … 𝑡
• Values 𝑡 are called knots and are stored in the knot vector 𝑈 = [𝑡 , 𝑡 , … 𝑡 ]
1 2 4 3 5
𝑷 =
0.5 2 2 1 0
𝑃 𝑃
𝑛=5
𝑃
Curve approximation:
𝑃
𝑪 𝑡 = 𝑁 , (𝑡) ⋅ 𝑷 𝑃
• 𝑁 , is non-zero from 𝑡 to 𝑡 𝑡 𝑡 𝑡 𝑡
Example:
𝑈 = [0 1 2 3 4 5 … ]
𝑝=2
𝑁 ,
𝑁(𝑡)
𝑡 𝑡
𝑁 ,
• Knot vector
𝑚 =𝑛+𝑝+1=8
𝑃
𝑈 = [0 1 2 3 4 5 6 7]
𝑃
• Curve approximation: 𝑃
𝑪 𝑡 = 𝑁 , (𝑡) ⋅ 𝑷
𝑃 𝑃
𝑃
𝑃
𝑃
𝑡 ∈ [0, 7] 𝑁, 0 = 0 → 𝑪 0 = 0
𝑃 𝑃
𝑃
𝑃
𝑃
𝑈 = [0 1 2 3 4 5 6 7]
Origin is still “half“ interpolated
𝑡 ∈ [1, 6]
𝑁 , 𝑁 , 𝑁 ,
𝑁 , (𝑡) = 1 ∀𝑡
𝑁 ,
𝑁 ,
𝑡 𝑁 , (𝑡)
𝑡=0 0
𝑡=1 0.5
ℎ𝑒𝑟𝑒 𝑓𝑜𝑟 𝑝 = 2
𝑁 , (𝑡)
𝑃 𝑃
𝑃
𝑃
𝑃
𝑈 = [0 1 2 3 4 5 6 7]
𝑡 ∈ [2, 5]
• Shape functions
• Knot vector
• De Casteljau analogy
• De Boor’s algorithm
• Refinement
• Properties
𝑡
𝑡 𝑡 … 𝑡 … 𝑡
• Values 𝑡 are called knots and are stored in the knot vector 𝑈 = [𝑡 , 𝑡 , … 𝑡 ]
• Number of knots 𝒎 = 𝒏 + 𝒑 + 𝟏
𝑈 = [0, 1, 1, 2, 2, 2]
𝑘=3
𝑘=2
𝑘=1
𝑈 = [0 0 0 3 4 5 6 7]
𝑘 =𝑝+1=3
Point is interpolated
Example:
𝑘 =𝑝+1 𝑘 =𝑝+1
𝑝=3
𝑈 = [0000 1 2 3 3 3 3]
𝑛=6 number control points
𝑈 = [ −1, −1, −1, −1, −0.5, 0. 9, 5,5,5,5]
→ 𝑚 = 𝑛 + 𝑝 + 1 = 6 + 3 + 1 = 10
⋮
infinite possibilities
𝑈 = [0 0 0 3 4 7 7 7]
𝑈 = [0 0 0 3 3 7 7 7] Point is interpolated
Example: 𝐶 Meaning
⋮ ⋮
𝑝=2
𝐶 2 times continuously derivable
𝑈 = [0 0 0 3 3 7 7 7] 𝐶 1 time continuously derivable
𝐶 interpolation of point: Kink
𝑘 =2
1 control line is ignored: Jump to
𝐶
𝐶 =𝐶 =𝐶 next control point
⋮ ⋮
Jump
2 independent curves
𝑈 = [0 0 0 1 2 777] 𝑈 = [0 0 0 5 6 777]
𝑈 = [0 0 0 1 2 777] 𝑈 = [0 0 0 5 6 777]
• Shape functions
• Knot vector
• De Casteljau analogy
• De Boor’s algorithm
• Refinement
• Properties
1 𝑡 ∈ [𝑡 , 𝑡 ]
𝑁, 𝑡 =
0 𝑒𝑙𝑠𝑒
• for 𝑝 ≥ 1:
𝑡−𝑡 𝑡 −𝑡 0
𝑁, = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡 ≝0
𝑡 −𝑡 𝑡 −𝑡 0
( ) 𝑁, 𝑡 𝑁 , 𝑡
𝑁, =𝑝⋅ −
𝑡 −𝑡 𝑡 −𝑡
• 𝑘 derivative:
( ) ( )
( )
𝑁, 𝑡 𝑁 , 𝑡
𝑁, =𝑝⋅ −
𝑡 −𝑡 𝑡 −𝑡
1 𝑡 ∈ [𝑡 , 𝑡 ]
𝑁, 𝑡 =
𝑁 , 0 𝑒𝑙𝑠𝑒
𝑈 = [0 1 2 3 4 5 … ]
𝑁 ,
Important:
For a parameter 𝑡 in knot span 𝑖 only
shape function 𝑁 , is non zero!
𝑁 ,
𝑈 = [0 1 2 3 4 5 … ]
𝑁 ,
𝑁 ,
𝑁 ,
piecewise polynomial
defined on 2 knot spans
𝑁 ,
𝑡 𝑡 ∈ [0, 1[
𝑁 , =
2−𝑡 𝑡 ∈ [1, 2[
𝑁 ,
𝑁 ,
𝑡−1 𝑡 ∈ [1, 2[
𝑁 , =
3−𝑡 𝑡 ∈ [2, 3[
𝑁 ,
𝑁 ,
𝑈 = [0 1 2 3 4 5 … ]
𝑁 ,
𝑁 ,
𝑁 ,
0.5 𝑡 𝑡 ∈ [0, 1[
𝑡−𝑡 𝑡 −𝑡 𝑡−0 3 −𝑡
𝑁 , = ⋅𝑁 , + ⋅𝑁 , = ⋅𝑁 , + ⋅𝑁 , = −𝑡 + 3𝑡 − 1.5 𝑡 ∈ [1, 2[
𝑡 −𝑡 𝑡 −𝑡 2−0 3−1
0.5 𝑡 + 4.5 𝑡 ∈ [2, 3[
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 …
,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑁 , ⋮
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , ⋮
⋮ 𝑁 ,
…
⋮ ⋮ 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 ,𝑡 [ 𝑁 ,
• from 𝑁 , to 𝑁 , : 𝑝 steps 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁
• per step the number of shape functions ,
…
𝑁 ,
decreases by 1 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 𝑁
, ,
𝑁 ,
𝑁 , ⋮
• At 𝑝 = 0: 𝑛 + 𝑝 shape functions needed 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , ⋮
⋮ 𝑁 ,
…
• Shape function defined between 2 knots ⋮ ⋮ 𝑁 ,
(Off-by-one error) 𝑁 ,
𝑡 ∈ [𝑡 ,𝑡 [ 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑁 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,
, 𝑁 ,
𝑁 , 𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 𝑁
𝑁 ,
,
,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 , 𝑁 , 𝑁 ,
𝑁 , 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑁 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁
𝑁 , , , 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,
→𝑝=2 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,
𝑁 ,
𝑚 =𝑛+𝑝+1 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
→ 𝑛 =𝑚−𝑝 −1=3
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,
𝑁 , 𝑡 = 𝑁 , 𝑡 = = 0 𝑡∈ℝ
𝑁 , 𝑡 = 1 𝑡 ∈ [0, 1[
𝑁 , 𝑡 = 𝑁 , 𝑡 = 0 𝑡∈ℝ
• 𝑝 = 1:
𝑁 , 𝑡 = 0 𝑡∈ℝ
1−𝑡
𝑁 , 𝑡 = ⋅𝑁 , = (1 − 𝑡) 𝑡 ∈ [0,1[
1−0
𝑡−0
𝑁 , 𝑡 = ⋅𝑁 , = 𝑡 𝑡 ∈ [0,1[
1−0
𝑁 , 𝑡 = 0 𝑡∈ℝ
Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 45
B-Splines: Cox de Boor’s algorithm
𝑡−𝑡 𝑡 −𝑡
Example 1: 𝑁, = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡
• 𝑝 = 2:
1−𝑡
𝑁 , 𝑡 = ⋅𝑁 , = 1−𝑡 𝑡 ∈ [0, 1[
1−0
𝑡−0 1−𝑡
𝑁 , 𝑡 = ⋅𝑁 , + ⋅𝑁 , = 2⋅ 1−𝑡 ⋅𝑡 𝑡 ∈ [0, 1[
1−0 1−0
𝑡−0
𝑁 , 𝑡 = ⋅𝑁 , = 𝑡 𝑡 ∈ [0, 1[
1−0
𝑁 , 𝑁 ,
𝑁 ,
→ 𝑛 =𝑚−𝑝 −1=6 𝑁 , 𝑁 ,
𝑖 𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑁 ,
𝑁 ,
𝑁 , 𝑡 = 1 𝑡 ∈ [0, 1[
𝑁 , 𝑡 = 1 𝑡 ∈ [1, 2[
𝑁 , 𝑡 = 1 𝑡 ∈ [2, 3[
𝑁 , 𝑡 = 𝑁 , 𝑡 = 𝑁 , 𝑡 = 0 𝑡∈ℝ
𝑁 , 𝑡 =𝑁 , 𝑡 = 0 𝑡∈ℝ
1−𝑡
𝑁 , 𝑡 = ⋅𝑁 , = (1 − 𝑡) 𝑡 ∈ [0, 1[
1−0
𝑡−0 2−𝑡 𝑡 𝑡 ∈ [0, 1[
𝑁 , 𝑡 = ⋅𝑁 , + ⋅𝑁 , = 𝑡 ∈ [1, 2[
1−0 2−1 (2 − 𝑡)
𝑡−2
𝑁 , 𝑡 = ⋅𝑁 , = (𝑡 − 2) 𝑡 ∈ [2, 3[
3−2
𝑁 , 𝑡 =𝑁 , 𝑡 = 0 𝑡∈ℝ
𝑁 , 𝑡 = 0 𝑡∈ℝ
1−𝑡
𝑁 , 𝑡 = ⋅𝑁 , = 1−𝑡 𝑡 ∈ [0, 1[
1−0
𝑡−0 2−𝑡 −1.5𝑡 + 2𝑡 𝑡 ∈ [0, 1[
𝑁 , 𝑡 = ⋅𝑁 , + ⋅𝑁 , =
1−0 2−0 0.5𝑡 − 2𝑡 + 2 𝑡 ∈ [1, 2[
𝑡−0 3−𝑡
𝑁 , 𝑡 = ⋅𝑁 , + ⋅𝑁 , =
2−0 3−1
0.5𝑡 𝑡 ∈ [0,1[
𝑡−0 3−𝑡
𝑁 , 𝑡 = ⋅𝑁 , + ⋅𝑁 , = 0.5𝑡 + 3𝑡 − 1.5 𝑡 ∈ [1,2[
2−0 3−1 𝑡 ∈ [2,3[
0.5𝑡 − 3𝑡 + 4.5
𝑡−2
𝑁 , 𝑡 = ⋅𝑁 , = 𝑡−2 𝑡 ∈ [2, 3[
3−2
𝑁 , 𝑡 = 0 𝑡∈ℝ
1−𝑡
𝑁 , 𝑡 = ⋅𝑁 , = −𝑡 + 3𝑡 − 3𝑡 + 1 𝑡 ∈ [0, 1[
1−0
− 𝑡 + 𝑡
𝑡 ∈ [0,1[
𝑡−0 3−𝑡
𝑁 , 𝑡 = ⋅𝑁 , + ⋅𝑁 , = + 𝑡− 𝑡−1 + 𝑡−1 𝑡 ∈ [1,2[
2−0 3−0
− 𝑡+ 𝑡−2 − 𝑡−2 𝑡 ∈ [2,3[
𝑡
𝑡 ∈ [0,1[
𝑡−0 3−𝑡
𝑁 , 𝑡 = ⋅𝑁 , + ⋅𝑁 , = − + 𝑡− 𝑡−1 − 𝑡−1 𝑡 ∈ [1,2[
3−0 3−1
− 𝑡+ 𝑡−2 − 𝑡−2 𝑡 ∈ [2,3[
𝑡−2
𝑁 , 𝑡 = ⋅𝑁 , = 𝑡−2 𝑡 ∈ [2, 3[
3−2
𝑁(𝑡)
𝑁 , 𝑁 ,
𝑁 , 𝑁 , 𝑁 , 𝑁 ,
𝑡−𝑡 𝑡 −𝑡
𝑁 , (𝑡) = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡
• at any parameter 𝑡. Along with a chosen set of control points, the corresponding B-Spline
curve 𝑪(𝑡) can be computed:
𝑥(𝑡) 𝑃,
𝑪 𝑡 = 𝑦(𝑡) = 𝑁 , (𝑡) ⋅ 𝑷 = 𝑁, 𝑡 ⋅ 𝑃,
𝑧(𝑡) 𝑃,
• Shape functions
• Knot vector
• De Casteljau analogy
• De Boor’s algorithm
• Refinement
• Properties
• In contrast to De Casteljau’s algorithm not the overall curve, but each knot span must be
considered separately
Remark:
• A Bézier curve is a special case of a B-Spline curve, in which no inner knots are given
𝑈 é = [0 0 0 … 0 1 … 1 1 1]
𝑡
0
Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 58
B-Splines: De Casteljau analogy
Remember De Casteljau’s algorithm for Bézier curves
𝑡 = 0.5
𝑛=6 →𝑝=5
Example: 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,
𝑝=2 𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑈 = [0 1 2 3 4 5 6 … ] 𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑷 = [𝑷 𝑷 𝑷 …]
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
Non open knot vector 𝑁 ,
starting at 𝑡 =𝑡 =2 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,
⋮
⋮
…because from here on we have partition of unity… ⋮
𝑁 , 𝑡 ≠0 𝑡 ∈ [2, 3[
𝑁 ,
𝑁 , 𝑡 ≠0 𝑡 ∈ [2, 3[
𝑁 , 𝑡 ≠0 𝑡 ∈ [2, 3[
𝑁, 𝑡 = 0 𝑡 ∈ [2, 3[ ∀ 𝑖 > 3
𝑪 𝑡 = 𝑁, ⋅𝑷 = 𝑁 , 𝑡 ⋅𝑷 + 𝑁 , 𝑡 ⋅𝑷 + 𝑁 , 𝑡 ⋅𝑷
𝑡−0 3−𝑡
= ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡 ⋅𝑷 +
2−0 3−1
𝑡−1 4−𝑡
+ ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡 ⋅𝑷 +
3−1 4−2
𝑡−2 5−𝑡
+ ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡 ⋅𝑷
4−2 5−3
𝑡−𝑡 𝑡 −𝑡
𝑁 , (𝑡) = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡
𝑡−0 3−𝑡
= ⋅ 𝑡−0 ⋅𝑁 , 𝑡 + 2−𝑡 ⋅𝑁 , 𝑡 + ⋅ 𝑡−1 ⋅𝑁 , 𝑡 + 3 − 𝑡 ⋅ 𝑁 , (𝑡) ⋅𝑷 +
2 2
𝑡−1 4−𝑡
+ ⋅ 𝑡−1 ⋅𝑁 , 𝑡 + 3−𝑡 ⋅𝑁 , 𝑡 + ⋅ 𝑡−2 ⋅𝑁 , 𝑡 + 4 − 𝑡 ⋅ 𝑁 , (𝑡) ⋅𝑷 +
2 2
𝑡−2 5−𝑡
+ ⋅ 𝑡−2 ⋅𝑁 , 𝑡 + 4−𝑡 ⋅𝑁 , 𝑡 + ⋅ 𝑡−3 ⋅𝑁 , 𝑡 + 5 − 𝑡 ⋅ 𝑁 , (𝑡) ⋅𝑷
2 2
𝑡−𝑡 𝑡 −𝑡
𝑁 , (𝑡) = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡
𝑁 , 𝑁 , 𝑁 , 𝑁 , …
𝑁 , 𝑡 ≠0 𝑡 ∈ [2 3[
𝑁, 𝑡 = 0 𝑡 ∈ [2 3 [ ∀ 𝑖 ≠ 3
𝑡−0 3−𝑡
= ⋅ 𝑡−0 ⋅𝑁 , 𝑡 + 2−𝑡 ⋅𝑁 , 𝑡 + ⋅ 𝑡−1 ⋅𝑁 , 𝑡 + 3 − 𝑡 ⋅ 𝑁 , (𝑡) ⋅𝑷 +
2 2
𝑡−1 4−𝑡
+ ⋅ 𝑡−1 ⋅𝑁 , 𝑡 + 3−𝑡 ⋅𝑁 , 𝑡 + ⋅ 𝑡−2 ⋅𝑁 , 𝑡 + 4 − 𝑡 ⋅ 𝑁 , (𝑡) ⋅𝑷 +
2 2
𝑡−2 5−𝑡
+ ⋅ 𝑡−2 ⋅𝑁 , 𝑡 + 4−𝑡 ⋅𝑁 , 𝑡 + ⋅ 𝑡−3 ⋅𝑁 , 𝑡 + 5 − 𝑡 ⋅ 𝑁 , (𝑡) ⋅𝑷
2 2
3−𝑡
= ⋅ 3 − 𝑡 ⋅ 𝑁 , (𝑡) ⋅ 𝑷 +
2
𝑡−1 4−𝑡
+ ⋅ 3−𝑡 ⋅𝑁 , 𝑡 + ⋅ 𝑡−2 ⋅𝑁 , 𝑡 ⋅𝑷 +
2 2
𝑡−2
+ ⋅ 𝑡−2 ⋅𝑁 , 𝑡 ⋅𝑷
2
interpolation interpolation
= 3−𝑡 ⋅ 𝑷 , + 𝑡−2 ⋅ 𝑷 ,
𝑪 𝑡 =𝑷 ,
Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 67
B-Splines: De Casteljau analogy
Local variable 𝑠:
• B-Splines have a global parameter 𝑡 ∈ [𝑡 , 𝑡 ]
𝑡 𝑡 … 𝑡 𝑡 … 𝑡
,
polynomial degree 𝑝
knot span 𝑖 i.e. 𝑡 ∈ [𝑡 , 𝑡 ]
𝑷 , 𝑷 𝑷 ,
, 𝑈 = [0 1 2 3 4 5 6 7 8]
𝑷 ,
𝑷 ,
partition of unity is only
𝑷 , 𝑷 , here fulfilled
𝑷 ,
𝑷 ,
𝑷 ,
𝑠∈ ,1 𝑠∈ , 𝑠∈ , 𝑠∈ , 𝑠 ∈ 0,
𝑝=5
𝑠∈ ,1 𝑠∈ , 𝑠∈ , 𝑠 ∈ 0,
𝑝=4
𝑠∈ ,1 𝑠∈ , 𝑠 ∈ 0,
𝑝=3
𝑠∈ ,1 𝑠 ∈ 0,
𝑝=2
𝑠 ∈ 0, 1
𝑝=1
• Local support: Not all control points are taken into account
Remark: To interpolate the first and the last control point, they have been inserted
multiple times at the same position (with this trick no open knot vector is needed)
Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 74
B-Spline curves
• Introduction
• Shape functions
• Knot vector
• Bézier analogy
• De Boor’s algorithm
• Refinement
• Properties
interpolation interpolation
= 3−𝑡 ⋅ 𝑷 , + 𝑡−2 ⋅ 𝑷 ,
𝑡 𝑡 … 𝑡 𝑡 … 𝑡
⋮ 𝑁,
⋮
⋮ ⋮
𝑁 , …
𝑡 ∈ [𝑡 ,𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 ,𝑡 [ 𝑁 ,
recursive call to intermediate control points one level below (down to the actual
control points 𝑷 , = 𝑷 )
Remarks:
• This algorithm evaluates the curve directly. No shape functions are computed.
• Intermediate control points 𝑷 , are recursively interpolated from actual control points
𝑝=3
𝑡 ∈ [𝑡 , 𝑡 [ → 𝑁 , ≠0
𝑪 𝑡 =𝑷 , = 𝑁, 𝑡 ⋅𝑷 ,
with:
𝑡−𝑡 𝑡 −𝑡
𝑁, = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡
=𝑁 , 𝑡 ⋅𝑷 +𝑁 , 𝑡 ⋅𝑷 +𝑁 , 𝑡 ⋅ 𝑷 + 𝑁 , (𝑡) ⋅ 𝑷
𝑡−𝑡 𝑡 −𝑡
p = 3: 𝑁 , 𝑡 = ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡
𝑡−𝑡 𝑡 −𝑡
p = 2: 𝑁 , 𝑡 = ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡
𝑡−𝑡 𝑡 −𝑡
p = 1: 𝑁 , 𝑡 = ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡
p = 0: 𝑁 , 𝑡 =0
𝑁 , 𝑁 ,
𝑁 ,
𝑁 , 𝑁 ,
𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡
𝑁 , = ⋅ ⋅ 𝑁, ,𝑁, ,𝑁 , analogously
𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡
(1 − 𝛼 , ) 𝑷 ,
𝛼 , 𝑷 ,
(1 − 𝛼 , ) 𝑷 , 𝛼 , 𝑷 ,
𝑷 ,
(1 − 𝛼 , ) 𝑷 , 𝛼 , 𝑷 ,
𝑷 ,
(1 − 𝛼 , ) 𝛼 , (1 − 𝛼 , ) 𝛼 ,
𝑷 , 𝑷 ,
(1 − 𝛼 , ) 𝛼 , (1 − 𝛼 , ) 𝛼 ,
𝑷 , 𝑷 ,
𝑷 𝑷 𝑷 𝑷 𝑟=4 𝑙𝑒𝑣𝑒𝑙 0
𝑡−𝑡 𝑡−𝑡
𝛼 , = 𝛼 , = 𝑟=2 𝑙𝑒𝑣𝑒𝑙 2
𝑡 −𝑡 𝑡 −𝑡
𝑡−𝑡
𝛼, =
𝑡 −𝑡
𝑡−𝑡
𝛼 , = 𝑟=1 𝑙𝑒𝑣𝑒𝑙 3
𝑡 −𝑡
𝑝=3 𝑛=6
We consider:
𝑷
𝑡 ∈ [𝑡 , 𝑡 [ = [1, 4[
→𝑖=5
𝑷, = 1−𝛼, ⋅𝑷 +𝛼 , ⋅𝑷 , 𝑡−𝑡
, 𝛼, =
𝑡 −𝑡
𝑡−𝑡 𝑡−1
𝑷 = 1−𝛼 ⋅𝑷 +𝛼 ⋅𝑷 𝛼 , = =
, , , , , 𝑡 −𝑡 9−1
𝑷, = 1−𝛼, ⋅𝑷 +𝛼 , ⋅𝑷 , 𝑡−𝑡
, 𝛼, =
𝑡 −𝑡
𝑡−𝑡 𝑡−0
𝑷 , = 1−𝛼 , ⋅𝑷 +𝛼 , ⋅𝑷 𝛼 , = =
𝑡 −𝑡 9−0
𝑡−𝑡 𝑡−1
𝑷 , = 1−𝛼 , ⋅𝑷 +𝛼 , ⋅𝑷 𝛼 , = =
𝑡 −𝑡 9−1
𝑪 𝑡 ∈ [1,4[ =
𝑷 , 𝑷 ,
𝑷 ,
𝑷 , 𝑷 ,
𝑷 ,
2
1
3
3
1
0
curve in knot span [4, 5[
curve in knot 𝑷 ,
span [3, 4[
𝑷 ,
𝑷 ,
𝑠 0 1
𝑷 , = 1−𝛼 , ⋅𝑷 +𝛼 , ⋅𝑷
𝑡 1 4
𝑡
1 4 𝛼 , =
𝛼 , 𝑠 =1 4
4 4
3 1
𝑷 , (𝑠) ⋅𝑷 + ⋅𝑷 0⋅𝑷 +1⋅𝑷
4 4
with 1 1 1
⋅ = 0.25
coordinates 4 0 0 0
𝑷 𝑷 (𝑠) 𝑷
,
Lowest level: 𝑷
3
𝑡 8
𝛼 , =
4 𝑡 ∈ [1, 4[
0
𝑡
𝛼 , = 𝑷 , (𝑡) = 1 − 𝛼 , ⋅𝑷 +𝛼, ⋅𝑷 𝑷 (𝑠)
9 ,
𝑷
𝑡−1 𝛼 ,
𝛼 , =
8
𝑈 = [0 0 0 0 1 4 9 9 9 9] 4
𝑷 (𝑠) 9
,
𝛼 ,
𝛼 , 1
1 𝑷 , (𝑠)
𝑷 9
4
𝑷
1
Middle level: 𝑷
𝑡 𝑡 ∈ [1, 4[
𝛼 , =
4 𝑷 , (𝑠)
𝑷 , (𝑡) = 1 − 𝛼 , ⋅𝑷 , (𝑡) + 𝛼 , ⋅ 𝑷 , (𝑡)
𝑡−1 𝑷
𝛼 , =
8 3
𝛼 ,
8
1
𝑈 = [0 0 0 0 1 4 9 9 9 9]
0
𝛼 ,
1
4 𝑷 (𝑠)
,
𝑷
𝑷 𝑷 , (𝑠)
Highest level: 𝑷
𝑡−1 𝑡 ∈ [1, 4[
𝛼 , = 𝑷 = 1−𝛼 ⋅𝑷 +𝛼 ⋅𝑷
3 , , , , ,
1
𝑷 , (𝑠)
𝑈 = [0 0 0 0 1 4 9 9 9 9]
0
𝛼 ,
𝑷 , (𝑠)
𝑷
𝑷
• Shape functions
• Knot vector
• Bézier analogy
• De Boor’s algorithm
• Refinement
• Properties
Two possibilities:
1. Knot insertion
Add a new knot 𝑡 into the knot vector 𝑼
𝑼 = [𝑡 , … , 𝑡 ]
𝑼 = [𝑡 , … , 𝑡 ,…,𝑡 ]
2. Degree elevation
Raise polynomial degree
𝑝 =𝑝+1
𝑸 = 1−𝛼 ⋅𝑷 +𝛼 ⋅𝑷
𝑡 −𝑡
𝛼 = 𝑗 ∈ [𝑖 − 𝑝 + 1, 𝑖]
𝑡 −𝑡
Insert knot:
𝑡 = 0.25
no legs in between
𝑸 = 1−𝛼 ⋅𝑷 +𝛼 ⋅𝑷
𝑡 −𝑡
𝛼 = 𝑗 ∈ [𝑖 − 𝑝 + 1, 𝑖]
𝑡 −𝑡
𝑈 = [0 0 0 1 1 1] 𝑷 𝑷
𝑸 =𝑷 𝑸
𝑸 𝑸
𝑷 𝑷
𝑷 𝑷
𝑦 𝑦
𝑷 𝑷
𝑷 𝑷
𝑷
𝑷 𝑷
𝑷 𝑷 𝑷 𝑷
𝑷 𝑷
𝑷 𝑷
𝑷 𝑷
𝑥 𝑥
𝑸 𝑸
• Find on each control polygon line a new Point 𝑸
𝑷
𝑖 𝑖 𝑷
𝑸 = ⋅𝑷 + 1− ⋅𝑷 i ∈ [2, 𝑛 − 1]
𝑛 𝑛
𝑸 𝑸
𝑝 +1 𝑝 𝑝 𝑝 +1 Remember 𝐶 conitinuity
• Shape functions
• Knot vector
• Bézier analogy
• De Boor’s algorithm
• Refinement
• Properties
𝑝=3 1 2 3 4 5 6 7 𝑈 = [0 0 0 0 1 1 2 4 4 4 4]
𝐶𝑃 = → 𝑛=7
0 1 0 1 0 1 0
Continuity 𝐶 𝐶 𝐶 𝑡=1 =𝐶 =𝐶
• Approximating smoother
• Weights
• Shape functions
• Properties
• BS… B-Splines
What is new?
• Control points carry a weight
𝑥
𝑦
𝑷 = 𝑧
𝑤
• Weights
• Shape functions
• Properties
𝑷
𝑥
𝑷 = 𝑦
𝑷 𝑤
1 2 3 4
𝑷 𝑤 = 0, , , , , 1
5 5 5 5
𝑷
1
0.8
0.6
0.4
0.2
0
𝑷 𝑷
• Weights
• Shape functions
• Properties
𝑥(𝑡) 𝑃,
𝑪 𝑡 = 𝑦(𝑡) = 𝑅 , (𝑡) ⋅ 𝑷 = 𝑅, 𝑡 ⋅ 𝑃,
𝑧(𝑡) 𝑃,
• with 𝑅 , (𝑡)
𝑁, 𝑡 ⋅𝑤
𝑅, 𝑡 =
𝑁, 𝑡 ⋅𝑤
𝑁, 𝑡 ⋅𝑤
𝑅, 𝑡 =
𝑁, 𝑡 ⋅𝑤
Why divide?
𝑁, 𝑡 ⋅𝑤 ≡ 1
𝑅 ,
𝑅 ,
𝑤 = 1.0 𝑤 = 0.6
𝑤 = 0.2 𝑤 = 0.0
𝑅 ,
𝑅 , =0
• Weights
• Shape functions
• Properties
𝑝=2
𝜋 𝜋
𝑈 = 000 𝜋 𝜋 𝜋
2 2
1 1 0 −1 −1
𝑷 = 0 1 1 1 0
1 1⁄ 2 1 1⁄ 2 1
𝑥
𝑷 𝑷 𝑷
∆ cos(𝑡)
𝑪 𝑡 =
sin(𝑡)
∆𝑥 = 𝑥 − 𝑥
∆𝑦 = 𝑦 − 𝑦
𝑡 𝑠 … standard
𝑛 … NURBS
𝑷 ,
𝑷 ,
𝑷 ,
𝑷 ,
𝑷, 𝑷,
∆𝑡
∆𝑡 𝑡
𝛿𝑥 𝑡 𝛿𝑦 𝑡
𝑣 𝑡 = 𝑪̇(𝑡) = +
𝛿𝑡 𝛿𝑡
• Weights
• Shape functions
• Properties
• Method
• Example
𝑸 𝑸
𝑸
#
𝑸 𝑸
𝑸 𝑷
𝑸
𝑷
𝑸
𝑸
𝑷 𝑷
• Method
• Example
𝑪 𝑡 = 𝑁 , (𝑡) ⋅ 𝑷
𝑡 𝑸
𝑡 … 𝑡 … 𝑡 𝑸
𝑸
𝑸
Different possibilities: 𝑸
1. Equidistant distribution
𝑦
3. Centripetal technique
𝑑= 𝑑 Example:
𝑛=5
𝑑= 𝑑
Example:
• The parameter positions 𝑡 are
𝑛=5
𝑑
𝑡 =𝑡 +
𝑑 𝑑 = 2, 4, 3, 7 → 𝑑 ≈ 7.792
𝑡 =0
𝑡 = 0 , ~0.181 , ~0.438 , ~0.66, 1
𝑪 𝑡 = 𝑁 , (𝑡) ⋅ 𝑷
𝑚 =𝑛+𝑝+1
𝑚 = 𝑚−2⋅𝑝 = 𝑛−𝑝+1
𝑡
• With 𝑡 = 0 and 𝑡 =1
𝑡 …𝑡 … 𝑡 … …𝑡
𝑡
𝑡 ,…,𝑡 =0
𝑡 ,…,𝑡 =1
𝑪 𝑡 = 𝑁 , (𝑡) ⋅ 𝑷
𝑁 , (𝑡) ⋅ 𝑥
𝑪 𝑡 = 𝑁, 𝑡 ⋅𝑷 =
𝑁 , (𝑡) ⋅ 𝑦
• Evaluated at 𝑡 :
𝑁 , (𝑡 ) ⋅ 𝑥
𝑁 , (𝑡 ) ⋯ 𝑁 , (𝑡 ) 𝑷 𝑸
⋮ ⋱ ⋮ ⋮ = ⋮
𝑁 , (𝑡 ) ⋯ 𝑁 , (𝑡 ) 𝑷 𝑸
𝑁 , (𝑡 ) ⋯ 𝑁 ,(𝑡 ) 𝑥 𝑄 ,
⋮ ⋱ ⋮ ⋮ = ⋮
𝑁 , (𝑡 ) ⋯ 𝑁 , (𝑡 ) 𝑥 𝑄 ,
𝑪 𝑡 = 𝑁 , (𝑡) ⋅ 𝑷
𝑁 , (𝑡 ) ⋯ 𝑁 , (𝑡 ) 𝑷 𝑸
⋮ ⋱ ⋮ ⋮ = ⋮
𝑁 , (𝑡 ) ⋯ 𝑁 , (𝑡 ) 𝑷 𝑸
𝑁 , (𝑡 ) ⋯ 𝑁 ,(𝑡 ) 𝑥 𝑄 ,
⋮ ⋱ ⋮ ⋮ = ⋮
𝑁 , (𝑡 ) ⋯ 𝑁 , (𝑡 ) 𝑥 𝑄 ,
• Method
• Example
Unknown:
• Knot vector 𝑼
• Control points 𝑷
𝑑 = 𝑸 −𝑸 𝑑 =5 𝑑 =4 𝑑 =5 𝑑 =3 𝑑 =1
𝑑= 𝑑 = 18
• Compute 𝑡 :
𝑑
𝑡 =0 𝑡 =𝑡 +
𝑑
5 9 14 17
𝒕 = 0, , , , ,1
18 18 18 18
𝑚 = 𝑛+𝑝+1=6+2+1=9
• Open knot vector
𝑼 = [0,0,0, … , 1,1,1]
𝑝+1 𝑝+1
• Inner knots
5 9 14 17 1
𝒕 = 0, , , , , 1 𝑡 = 𝑡
18 18 18 18 𝑝
1 5 9 14
𝑡 = + =
2 18 18 36
14 23 31
𝑼 = 0,0,0, , , , 1,1,1
36 36 36
1 0 0 0 0 0
5 5 5
𝑁 , 𝑁 , 𝑁 , 0 0 0
18 18 18
𝑷 𝑸
9 9 9 𝑷 𝑸
0 𝑁 , 𝑁 , 𝑁 , 0 0
18 18 18 𝑷 𝑸
=
14 14 14 𝑷 𝑸
0 0 𝑁 , 𝑁 , 𝑁 , 0 𝑷 𝑸
18 18 18
𝑷 𝑸
17 17 17
0 0 0 𝑁 , 𝑁 , 𝑁 ,
18 18 18
0 0 0 0 0 1
𝑷𝟑
𝑷𝟐
𝑸𝟑 𝑸𝟐
𝑷𝟒
𝑸𝟒
𝑸𝟏 = 𝑷𝟏
𝑸𝟓
𝑸𝟔 = 𝑷𝟔
𝑷𝟓
• Trimmed surfaces
𝑪 𝑡 = 𝑀 , (𝑡) ⋅ 𝑷
Surface:
𝑺 𝑠, 𝑡 = 𝑀 , 𝑠 ⋅ 𝑀 , (𝑡) ⋅ 𝑷 ,
Shape functions 𝑀 , :
with: • 𝐵 , - Bézier (Bernstein-polynomials)
• 𝑛 ⋅ 𝑚 control points • 𝑁 , - B-Spline
• 𝑛 Points in 𝑠 direction • 𝑅 , - NURBS
• 𝑚 points in 𝑡 direction
• polynomial degree in 𝑠 direction 𝑝 = 𝑛 − 1
• polynomial degree in 𝑡 direction 𝑞 = 𝑚 − 1
1
𝑷 ,
𝑷 ,
0 𝑷 ,
0 1 𝑡
𝑡-direction: 𝑠-direction:
𝑝=3 𝑞=2
𝑼 = [0,0,0,0,1,1,1,1] 𝑽 = [0,0,0, 1, 2,2,2]
• Trimmed surfaces
𝑧 Trim surface
3D:
𝑦
𝑥
1. Map (some)
3. Exclude curve from
intersection points
parameter domain
to parameter space
2. Find interpolating
𝑠 spline curve
2D:
𝑡
From: Watertight trimmed NURBS by Thomas W Sederberg, G Thomas Finnigan, Xin Li, Hongwei Lin,
Heather Ipson ; ACM Transactions on Graphics (2008), Volume: 27, Issue: 3
𝑥(𝑡)
Parametric 𝑪 𝑡 = 𝑦(𝑡)
𝑧(𝑡)
Positivity 𝑁, 𝑡 ≥ 0 ∀𝑡
Approximating
Not/Little oscillating
Knot vector
Controllable continuity (𝐶 )