4 CurvesPartII PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 161

B-Spline curves

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 1


B-Spline curves
• Introduction

• Shape functions

• Knot vector

• Cox de Boor’s algorithm

• De Casteljau analogy

• De Boor’s algorithm

• Refinement

• Properties

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 2


B-Splines: Introduction
Desired features:
• Independent polynomial degree 𝑝 From cubic splines:
• Local influence of control points • Piecewise defined polynomials
• Higher continuity between sub curves • sub-curves are connected

• No oscillations From Bézier curves:


• parametric curve description • Approximation instead Interpolation
• Parametric shape functions

 B-Splines

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 3


B-Splines: Introduction
Basic concept:
• Parametric curve with shape functions (similar to Lagrange polynomials and Bézier curves)

𝑥(𝑡) 𝑃,
𝑪 𝑡 = 𝑦(𝑡) = 𝑁 , (𝑡) ⋅ 𝑷 = 𝑁, 𝑡 ⋅ 𝑃,
𝑧(𝑡) 𝑃,

• 𝑘 - derivative of curve with respect to 𝑡:

𝛿 𝑪 𝑡 𝛿 𝑁 , (𝑡)
𝑪( )
𝑡 = = ⋅𝑷
𝛿𝑡 𝛿𝑡

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 4


B-Spline curves
• Introduction

• Shape functions

• Knot vector

• Cox de Boor’s algorithm

• De Casteljau analogy

• De Boor’s algorithm

• Refinement

• Properties

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 5


B-Splines: Shape functions Remember:
𝑥(𝑡) 𝑃,
𝑪 𝑡 = 𝑦(𝑡) = 𝑁 , (𝑡) ⋅ 𝑷 = 𝑁, 𝑡 ⋅ 𝑃 ,
𝑧(𝑡) 𝑃,
Shape functions:
• Piecewise polynomials  Subdivide parameter space

𝑡
𝑡 𝑡 … 𝑡 … 𝑡

• Values 𝑡 are called knots and are stored in the knot vector 𝑈 = [𝑡 , 𝑡 , … 𝑡 ]

• The range between 𝑡 and 𝑡 is called knot span 𝑖

• Polynomials are defined on knot spans [𝑡 , 𝑡 [

• Polynomial degree 𝑝 is independent of the number of control points 𝑛

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 6


B-Splines: Shape functions
Example setup:

1 2 4 3 5
𝑷 =
0.5 2 2 1 0
𝑃 𝑃
𝑛=5

𝑃
Curve approximation:
𝑃

𝑪 𝑡 = 𝑁 , (𝑡) ⋅ 𝑷 𝑃

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 7


B-Splines: Shape functions
Example setup:
𝑝=0

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 8


B-Splines: Shape functions
Example setup:
𝑝=1

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 9


B-Splines: Shape functions
Example setup:
𝑝=2

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 10


B-Splines: Shape functions Remember:
𝑥(𝑡) 𝑃,
𝑪 𝑡 = 𝑦(𝑡) = 𝑁 , (𝑡) ⋅ 𝑷 = 𝑁, 𝑡 ⋅ 𝑃 ,
𝑧(𝑡) 𝑃,
Piecewise defined polynomials
• 𝑁 , consists of 𝑝 + 1 polynomials 𝑁(𝑡)

• 𝑁 , is non-zero from 𝑡 to 𝑡 𝑡 𝑡 𝑡 𝑡

Example:

𝑈 = [0 1 2 3 4 5 … ]
𝑝=2
𝑁 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 11


B-Splines: Shape functions Remember:
𝑥(𝑡) 𝑃,
𝑪 𝑡 = 𝑦(𝑡) = 𝑁 , (𝑡) ⋅ 𝑷 = 𝑁, 𝑡 ⋅ 𝑃 ,
𝑧(𝑡) 𝑃,
Piecewise defined polynomials

𝑁(𝑡)

𝑡 𝑡

𝑁 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 12


B-Splines: Shape functions Remember:
𝑥(𝑡) 𝑃,
𝑪 𝑡 = 𝑦(𝑡) = 𝑁 , (𝑡) ⋅ 𝑷 = 𝑁, 𝑡 ⋅ 𝑃 ,
𝑧(𝑡) 𝑃,
Piecewise defined polynomials
• Overlap of shape functions 𝑁(𝑡)

• 𝐶 continuity in knot spans 𝑡 𝑡 𝑡 𝑡 𝑡 𝑡

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 13


B-Splines: Shape functions
Example:
𝑝=2
𝑛=5
𝑃 𝑃

• Knot vector
𝑚 =𝑛+𝑝+1=8
𝑃
𝑈 = [0 1 2 3 4 5 6 7]
𝑃

• Curve approximation: 𝑃

𝑪 𝑡 = 𝑁 , (𝑡) ⋅ 𝑷

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 14


B-Splines: Shape functions Remember:
𝑥(𝑡) 𝑃,
𝑪 𝑡 = 𝑦(𝑡) = 𝑁 , (𝑡) ⋅ 𝑷 = 𝑁, 𝑡 ⋅ 𝑃 ,
𝑧(𝑡) 𝑃,
Curve approximation:

𝑃 𝑃

𝑃
𝑃
𝑃

𝑈 = [0 1 2 3 4 5 6 7] Why is the origin interpolated?

𝑡 ∈ [0, 7] 𝑁, 0 = 0 → 𝑪 0 = 0

same holds for 𝑪 7

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 15


B-Splines: Shape functions Remember:
𝑥(𝑡) 𝑃,
𝑪 𝑡 = 𝑦(𝑡) = 𝑁 , (𝑡) ⋅ 𝑷 = 𝑁, 𝑡 ⋅ 𝑃 ,
𝑧(𝑡) 𝑃,
Idea:
• Shrink parameter domain

𝑃 𝑃

𝑃
𝑃
𝑃

𝑈 = [0 1 2 3 4 5 6 7]
Origin is still “half“ interpolated
𝑡 ∈ [1, 6]

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 16


B-Splines: Shape functions
Partition of unity:
• Definition

𝑁 , 𝑁 , 𝑁 ,
𝑁 , (𝑡) = 1 ∀𝑡

𝑁 ,
𝑁 ,
𝑡 𝑁 , (𝑡)

𝑡=0 0

𝑡=1 0.5

𝑡 = 2.5 0.1 + 0.1 + 0.8 = 1.0

𝑡=4 0.5 + 0.5 = 1.0 𝑡=1 𝑡=4


𝑡=0 𝑡 = 2.5

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 17


B-Splines: Shape functions
Partition of unity over the whole parameter domain

ℎ𝑒𝑟𝑒 𝑓𝑜𝑟 𝑝 = 2
𝑁 , (𝑡)

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 18


B-Splines: Shape functions
Idea:
• Shrink parameter domain to space of partition of unity

𝑃 𝑃

𝑃
𝑃
𝑃

𝑈 = [0 1 2 3 4 5 6 7]

𝑡 ∈ [2, 5]

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 19


B-Splines: Shape functions
Example setup: 𝑝=1
• Evaluate shape functions only in the parameter range, where partition of unity is fulfilled

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 20


B-Splines: Shape functions
Example setup: 𝑝 = 2
• Evaluate shape functions only in the parameter range, where partition of unity is fulfilled

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 21


B-Spline curves
• Introduction

• Shape functions

• Knot vector

• Cox de Boor’s algorithm

• De Casteljau analogy

• De Boor’s algorithm

• Refinement

• Properties

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 22


B-Splines: Knot vector
Properties:

𝑡
𝑡 𝑡 … 𝑡 … 𝑡

• Values 𝑡 are called knots and are stored in the knot vector 𝑈 = [𝑡 , 𝑡 , … 𝑡 ]

• The range between 𝑡 and 𝑡 is called knot span 𝑖

• Knots 𝑡 must be in non-descending order: 𝑡 ≤ 𝑡

• Number of knots 𝒎 = 𝒏 + 𝒑 + 𝟏

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 23


B-Splines: Knot vector
Knot multiplicity 𝑘:
• How often is one knot at the same position?

𝑈 = [0, 1, 1, 2, 2, 2]

𝑘=3
𝑘=2
𝑘=1

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 24


B-Splines: Knot vector
Knot multiplicity of outer knots (first and last)

𝑈 = [0 0 0 3 4 5 6 7]

𝑘 =𝑝+1=3

Point is interpolated

𝑪 0 = 𝑁, 0 ⋅𝑷 = 1⋅𝑷 +0⋅𝑷 +0⋅𝑷 +0⋅𝑷 +0⋅𝑷 = 𝑷

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 25


B-Splines: Knot vector
Open knot vector:
• Interpolates first and last control point

• Multiplicity 𝑘 = 𝑝 + 1 at beginning and ending of knot vector

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

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 26


B-Splines: Knot vector
Curve with open knot vector

𝑈 = [0 0 0 3 4 7 7 7]

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 27


B-Splines: Knot vector
Knot multiplicity of inner knots

𝑈 = [0 0 0 3 3 7 7 7] Point is interpolated

𝑪 0 = 𝑁, 0 ⋅𝑷 = 0⋅𝑷 +0⋅𝑷 +1⋅𝑷 +0⋅𝑷 +0⋅𝑷 = 𝑷

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 28


B-Splines: Knot vector
Multiplicity lowers the continuity:
• At knots:

• Within the knot spans:


𝐶

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
⋮ ⋮

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 29


B-Splines: Knot vector
Example for 𝐶 continunity
𝑈 = [0 0 0 3 3 3 7 7 7]

Jump

2 independent curves

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 30


B-Splines: Knot vector
Influence of knot positions

𝑈 = [0 0 0 1 2 777] 𝑈 = [0 0 0 5 6 777]

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 31


B-Splines: Knot vector
Influence of knot positions

𝑈 = [0 0 0 1 2 777] 𝑈 = [0 0 0 5 6 777]

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 32


B-Spline curves
• Introduction

• Shape functions

• Knot vector

• Cox de Boor’s algorithm

• De Casteljau analogy

• De Boor’s algorithm

• Refinement

• Properties

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 33


B-Splines: Cox de Boor’s algorithm
Recursive formulation of shape functions:
• for 𝑝 = 0:

1 𝑡 ∈ [𝑡 , 𝑡 ]
𝑁, 𝑡 =
0 𝑒𝑙𝑠𝑒

• for 𝑝 ≥ 1:

𝑡−𝑡 𝑡 −𝑡 0
𝑁, = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡 ≝0
𝑡 −𝑡 𝑡 −𝑡 0

parameter space where 𝑁 , ≠0 comes from multiplicity k > 1

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 34


B-Splines: Cox de Boor’s algorithm
Derivatives of shape functions
• first derivative:

( ) 𝑁, 𝑡 𝑁 , 𝑡
𝑁, =𝑝⋅ −
𝑡 −𝑡 𝑡 −𝑡

• 𝑘 derivative:

( ) ( )
( )
𝑁, 𝑡 𝑁 , 𝑡
𝑁, =𝑝⋅ −
𝑡 −𝑡 𝑡 −𝑡

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 35


B-Splines: Cox de Boor’s algorithm
Shape functions for 𝑝 = 0:

1 𝑡 ∈ [𝑡 , 𝑡 ]
𝑁, 𝑡 =
𝑁 , 0 𝑒𝑙𝑠𝑒

𝑈 = [0 1 2 3 4 5 … ]

𝑁 ,
Important:
For a parameter 𝑡 in knot span 𝑖 only
shape function 𝑁 , is non zero!

𝑁 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 36


B-Splines: Cox de Boor’s algorithm
Shape functions for 𝑝 = 1: 𝑡−𝑡 𝑡 −𝑡
𝑁, = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡

𝑈 = [0 1 2 3 4 5 … ]
𝑁 ,

𝑁 ,

𝑁 ,

𝑡−𝑡 𝑡 −𝑡 𝑡−0 2 −𝑡 𝑡 𝑡 ∈ [0, 1[


𝑁 , = ⋅𝑁 , + ⋅𝑁 , = ⋅𝑁 , + ⋅𝑁 , =
𝑡 −𝑡 𝑡 −𝑡 1−0 2−1 2−𝑡 𝑡 ∈ [1, 2[

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 37


B-Splines: Cox de Boor’s algorithm
Shape functions for 𝑝 = 1:

piecewise polynomial
 defined on 2 knot spans
𝑁 ,
𝑡 𝑡 ∈ [0, 1[
𝑁 , =
2−𝑡 𝑡 ∈ [1, 2[
𝑁 ,

𝑁 ,

𝑡−1 𝑡 ∈ [1, 2[
𝑁 , =
3−𝑡 𝑡 ∈ [2, 3[
𝑁 ,

𝑁 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 38


B-Splines: Cox de Boor’s algorithm
Shape functions for 𝑝 = 2: 𝑡−𝑡 𝑡 −𝑡
𝑁, = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡

𝑈 = [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[

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 39


B-Splines: Cox de Boor’s algorithm
Computational scheme:

𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,

𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 …
,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑁 , ⋮
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , ⋮
⋮ 𝑁 ,

⋮ ⋮ 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 ,𝑡 [ 𝑁 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 40


B-Splines: Cox de Boor’s algorithm
Derivation of necessary number of knots 𝑚
• 𝑛 shape functions

• 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) 𝑁 ,
𝑡 ∈ [𝑡 ,𝑡 [ 𝑁 ,

 Number of knots needed:

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 41


B-Splines: Cox de Boor’s algorithm
Cox de Boor‘s algorithm for zero knot spans:

𝑈 = [0 0 0 3 4 5 6 7] zero shape functions


𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,

𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑁 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,
, 𝑁 ,
𝑁 , 𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 𝑁
𝑁 ,
,
,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 42


B-Splines: Cox de Boor’s algorithm
Cox de Boor‘s algorithm for open knot vector:

𝑈 = [0 0 0 3 4 7 7 7] zero shape functions


𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,

𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 , 𝑁 , 𝑁 ,
𝑁 , 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑁 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁
𝑁 , , , 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 43


B-Splines: Cox de Boor’s algorithm
Example 1: 𝑡−𝑡 𝑡 −𝑡
𝑁, = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡
𝑈 = [0 0 0 1 1 1]

→𝑝=2 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,

𝑁 ,
𝑚 =𝑛+𝑝+1 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
→ 𝑛 =𝑚−𝑝 −1=3
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,

 All shape functions base on 𝑁 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 44


B-Splines: Cox de Boor’s algorithm
Example 1: 𝑡−𝑡 𝑡 −𝑡
𝑁, = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
• 𝑝 = 0: 𝑡 −𝑡 𝑡 −𝑡

𝑁 , 𝑡 = 𝑁 , 𝑡 = = 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

𝑁 , 𝑁 ,

𝑁 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 46


B-Splines: Cox de Boor’s algorithm
𝑝
Example 2:
𝑁 ,
𝑈 = [0 0 0 0 1 2 3 3 3 3] 𝑁 ,
𝑁 , 𝑁 ,
open knot vector → 𝑝 = 3 𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑚 =𝑛+𝑝+1 𝑁 , 𝑁 ,
𝑁 , 𝑁 ,

→ 𝑛 =𝑚−𝑝 −1=6 𝑁 , 𝑁 ,
𝑖 𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑁 , 𝑁 ,
𝑁 ,
𝑁 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 47


B-Splines: Cox de Boor’s algorithm
Example 2:
• 𝑝 = 0:
𝑁 , 𝑡 = 𝑁 , 𝑡 = 𝑁 , 𝑡 = 0 𝑡∈ℝ

𝑁 , 𝑡 = 1 𝑡 ∈ [0, 1[

𝑁 , 𝑡 = 1 𝑡 ∈ [1, 2[

𝑁 , 𝑡 = 1 𝑡 ∈ [2, 3[

𝑁 , 𝑡 = 𝑁 , 𝑡 = 𝑁 , 𝑡 = 0 𝑡∈ℝ

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 48


B-Splines: Cox de Boor’s algorithm
Example 2: 𝑡−𝑡 𝑡 −𝑡
• 𝑝 = 1: 𝑁 , (𝑡) = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡

𝑁 , 𝑡 =𝑁 , 𝑡 = 0 𝑡∈ℝ

1−𝑡
𝑁 , 𝑡 = ⋅𝑁 , = (1 − 𝑡) 𝑡 ∈ [0, 1[
1−0
𝑡−0 2−𝑡 𝑡 𝑡 ∈ [0, 1[
𝑁 , 𝑡 = ⋅𝑁 , + ⋅𝑁 , = 𝑡 ∈ [1, 2[
1−0 2−1 (2 − 𝑡)

𝑡−1 3−𝑡 (𝑡 − 1) 𝑡 ∈ [1, 2[


𝑁 𝑡 = ⋅𝑁 + ⋅𝑁 =
,
2−1 ,
3−2 , (3 − 𝑡) 𝑡 ∈ [2, 3[

𝑡−2
𝑁 , 𝑡 = ⋅𝑁 , = (𝑡 − 2) 𝑡 ∈ [2, 3[
3−2

𝑁 , 𝑡 =𝑁 , 𝑡 = 0 𝑡∈ℝ

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 49


B-Splines: Cox de Boor’s algorithm
Example 2: 𝑡−𝑡 𝑡 −𝑡
• 𝑝 = 2: 𝑁 , (𝑡) = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡

𝑁 , 𝑡 = 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,1[ 3 𝑡 𝑡−1 𝑡 ∈ [1,2[


= ⋅ + − ⋅
2 2−𝑡 𝑡 ∈ [1,2[ 2 2 3−𝑡 𝑡 ∈ [3,4[

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 50


B-Splines: Cox de Boor’s algorithm
Example 2: 𝑡−𝑡 𝑡 −𝑡
• 𝑝 = 2: 𝑁 , (𝑡) = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡

0.5𝑡 𝑡 ∈ [0,1[
𝑡−0 3−𝑡
𝑁 , 𝑡 = ⋅𝑁 , + ⋅𝑁 , = 0.5𝑡 + 3𝑡 − 1.5 𝑡 ∈ [1,2[
2−0 3−1 𝑡 ∈ [2,3[
0.5𝑡 − 3𝑡 + 4.5

𝑡−1 3−𝑡 0.5𝑡 − 𝑡 + 0.5 𝑡 ∈ [1,2[


𝑁 , 𝑡 = ⋅𝑁 , + ⋅𝑁 , =
3−1 3−2 −1.5𝑡 + 7𝑡 − 7.5 𝑡 ∈ [2,3[

𝑡−2
𝑁 , 𝑡 = ⋅𝑁 , = 𝑡−2 𝑡 ∈ [2, 3[
3−2

𝑁 , 𝑡 = 0 𝑡∈ℝ

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 51


B-Splines: Cox de Boor’s algorithm
Example 2: 𝑡−𝑡 𝑡 −𝑡
• 𝑝 = 3: 𝑁 , (𝑡) = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡

1−𝑡
𝑁 , 𝑡 = ⋅𝑁 , = −𝑡 + 3𝑡 − 3𝑡 + 1 𝑡 ∈ [0, 1[
1−0

𝑡−0 2−𝑡 𝑡 − 𝑡 + 3𝑡 𝑡 ∈ [0, 1[


𝑁 , 𝑡 = ⋅𝑁 , + ⋅𝑁 , =
1−0 2−0 1+ 𝑡− 𝑡−1 + 𝑡−1 𝑡 ∈ [1, 2[

− 𝑡 + 𝑡
𝑡 ∈ [0,1[
𝑡−0 3−𝑡
𝑁 , 𝑡 = ⋅𝑁 , + ⋅𝑁 , = + 𝑡− 𝑡−1 + 𝑡−1 𝑡 ∈ [1,2[
2−0 3−0
− 𝑡+ 𝑡−2 − 𝑡−2 𝑡 ∈ [2,3[

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 52


B-Splines: Cox de Boor’s algorithm
Example 2: 𝑡−𝑡 𝑡 −𝑡
• 𝑝 = 3: 𝑁 , (𝑡) = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡

𝑡
𝑡 ∈ [0,1[
𝑡−0 3−𝑡
𝑁 , 𝑡 = ⋅𝑁 , + ⋅𝑁 , = − + 𝑡− 𝑡−1 − 𝑡−1 𝑡 ∈ [1,2[
3−0 3−1
− 𝑡+ 𝑡−2 − 𝑡−2 𝑡 ∈ [2,3[

𝑡−1 3−𝑡 (𝑡 − 1) 𝑡 ∈ [1, 2[


𝑁 𝑡 = ⋅𝑁 + ⋅𝑁 =
,
3−1 ,
3−2 ,
− − 𝑡+ 𝑡−2 − 𝑡−2 𝑡 ∈ [2, 3[

𝑡−2
𝑁 , 𝑡 = ⋅𝑁 , = 𝑡−2 𝑡 ∈ [2, 3[
3−2

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 53


B-Splines: Cox de Boor’s algorithm
Example 2:
• Shape functions:

𝑁(𝑡)

𝑁 , 𝑁 ,

𝑁 , 𝑁 , 𝑁 , 𝑁 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 54


B-Splines: Cox de Boor’s algorithm
Summary:
• Given a knot vector 𝑈 = [𝑡 , 𝑡 , … 𝑡 ] shape functions of any degree can be computed using
Cox de Boor‘s formula:

𝑡−𝑡 𝑡 −𝑡
𝑁 , (𝑡) = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡

• at any parameter 𝑡. Along with a chosen set of control points, the corresponding B-Spline
curve 𝑪(𝑡) can be computed:

𝑥(𝑡) 𝑃,
𝑪 𝑡 = 𝑦(𝑡) = 𝑁 , (𝑡) ⋅ 𝑷 = 𝑁, 𝑡 ⋅ 𝑃,
𝑧(𝑡) 𝑃,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 55


B-Spline curves
• Introduction

• Shape functions

• Knot vector

• Cox de Boor’s algorithm

• De Casteljau analogy

• De Boor’s algorithm

• Refinement

• Properties

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 56


B-Splines: De Casteljau analogy
Motivation:
• Analogously to De Casteljau’s algorithm for Bézier curves (see CIE 1) also B-Splines
curves can be constructed geometrically

• 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

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 57


B-Splines: De Casteljau analogy
Properties for Bézier curves:
• Fixed polynomial degree: 𝑝 = 𝑛 − 1
• Fixed knot vector: 𝑚 = 𝑛 + 𝑝 + 1 = 2 ⋅ 𝑝

 open knot vector without inner knots no inner knots

𝑈 é = [0 0 0 … 0 1 … 1 1 1]

Bernstein polynomials: 𝑝+1 𝑝+1


𝐵(𝑡)
Remark:
1 𝐵 , 𝐵 , Note that all functions
are global, hence all
control points 𝑷
𝐵 , 𝐵 𝐵 𝐵 , influence the entire
, ,
curve.

𝑡
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

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 59


B-Splines: De Casteljau analogy
Remember De Casteljau’s algorithm for Bézier curves

𝑡 = 0.5
𝑛=6 →𝑝=5

Idea: Run De Casteljau‘s algorithm only on a subset of the control points

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 60


B-Splines: De Casteljau analogy
Geometric modelling of a B-Spline curve:

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… ⋮

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 61


B-Splines: De Casteljau analogy
Example:
• Curve on knot span 𝑡 ∈ [2, 3[
• Which shape functions affect the curve?
𝑁 , 𝑁 , 𝑁 , …

𝑁 , 𝑡 ≠0 𝑡 ∈ [2, 3[

𝑁 ,
𝑁 , 𝑡 ≠0 𝑡 ∈ [2, 3[

𝑁 , 𝑡 ≠0 𝑡 ∈ [2, 3[

𝑁, 𝑡 = 0 𝑡 ∈ [2, 3[ ∀ 𝑖 > 3

• Which points have influence on the curve?


 Those, which correspond to the non-zero shape functions in that interval, so here
𝑷 𝑷 𝑷

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 62


B-Splines: De Casteljau analogy
Example:
• Curve on first knot span 𝑡 ∈ [2, 3[

𝑪 𝑡 = 𝑁, ⋅𝑷 = 𝑁 , 𝑡 ⋅𝑷 + 𝑁 , 𝑡 ⋅𝑷 + 𝑁 , 𝑡 ⋅𝑷

𝑡−0 3−𝑡
= ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡 ⋅𝑷 +
2−0 3−1
𝑡−1 4−𝑡
+ ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡 ⋅𝑷 +
3−1 4−2
𝑡−2 5−𝑡
+ ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡 ⋅𝑷
4−2 5−3

𝑡−𝑡 𝑡 −𝑡
𝑁 , (𝑡) = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 63


B-Splines: De Casteljau analogy
𝑡−0 3−𝑡
Example: = ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡 ⋅𝑷 +
2 2
𝑡−1 4−𝑡
+ ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡 ⋅𝑷 +
2 2
𝑡−2 5−𝑡
+ ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡 ⋅𝑷
2 2

𝑡−0 3−𝑡
= ⋅ 𝑡−0 ⋅𝑁 , 𝑡 + 2−𝑡 ⋅𝑁 , 𝑡 + ⋅ 𝑡−1 ⋅𝑁 , 𝑡 + 3 − 𝑡 ⋅ 𝑁 , (𝑡) ⋅𝑷 +
2 2

𝑡−1 4−𝑡
+ ⋅ 𝑡−1 ⋅𝑁 , 𝑡 + 3−𝑡 ⋅𝑁 , 𝑡 + ⋅ 𝑡−2 ⋅𝑁 , 𝑡 + 4 − 𝑡 ⋅ 𝑁 , (𝑡) ⋅𝑷 +
2 2

𝑡−2 5−𝑡
+ ⋅ 𝑡−2 ⋅𝑁 , 𝑡 + 4−𝑡 ⋅𝑁 , 𝑡 + ⋅ 𝑡−3 ⋅𝑁 , 𝑡 + 5 − 𝑡 ⋅ 𝑁 , (𝑡) ⋅𝑷
2 2

𝑡−𝑡 𝑡 −𝑡
𝑁 , (𝑡) = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 64


B-Splines: De Casteljau analogy
Example:
• Which shape functions 𝑁 , are non-zero at first knot span 𝑡 ∈ [2,3[ ?

𝑁 , 𝑁 , 𝑁 , 𝑁 , …
𝑁 , 𝑡 ≠0 𝑡 ∈ [2 3[

𝑁, 𝑡 = 0 𝑡 ∈ [2 3 [ ∀ 𝑖 ≠ 3

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 65


B-Splines: De Casteljau analogy
Example:

𝑡−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

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 66


B-Splines: De Casteljau analogy
Example:
• with:
𝑁, 𝑡 ⋅𝑷 = 𝑷 iff 𝑁 , (𝑡) ≠ 0

3−𝑡 𝑡−1 4−𝑡 𝑡−2


= ⋅ 3−𝑡 ⋅𝑷 + ⋅ 3−𝑡 ⋅𝑷 + ⋅ 𝑡−2 ⋅𝑷 + ⋅ 𝑡−2 ⋅𝑷 =
2 2 2 2

3−𝑡 𝑡−1 4−𝑡 𝑡−2


= 3−𝑡 ⋅ ⋅𝑷 + ⋅𝑷 + 𝑡−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 𝑡 ∈ [𝑡 , 𝑡 ]

• In each knot span 𝑡 ∈ [𝑡 , 𝑡 [ we introduce a local parameter 𝑠 = [0 1[


𝑠 = [0 1[ 𝑠 = [0 1[
𝑠 = [0 1[ 𝑠 = [0 1[

𝑡 𝑡 … 𝑡 𝑡 … 𝑡

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 68


B-Splines: De Casteljau analogy
Analogy to de Casteljau’s algorithm
• 𝑝=2
Level p = 1:
𝑷 • 𝑷 𝑷 with 𝑠 ∈ [0.5, 1[
• 𝑷 𝑷 with 𝑠 ∈ [0, 0.5[
𝑷 ,
𝑷 ,
𝑷 ,
Level p = 2:
• 𝑷 , 𝑷 , with 𝑠 ∈ [0, 1[

with 𝑠 ∈ [0,1[ being the interpolation


𝑷 parameter of each line 𝑷 𝑷
𝑷

Observation: In contrast to De Casteljau‘s algorithm for Bézier curves:


• only the lines of 𝑝 + 1 control points are used
• not all lines between the control points are entirely interpolated

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 69


B-Splines: De Casteljau analogy
• Comment on indices for the intermediate points

,
polynomial degree 𝑝
knot span 𝑖 i.e. 𝑡 ∈ [𝑡 , 𝑡 ]

• Points are counted backwards starting from 𝑖


(explained in section: de Boor‘s algorithm)
[𝑷 , , … , 𝑷 , , 𝑷 , , 𝑷 , ]

“Starting” from 𝑖 going backwards 𝑝 + 1 control points…

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 70


B-Splines: De Casteljau analogy
Analogy to de Casteljau’s algorithm
• 𝑝=3

𝑷 , 𝑷 𝑷 ,
, 𝑈 = [0 1 2 3 4 5 6 7 8]
𝑷 ,
𝑷 ,
partition of unity is only
𝑷 , 𝑷 , here fulfilled
𝑷 ,

curve in knot span [4, 5]


curve in knot
span [3, 4] 𝑷 ,

𝑷 ,

𝑷 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 71


B-Splines: De Casteljau analogy
Analogy to de Casteljau’s algorithm:
• Interpolation parameter for different polynomial degrees 𝑝 → 𝑛 =𝑝+1
• Attention: This holds only for equidistant knots

𝑠∈ ,1 𝑠∈ , 𝑠∈ , 𝑠∈ , 𝑠 ∈ 0,
𝑝=5
𝑠∈ ,1 𝑠∈ , 𝑠∈ , 𝑠 ∈ 0,
𝑝=4
𝑠∈ ,1 𝑠∈ , 𝑠 ∈ 0,
𝑝=3
𝑠∈ ,1 𝑠 ∈ 0,
𝑝=2

𝑠 ∈ 0, 1
𝑝=1

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 72


B-Splines: De Casteljau analogy
Differences to De Casteljau’s algorithm (for Bézier curves):
• Polynomial degree is independent of number of control points

• Local support: Not all control points are taken into account

• Works (at the moment) with an equidistant knot vector

Non-equidistant knot vector:


 See De Boor’s algorithm

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 73


B-Splines: De Casteljau analogy
Example:

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

• Cox de Boor’s algorithm

• Bézier analogy

• De Boor’s algorithm

• Refinement

• Properties

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 75


B-Splines: De Boor’s algorithm
Remember from the calculation of the shape functions:

3−𝑡 𝑡−1 4−𝑡 𝑡−2


…= 3−𝑡 ⋅ ⋅𝑷 + ⋅𝑷 + 𝑡−2 ⋅ ⋅𝑷 + ⋅𝑷
2 2 2 2

interpolation interpolation
= 3−𝑡 ⋅ 𝑷 , + 𝑡−2 ⋅ 𝑷 ,

These correspont to De Boor‘s interpolation


parameter α ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 76


B-Splines: De Boor’s algorithm
Derivation of de Boor’s algorithm:
• Consider 𝑡 inside knot span [𝑡 , 𝑡 [

𝑡 𝑡 … 𝑡 𝑡 … 𝑡

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 77


B-Splines: De Boor’s algorithm
Derivation of de Boor’s algorithm: 𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 ,
• Which control points are affected? 𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁 , 𝑁 ,
→ 𝑘𝑛𝑜𝑡 𝑠𝑝𝑎𝑛 𝑖 𝑁 … 𝑁 ,
,
⋮ ⋮
→ 𝑷 ,…,𝑷 ⋮ ⋮
𝑁 ,
→ 𝑛 =𝑝+1 𝑁 , …
𝑁 ,
𝑡 ∈ [𝑡 , 𝑡 [ 𝑁, ⋮
𝑁 ,
𝑁,
𝑁, … 𝑁 ,

⋮ 𝑁,

⋮ ⋮
𝑁 , …
𝑡 ∈ [𝑡 ,𝑡 [ 𝑁 , 𝑁 ,
𝑁 ,

𝑁 ,
𝑡 ∈ [𝑡 ,𝑡 [ 𝑁 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 78


B-Splines: De Boor’s algorithm
Derivation of de Boor’s algorithm:
𝑁
• Example of affected control points ,
𝑁 ,
𝑁 , 𝑁 ,
𝑖=6 i.e. 𝑡 ∈ [𝑡 , t [ 𝑁 , 𝑁 , 𝑷
𝑝=3 𝑁 , 𝑁 ,
𝑁 , 𝑁 , 𝑷
𝑁 , 𝑁
→ 𝑛 =𝑝+1=4 ,
𝑁 , 𝑁 , 𝑷
→ 𝑷 ,…,𝑷 𝑁 , 𝑁 ,
𝑁 , 𝑁 , 𝑷
→ 𝑷 ,𝑷 ,𝑷 ,𝑷 𝑁 , 𝑁 ,
𝑁 , 𝑁 , 𝑷
𝑁 , 𝑁 ,
𝑁 , 𝑁 , 𝑷
𝑁 , 𝑁 ,
𝑁 ,
𝑁 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 79


B-Splines: De Boor’s algorithm
Derivation of de Boor’s algorithm:
• Linear interpolation on line [𝑷 , ,𝑷 , ]

recursive call to intermediate control points one level below (down to the actual
control points 𝑷 , = 𝑷 )

𝑪 𝑡 = 𝑷 , = 1−𝛼 , ⋅𝑷 , +𝛼, ⋅𝑷,

De Boor‘s interpolation parameter

Remarks:
• This algorithm evaluates the curve directly. No shape functions are computed.
• Intermediate control points 𝑷 , are recursively interpolated from actual control points

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 80


B-Splines: De Boor’s algorithm
Consider the following setup:

𝑝=3
𝑡 ∈ [𝑡 , 𝑡 [ → 𝑁 , ≠0

Calculation of the point on curve in that knot span: 𝑖 = 4:

𝑪 𝑡 =𝑷 , = 𝑁, 𝑡 ⋅𝑷 ,

= 𝑁 , (𝑡) ⋅ 𝑷 , + 𝑁 , (𝑡) ⋅ 𝑷 , +𝑁 , (𝑡) ⋅ 𝑷 , + 𝑁 , (𝑡) ⋅ 𝑷 ,

with:
𝑡−𝑡 𝑡 −𝑡
𝑁, = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 81


B-Splines: De Boor’s algorithm
Without condensing the equations: Remember:
𝑡−𝑡 𝑡 −𝑡
𝑁, = ⋅𝑁, 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡
𝑪 𝑡 =𝑷 , = 𝑁, 𝑡 ⋅𝑷 =

=𝑁 , 𝑡 ⋅𝑷 +𝑁 , 𝑡 ⋅𝑷 +𝑁 , 𝑡 ⋅ 𝑷 + 𝑁 , (𝑡) ⋅ 𝑷

𝑡−𝑡 𝑡 −𝑡
p = 3: 𝑁 , 𝑡 = ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡

𝑡−𝑡 𝑡 −𝑡
p = 2: 𝑁 , 𝑡 = ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡
𝑡−𝑡 𝑡 −𝑡
p = 1: 𝑁 , 𝑡 = ⋅𝑁 , 𝑡 + ⋅𝑁 , 𝑡
𝑡 −𝑡 𝑡 −𝑡

p = 0: 𝑁 , 𝑡 =0

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 82


B-Splines: De Boor’s algorithm
Without condensing the equations (𝑁 , = 1 and 𝑁 , = 0 𝑖≠4)
𝑁 ,

𝑁 , 𝑁 ,

𝑡−𝑡 𝑡−𝑡 𝑡−𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡−𝑡 𝑡 −𝑡


𝑁 , = ⋅ ⋅ ⋅𝑁 , + ⋅𝑁 , + ⋅ ⋅𝑁 , + ⋅𝑁 , +
𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡

𝑁 ,

𝑁 , 𝑁 ,

𝑡 −𝑡 𝑡−𝑡 𝑡−𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡−𝑡 𝑡 −𝑡


+ ⋅ ⋅ ⋅𝑁 , + ⋅𝑁 , + ⋅ ⋅𝑁 , + ⋅𝑁 ,
𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡

𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡
𝑁 , = ⋅ ⋅ 𝑁, ,𝑁, ,𝑁 , analogously
𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡

These factors correspond to the De Boor’s factors 𝛼


Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 83
B-Splines: De Boor’s algorithm Remember De Boor‘s algorithm:
𝑷, = 1−𝛼 , ⋅𝑷 , +𝛼 , ⋅𝑷 ,

On the highest level:

𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡−𝑡 𝑡−𝑡 𝑡 −𝑡 𝑡−𝑡


𝑷 , = ⋅ ⋅ ⋅𝑷 + ⋅𝑷 + ⋅ ⋅𝑷 + ⋅𝑷 +
𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡

(1 − 𝛼 , ) 𝑷 ,

𝑡−𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡−𝑡 𝑡−𝑡 𝑡 −𝑡 𝑡−𝑡


+ ⋅ ⋅ ⋅𝑷 + ⋅𝑷 + ⋅ ⋅𝑷 + ⋅𝑷
𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡

𝛼 , 𝑷 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 84


B-Splines: De Boor’s algorithm Remember De Boor‘s algorithm:
𝑷, = 1−𝛼 , ⋅𝑷 , +𝛼 , ⋅𝑷 ,

For the middle level:

𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡−𝑡 𝑡−𝑡 𝑡 −𝑡 𝑡−𝑡


𝑷 , = ⋅ ⋅ ⋅𝑷 + ⋅𝑷 + ⋅ ⋅𝑷 + ⋅𝑷 +
𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡

(1 − 𝛼 , ) 𝑷 , 𝛼 , 𝑷 ,

𝑷 ,

𝑡−𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡−𝑡 𝑡−𝑡 𝑡 −𝑡 𝑡−𝑡


+ ⋅ ⋅ ⋅𝑷 + ⋅𝑷 + ⋅ ⋅𝑷 + ⋅𝑷
𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡

(1 − 𝛼 , ) 𝑷 , 𝛼 , 𝑷 ,

𝑷 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 85


B-Splines: De Boor’s algorithm Remember De Boor‘s algorithm:
𝑷, = 1−𝛼 , ⋅𝑷 , +𝛼 , ⋅𝑷 ,

For the lowest level:

𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡−𝑡 𝑡−𝑡 𝑡 −𝑡 𝑡−𝑡


𝑷 , = ⋅ ⋅ ⋅𝑷 + ⋅𝑷 + ⋅ ⋅𝑷 + ⋅𝑷 +
𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡

(1 − 𝛼 , ) 𝛼 , (1 − 𝛼 , ) 𝛼 ,

𝑷 , 𝑷 ,

𝑡−𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡−𝑡 𝑡−𝑡 𝑡 −𝑡 𝑡−𝑡


+ ⋅ ⋅ ⋅𝑷 + ⋅𝑷 + ⋅ ⋅𝑷 + ⋅𝑷
𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡

(1 − 𝛼 , ) 𝛼 , (1 − 𝛼 , ) 𝛼 ,

𝑷 , 𝑷 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 86


B-Splines: De Boor’s algorithm
Derivation of de Boor’s algorithm:
recursion counter 𝑟
• Preliminary considerations of de Boor’s parameter

𝑷 𝑷 𝑷 𝑷 𝑟=4 𝑙𝑒𝑣𝑒𝑙 0

𝑡−𝑡 𝑡−𝑡 𝑡−𝑡


𝛼 , = 𝛼 , = 𝛼 , = 𝑟=3 𝑙𝑒𝑣𝑒𝑙 1
𝑡 −𝑡 𝑡 −𝑡 𝑡 −𝑡

𝑡−𝑡 𝑡−𝑡
𝛼 , = 𝛼 , = 𝑟=2 𝑙𝑒𝑣𝑒𝑙 2
𝑡 −𝑡 𝑡 −𝑡
𝑡−𝑡
𝛼, =
𝑡 −𝑡
𝑡−𝑡
𝛼 , = 𝑟=1 𝑙𝑒𝑣𝑒𝑙 3
𝑡 −𝑡

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 87


B-Splines: De Boor’s algorithm
Pseudo Code: 1 function P = deBoor( t, i, p, U, CP, r )
2 Input: t: parameter value
3 i: current knot span
4 p: polynomial degree
5 U: knot vector
6 CP: control points
7 Output: P: point on curve
8 if firstCall -> r = 1
9
10 if r == p+1
11 P = CPi
12 return
13 end
14
15 αi,r = (t-ti)/(ti+r-ti))
16
17 Pi-1,p-1 = deBoor(t, i-1,p,U,CP, r+1)
18 Pi,p-1 = deBoor(t, i, p,U,CP, r+1)
19
20 Pi,p = (1- αi,r). Pi-1,p-1 + αi,r . Pi,p-1
21 end

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 88


B-Splines: De Boor’s algorithm
Consider a non-equidistant knot vector:
Example:
𝑷
𝑈 = [0 0 0 0 1 4 9 9 9 9]

𝑝=3 𝑛=6

We consider:
𝑷
𝑡 ∈ [𝑡 , 𝑡 [ = [1, 4[

→𝑖=5

Affected control points:


𝑷 ,𝑷 ,𝑷 ,𝑷
𝑷
𝑷

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 89


B-Splines: De Boor’s algorithm
De Boor’s formulas: 𝑈 = [0 0 0 0 1 4 9 9 9 9]

𝑷, = 1−𝛼, ⋅𝑷 +𝛼 , ⋅𝑷 , 𝑡−𝑡
, 𝛼, =
𝑡 −𝑡

Highest level (r = 1):


𝑡−𝑡 𝑡−1
𝑷 , = 1−𝛼 , ⋅𝑷 , +𝛼 , ⋅𝑷 , 𝛼 , = =
𝑡 −𝑡 4−1

Middle level (r = 2):


𝑡−𝑡 𝑡−0
𝑷 , = 1−𝛼 , ⋅𝑷 , +𝛼 , ⋅𝑷 , 𝛼 , = =
𝑡 −𝑡 4−0

𝑡−𝑡 𝑡−1
𝑷 = 1−𝛼 ⋅𝑷 +𝛼 ⋅𝑷 𝛼 , = =
, , , , , 𝑡 −𝑡 9−1

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 90


B-Splines: De Boor’s algorithm
De Boor’s formulas: 𝑈 = [0 0 0 0 1 4 9 9 9 9]

𝑷, = 1−𝛼, ⋅𝑷 +𝛼 , ⋅𝑷 , 𝑡−𝑡
, 𝛼, =
𝑡 −𝑡

3rd level (r = 3):


𝑡−𝑡 𝑡−0
𝑷 , = 1−𝛼 , ⋅𝑷 +𝛼 , ⋅𝑷 𝛼 , = =
𝑡 −𝑡 4−0

𝑡−𝑡 𝑡−0
𝑷 , = 1−𝛼 , ⋅𝑷 +𝛼 , ⋅𝑷 𝛼 , = =
𝑡 −𝑡 9−0

𝑡−𝑡 𝑡−1
𝑷 , = 1−𝛼 , ⋅𝑷 +𝛼 , ⋅𝑷 𝛼 , = =
𝑡 −𝑡 9−1

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 91


B-Splines: De Boor’s algorithm
For the entire curve for 𝑡 ∈ [1, 4[

𝑪 𝑡 ∈ [1,4[ =

𝑷 , = 1−𝛼 , ⋅ 1−𝛼 , ⋅ 1−𝛼 , ⋅𝑷 +𝛼 , ⋅𝑷 +𝛼 , ⋅ 1−𝛼 , ⋅𝑷 +𝛼 , ⋅𝑷

𝑷 , 𝑷 ,

𝑷 ,

+𝛼 , ⋅ 1−𝛼 , ⋅ 1−𝛼 , ⋅𝑷 +𝛼 , ⋅𝑷 +𝛼 , ⋅ 1−𝛼 , ⋅𝑷 +𝛼 , ⋅𝑷

𝑷 , 𝑷 ,

𝑷 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 92


B-Splines: De Boor’s algorithm
Remember de Casteljau’s analogy for equidistant knots: e.g. 𝑈 = [0000 1 2 3 … ]
• 𝑝=3
0
1
1
2
1
2 1 2
3 3 0
1 𝑷
𝑷 , ,

2
1
3
3

1
0
curve in knot span [4, 5[
curve in knot 𝑷 ,
span [3, 4[

𝑷 ,
𝑷 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 93


B-Splines: De Boor’s algorithm
Using the local parameter 𝑠 ∈ [0, 1[ in knot span 𝑡 ∈ [1, 4[
0 1
• Exemplarily for 𝑷 , (𝑠) with 𝑷 = ,𝑷 = :
0 0

𝑠 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

𝑷 𝑷 (𝑠) 𝑷
,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 94


B-Splines: De Boor’s algorithm
De Casteljau’s algorithm with De Boor’s values:

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

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 95


B-Splines: De Boor’s algorithm
De Casteljau’s algorithm with De Boor’s values:

Middle level: 𝑷

𝑡 𝑡 ∈ [1, 4[
𝛼 , =
4 𝑷 , (𝑠)
𝑷 , (𝑡) = 1 − 𝛼 , ⋅𝑷 , (𝑡) + 𝛼 , ⋅ 𝑷 , (𝑡)
𝑡−1 𝑷
𝛼 , =
8 3
𝛼 ,
8
1
𝑈 = [0 0 0 0 1 4 9 9 9 9]
0
𝛼 ,
1
4 𝑷 (𝑠)
,

𝑷
𝑷 𝑷 , (𝑠)

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 96


B-Splines: De Boor’s algorithm
De Casteljau’s algorithm with De Boor’s values:

Highest level: 𝑷

𝑡−1 𝑡 ∈ [1, 4[
𝛼 , = 𝑷 = 1−𝛼 ⋅𝑷 +𝛼 ⋅𝑷
3 , , , , ,

1
𝑷 , (𝑠)
𝑈 = [0 0 0 0 1 4 9 9 9 9]
0
𝛼 ,

𝑷 , (𝑠)

𝑷
𝑷

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 97


B-Spline curves
• Introduction

• Shape functions

• Knot vector

• Cox de Boor’s algorithm

• Bézier analogy

• De Boor’s algorithm

• Refinement

• Properties

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 98


B-Splines: Refinement
Task:
• Change the setup of the spline without changing the shape of the curve

Two possibilities:
1. Knot insertion
 Add a new knot 𝑡 into the knot vector 𝑼
𝑼 = [𝑡 , … , 𝑡 ]

𝑼 = [𝑡 , … , 𝑡 ,…,𝑡 ]

2. Degree elevation
 Raise polynomial degree
𝑝 =𝑝+1

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 99


B-Splines: Refinement
1. Knot insertion:
• Let 𝑡 be in knot span
𝑡 ∈ [𝑡 , 𝑡 [

• Find new control points 𝑸 (analogous to de Boor’s algorithm) on control


polygon legs 𝑷 𝑷 to 𝑷 𝑷 (i.e. lines between affected control
points)

𝑸 = 1−𝛼 ⋅𝑷 +𝛼 ⋅𝑷

𝑡 −𝑡
𝛼 = 𝑗 ∈ [𝑖 − 𝑝 + 1, 𝑖]
𝑡 −𝑡

• Remark: Keep first and last control point (𝑸 =𝑷 and 𝑸 =𝑷)

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 100


B-Splines: Refinement
𝑷
Example:
𝑝=2 𝑈 = [0 0 0 1 1 1]

Insert knot:
𝑡 = 0.25

Affected knot span 𝑖 ? 𝑷 𝑷


𝑡 ∈ 𝑡 ,𝑡 →𝑖=3

Find the control polygon legs 𝑷 𝑷 to 𝑷 𝑷:

no legs in between

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 101


B-Splines: Refinement
𝑷
Determine new control points 𝑄

𝑸 = 1−𝛼 ⋅𝑷 +𝛼 ⋅𝑷

𝑡 −𝑡
𝛼 = 𝑗 ∈ [𝑖 − 𝑝 + 1, 𝑖]
𝑡 −𝑡

𝑈 = [0 0 0 1 1 1] 𝑷 𝑷

with 𝑗 ∈ 3 − 2 + 1, 3 = [2, 3]:


𝑡 −𝑡 0.25 − 0
𝑸 = 1−𝛼 ⋅𝑷 +𝛼 ⋅𝑷 𝛼 = = = 0.25
𝑡 −𝑡 1−0
𝑡 −𝑡 0.25 − 0
𝑸 = 1−𝛼 ⋅𝑷 +𝛼 ⋅𝑷 𝛼 = = = 0.25
𝑡 −𝑡 1−0

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 102


B-Splines: Refinement
𝑷
Keep first and last affected control point:
𝑸
𝑸 =𝑷

𝑸 =𝑷 𝑸

𝑸 𝑸
𝑷 𝑷

Now gives exactly the same curve as before


(just with a different description)

Such a process may also be called


Re-parametrization 𝑷 𝑷

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 103


B-Splines: Refinement
Knot insertion: Example 2
𝑝=4 𝑡 ∈ [𝑡 , 𝑡 [

𝑷 𝑷
𝑦 𝑦

𝑷 𝑷
𝑷 𝑷

𝑷
𝑷 𝑷

𝑷 𝑷 𝑷 𝑷
𝑷 𝑷

𝑷 𝑷
𝑷 𝑷
𝑥 𝑥

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 104


B-Splines: Refinement
2. Order elevation: Not treated
Preliminary consideration: Degree elevation of Bézier curve
• New number of control points
𝑛=𝑝+1
𝑛 =𝑝 +1=𝑛+1 𝑦
𝑷

𝑸 𝑸
• Find on each control polygon line a new Point 𝑸
𝑷
𝑖 𝑖 𝑷
𝑸 = ⋅𝑷 + 1− ⋅𝑷 i ∈ [2, 𝑛 − 1]
𝑛 𝑛
𝑸 𝑸

• Keep first and last point


𝑷 𝑷
𝑸 = 𝑷
𝑥
Bézier curve
𝑸 = 𝑷

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 105


B-Splines: Refinement
2. Order elevation for B-Splines Not treated
• Subdivide B-Spline into several Bézier segments (using knot insertion)
𝑼 = 𝑡 ,…,𝑡 ,𝑡 ,…,𝑡 ,…,𝑡 ,…,𝑡
𝑝+1 𝑝+1

𝑼 = 𝑡 ,…,𝑡 ,𝑡 ,…,𝑡 ,…,𝑡 ,…,𝑡 ,…,𝑡 ,…,𝑡

𝑝 +1 𝑝 𝑝 𝑝 +1  Remember 𝐶 conitinuity

• Perform degree elevation on each Bézier segment

• Delete unnecessary knots

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 106


B-Spline curves
• Introduction

• Shape functions

• Knot vector

• Cox de Boor’s algorithm

• Bézier analogy

• De Boor’s algorithm

• Refinement

• Properties

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 107


B-Splines: Properties
Important numbers of B-Splines
• Example setup:

𝑝=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

Description Variable Formula Example

Number of knots 𝑚 𝑚 =𝑛+𝑝+1 𝑚 = 7 + 3 + 1 = 11

Multiplicity (number of same knots) 𝑘 - 𝑘 𝑡=1 =2

Open knot vector (interpolation of 𝑘 =𝑝+1 𝑘 𝑡=0 =4 and


-
1st and last CP) for 𝑡 = 𝑡 and 𝑡 = 𝑡 𝑘 𝑡=4 =4

Continuity 𝐶 𝐶 𝐶 𝑡=1 =𝐶 =𝐶

𝑡 = 2.5 → 𝑖 = 7 (knot span)


Affected control points - [𝑷 ,…𝑷 ]
[𝑷 , 𝑷 , 𝑷 , 𝑷 ]

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 108


B-Splines: Properties
Advantages of B-Splines:
• Independent polynomial degree: 𝑝

• Local influence of shape functions / control points

• Parametric curve description: 𝑪(𝑡)

• Approximating  smoother

• Controllable continuity at knots: 𝐶

• Convex hull property  no/less oscillations

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 109


B-Splines: Properties
Disadvantage of B-Splines:
• Approximating (curve does not go through points)  Curve-Fitting

• Not all curves are representable (circle, offset, etc.)  NURBS

• Computationally expensive  Idea: Curve caching


Not treated

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 110


NURBS curves

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 115


NURBS curves
• Introduction

• Weights

• Shape functions

• Exact geometry representation

• Properties

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 116


NURBS: Introduction
What means NURBS?
• NU… non-uniform Knots are not uniformly distributed (already known)

• R… rational Shape functions are fractional rational functions

• BS… B-Splines

What is new?
• Control points carry a weight

𝑥
𝑦
𝑷 = 𝑧
𝑤

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 117


NURBS curves
• Introduction

• Weights

• Shape functions

• Exact geometry representation

• Properties

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 118


NURBS: Weights
Why NURBS?
• Weights control the influence of a control point
 More shapes are possible

𝑷
𝑥
𝑷 = 𝑦
𝑷 𝑤

1 2 3 4
𝑷 𝑤 = 0, , , , , 1
5 5 5 5
𝑷
1
0.8
0.6
0.4
0.2
0
𝑷 𝑷

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 119


NURBS curves
• Introduction

• Weights

• Shape functions

• Exact geometry representation

• Properties

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 120


NURBS: Shape functions
Basic concept:
• Parametric curve with shape functions (similar to B-Splines)

𝑥(𝑡) 𝑃,
𝑪 𝑡 = 𝑦(𝑡) = 𝑅 , (𝑡) ⋅ 𝑷 = 𝑅, 𝑡 ⋅ 𝑃,
𝑧(𝑡) 𝑃,

• with 𝑅 , (𝑡)

𝑁, 𝑡 ⋅𝑤
𝑅, 𝑡 =
𝑁, 𝑡 ⋅𝑤

• with 𝑁 , 𝑡 being the B-Spline shape functions

• and 𝑤 the weight of the respective control point

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 121


NURBS: Shape functions
Rational shape function

𝑁, 𝑡 ⋅𝑤
𝑅, 𝑡 =
𝑁, 𝑡 ⋅𝑤

Why divide?

• If 𝑤 ≠ 1 partition of unity is not fulfilled anymore

𝑁, 𝑡 ⋅𝑤 ≡ 1

• Dividing with 𝑁, 𝑡 ⋅𝑤 restores partition of unity

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 122


NURBS: Shape functions
Shape functions for different weights

𝑅 ,
𝑅 ,
𝑤 = 1.0 𝑤 = 0.6

𝑤 = 0.2 𝑤 = 0.0
𝑅 ,

𝑅 , =0

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 123


NURBS curves
• Introduction

• Weights

• Shape functions

• Exact geometry representation

• Properties

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 124


NURBS: Shape functions
NURBS circle representation

𝑝=2
𝜋 𝜋
𝑈 = 000 𝜋 𝜋 𝜋
2 2

1 1 0 −1 −1
𝑷 = 0 1 1 1 0
   
1 1⁄ 2 1 1⁄ 2 1
𝑥
𝑷 𝑷 𝑷

Isogeometric Analysis, Cotrell, Hughes, Bazilevs, Wiley 2008


𝑅 = 1.0
𝑷 𝑷
𝑦
Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 125
NURBS: Exact geometry representation
Difference to standard parametric circle description

∆ cos(𝑡)
𝑪 𝑡 =
sin(𝑡)

∆𝑥 = 𝑥 − 𝑥

∆𝑦 = 𝑦 − 𝑦

𝑡 𝑠 … standard
𝑛 … NURBS

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 126


NURBS: Exact geometry representation
NURBS can represent a circle exactly
• Question: Why is there a difference?
• Answer: A parameter 𝑡 refers to different points on the curve

𝑷 ,
𝑷 ,
𝑷 ,
𝑷 ,

𝑷, 𝑷,

∆𝑡
∆𝑡 𝑡

Standard circle (𝑠𝑖𝑛, 𝑐𝑜𝑠): NURBS circle:


Points equidistant along the circle Points not equidistant along the circle

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 127


NURBS: Exact geometry representation
Difference to standard parametric circle description:
• Consider the velocity

  𝛿𝑥 𝑡 𝛿𝑦 𝑡
𝑣 𝑡 = 𝑪̇(𝑡) = +
𝛿𝑡 𝛿𝑡

• For the standard circle


 
𝑣 𝑡 = − sin 𝑡 + cos 𝑡 =1

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 128


NURBS curves
• Introduction

• Weights

• Shape functions

• Exact geometry representation

• Properties

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 129


NURBS: Properties
Differences to B-Splines:
• More geometries possible because of weights 𝑤

• Computationally more expensive  no exact caching possible

• Programming more challenging

• Problems with integration:


 Gauss integration only exact for polynomials, not rational functions

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 130


Curve fitting

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 131


Curve fitting
• Motivation

• Method

• Example

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 132


Curve fitting: Motivation
B-Splines and NURBS interpolate only 1st and last control point

𝑸 𝑸
𝑸
#

𝑸 𝑸

Is there a way to interpolate points with


B-Splines or NURBS?

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 133


Curve fitting: Motivation
Desired solution 𝑷
𝑥

𝑸 𝑷
𝑸
𝑷
𝑸
𝑸

𝑷 𝑷

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 134


Curve fitting
• Motivation

• Method

• Example

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 135


Curve fitting: Method
B-Spline curve

𝑪 𝑡 = 𝑁 , (𝑡) ⋅ 𝑷

What is needed to define a B-Spline curve?


• Polynomial degree 𝑝 provided by user

• Number of control points 𝑷 𝑛 equals

• Parameter position of 𝑸 𝑡 TODO

• Knot vector 𝑈 = [𝑡 … 𝑡 ] TODO

• Control points 𝑷 TODO

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 136


Curve fitting: Method
Which is the parameter position of point 𝑸 ? 𝑥

𝑡 𝑸
𝑡 … 𝑡 … 𝑡 𝑸
𝑸
𝑸
Different possibilities: 𝑸
1. Equidistant distribution
𝑦

2. Chord length method

3. Centripetal technique

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 137


Curve fitting: Method
𝑥

Which is the parameter position of point 𝑸 ?


𝑸
1. Equidistant distribution
𝑸
𝑸
• Give first and last parameter position 𝑸
𝑸
𝑡 =0 𝑡 =1
𝑦

• Inner parameter equidistantly distributed


𝑘−1
𝑡 = 𝑘 ∈ [2, 𝑛 − 1] Example:
𝑛−1
𝑛=5
• Final parameter vector 1 2 3
𝑡 = 0, , , ,1
𝑘−1 4 4 4
𝑡 = 0, … , ,…1 𝑘 ∈ [1, 𝑛]
𝑛−1

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 138


Curve fitting: Method
𝑥

Which is the parameter position of point 𝑸 ?


𝑸
2. Chord length method
𝑸
𝑸
• Be 𝑑 the length between 𝑸 and 𝑸 𝑸
𝑸
𝑑 = 𝑸 −𝑸
𝑦

• The overall length 𝑑 is

𝑑= 𝑑 Example:

𝑛=5

• The parameter positions 𝑡 are 𝑑 = 2, 4, 3, 7 → 𝑑 = 16


𝑑
𝑡 =𝑡 + 2 6 9
𝑑 𝑡 = 0, , , ,1
16 16 16
𝑡 =0

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 139


Curve fitting: Method
𝑥

Which is the parameter position of point 𝑸 ?


𝑸
3. Centripetal technique
𝑸
𝑸
• Similiar to chord length method 𝑸
𝑸
𝑑 = 𝑸 −𝑸
𝑦

 
𝑑= 𝑑

Example:
• The parameter positions 𝑡 are
𝑛=5
 
𝑑
𝑡 =𝑡 +
𝑑 𝑑 = 2, 4, 3, 7 → 𝑑 ≈ 7.792
𝑡 =0
𝑡 = 0 , ~0.181 , ~0.438 , ~0.66, 1

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 140


Curve fitting: Method
B-Spline curve

𝑪 𝑡 = 𝑁 , (𝑡) ⋅ 𝑷

What is needed to define a B-Spline curve?


• Polynomial degree 𝑝 provided by user

• Number of control points 𝑷 𝑛 equals

• Parameter position of 𝑸 𝑡 Done

• Knot vector 𝑈 = [𝑡 … 𝑡 ] TODO

• Control points 𝑷 TODO

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 141


Curve fitting: Method
Compute the knots:
• How many knots are needed?

𝑚 =𝑛+𝑝+1

• How many knots need to be determined?

𝑚 = 𝑚−2⋅𝑝 = 𝑛−𝑝+1

𝑡
• With 𝑡 = 0 and 𝑡 =1
𝑡 …𝑡 … 𝑡 … …𝑡
𝑡
𝑡 ,…,𝑡 =0

𝑡 ,…,𝑡 =1

𝑚 = 𝑚−2⋅ 𝑝+1 =𝑛−𝑝−1

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 142


Curve fitting: Method
Inner knots are computed using the averaging technique
𝑡
• Open knot vector …
𝑡 …𝑡 … 𝑡 𝑡 …𝑡
𝑡 ,…,𝑡 =0

𝑡 ,…,𝑡 =1 inner knots

• Inner knots are averaged by 𝑝 knots Example:


1 2 3 4
𝑡 = 0, , , , ,1
5 5 5 5
1 𝑝 = 2:
𝑡 = 𝑡 𝑖 ∈ [1, 𝑚 ]
𝑝 3 5 7
𝑈 = 0, 0, 0, , , , 1, 1, 1
10 10 10
𝑝 = 3:
6 9
𝑈 = 0, 0, 0, 0, , , 1, 1, 1, 1
15 15

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 143


Curve fitting: Method
B-Spline curve

𝑪 𝑡 = 𝑁 , (𝑡) ⋅ 𝑷

What is needed to define a B-Spline curve?


• Polynomial degree 𝑝 provided by user

• Number of control points 𝑷 𝑛 equals

• Parameter position of 𝑸 𝑡 Done

• Knot vector 𝑈 = [𝑡 … 𝑡 ] Done

• Control points 𝑷 TODO

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 144


Curve fitting: Method
Computation of control points 𝐏 :
• Parametric curve description

𝑁 , (𝑡) ⋅ 𝑥

𝑪 𝑡 = 𝑁, 𝑡 ⋅𝑷 =
𝑁 , (𝑡) ⋅ 𝑦

• Evaluated at 𝑡 :

𝑁 , (𝑡 ) ⋅ 𝑥

𝑸𝒌 = unknown coordinates of control points 𝑷


𝑁 , (𝑡 ) ⋅ 𝑦

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 145


Curve fitting: Method
Computation of control points 𝐏 :
• Set up a linear system of equations

𝑁 , (𝑡 ) ⋯ 𝑁 , (𝑡 ) 𝑷 𝑸
⋮ ⋱ ⋮ ⋮ = ⋮
𝑁 , (𝑡 ) ⋯ 𝑁 , (𝑡 ) 𝑷 𝑸

• Solve for each coordinate

𝑁 , (𝑡 ) ⋯ 𝑁 ,(𝑡 ) 𝑥 𝑄 ,
⋮ ⋱ ⋮ ⋮ = ⋮
𝑁 , (𝑡 ) ⋯ 𝑁 , (𝑡 ) 𝑥 𝑄 ,

only right hand side changes


𝑁 , (𝑡 ) ⋯ 𝑁 ,(𝑡 ) 𝑦 𝑄 ,
⋮ ⋱ ⋮ ⋮ = ⋮
𝑁 , (𝑡 ) ⋯ 𝑁 , (𝑡 ) 𝑦 𝑄 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 146


Curve fitting: Method
B-Spline curve

𝑪 𝑡 = 𝑁 , (𝑡) ⋅ 𝑷

What is needed to define a B-Spline curve?


• Polynomial degree 𝑝 provided by user

• Number of control points 𝑷 𝑛 equals

• Parameter position of 𝑸 𝑡 Done

• Knot vector 𝑈 = [𝑡 … 𝑡 ] Done

• Control points 𝑷 Done

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 147


Curve fitting: Method
Computation of control points 𝐏 :
• Set up a linear system of equations

𝑁 , (𝑡 ) ⋯ 𝑁 , (𝑡 ) 𝑷 𝑸
⋮ ⋱ ⋮ ⋮ = ⋮
𝑁 , (𝑡 ) ⋯ 𝑁 , (𝑡 ) 𝑷 𝑸

• To be solved for each coordinate

𝑁 , (𝑡 ) ⋯ 𝑁 ,(𝑡 ) 𝑥 𝑄 ,
⋮ ⋱ ⋮ ⋮ = ⋮
𝑁 , (𝑡 ) ⋯ 𝑁 , (𝑡 ) 𝑥 𝑄 ,

only right hand side changes


𝑁 , (𝑡 ) ⋯ 𝑁 ,(𝑡 ) 𝑦 𝑄 ,
⋮ ⋱ ⋮ ⋮ = ⋮
𝑁 , (𝑡 ) ⋯ 𝑁 , (𝑡 ) 𝑦 𝑄 ,

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 148


Curve fitting
• Motivation

• Method

• Example

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 149


Curve fitting: Example
Example for curve fitting: Set-up
Given:
• Polynomial degree
𝑝=2 𝑸𝟑 𝑸𝟐
• Interpolation points
0 3 −1 −4 −4 −3
𝑸 =
0 4 4 0 −3 −3
𝑸𝟒 𝑸𝟏
• Number of control points 𝑛
𝑛=# 𝑸 =𝟔 𝑸𝟔
𝑸𝟓

Unknown:
• Knot vector 𝑼
• Control points 𝑷

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 150


Curve fitting: Example
Example for curve fitting: Parameter values 𝑡 using chord length method
• Compute distances 𝑑 between interpolation points

𝑑 = 𝑸 −𝑸 𝑑 =5 𝑑 =4 𝑑 =5 𝑑 =3 𝑑 =1

• Compute total chord length

𝑑= 𝑑 = 18

• Compute 𝑡 :
𝑑
𝑡 =0 𝑡 =𝑡 +
𝑑

5 9 14 17
𝒕 = 0, , , , ,1
18 18 18 18

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 151


Curve fitting: Example
Example for curve fitting: Compute knot vector
• Number of knots

𝑚 = 𝑛+𝑝+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

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 152


Curve fitting: Example
Example for curve fitting: Compute control points 𝑷

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

Solve once for 𝑥 − and once for 𝑦 − coordinates

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 153


Curve fitting: Example
Example for curve fitting: Result

𝑷𝟑
𝑷𝟐

𝑸𝟑 𝑸𝟐

𝑷𝟒

𝑸𝟒
𝑸𝟏 = 𝑷𝟏

𝑸𝟓
𝑸𝟔 = 𝑷𝟔
𝑷𝟓

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 154


Spline surfaces

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 155


Spline surfaces
• Set-up

• Trimmed surfaces

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 156


Spline Surfaces: Set-Up
Curve:

𝑪 𝑡 = 𝑀 , (𝑡) ⋅ 𝑷

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

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 157


Spline Surfaces: Set-Up

𝑠 2D parameter domain 3D physical domain

1
𝑷 ,

𝑷 ,
0 𝑷 ,
0 1 𝑡

𝑡-direction: 𝑠-direction:
𝑝=3 𝑞=2
𝑼 = [0,0,0,0,1,1,1,1] 𝑽 = [0,0,0, 1, 2,2,2]

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 158


Spline surfaces
• Set-up

• Trimmed surfaces

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 159


Spline Surfaces: Trimmed surfaces
Example

untrimmed spline patch trimmed spline patch

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 160


Spline Surfaces: Trimmed surfaces
Trimming process

𝑧 Trim surface

3D:
𝑦

𝑥
1. Map (some)
3. Exclude curve from
intersection points
parameter domain
to parameter space

2. Find interpolating
𝑠 spline curve

2D:
𝑡

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 161


Spline Surfaces: Trimmed surfaces
Problems with trimming:

• Curve can only interpolate sample


points

• Curve might not catch the correct


intersection curve Trim tea pot and spout

Glue together Trimming curve not exact!

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

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 162


Comparison of splines

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 163


Comparison of splines
Features Bézier B-Spline NURBS

𝑥(𝑡)
Parametric 𝑪 𝑡 = 𝑦(𝑡)
𝑧(𝑡)

Shape functions 𝑁 , (𝑡)

Partition of unity ∑   𝑁 , 𝑡 =1 ∀𝑡

Positivity 𝑁, 𝑡 ≥ 0 ∀𝑡

Approximating

Convex hull property

Linear independent shape functions

Local influence of control points

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 164


Comparison of splines
Features Bézier B-Spline NURBS

Shape functions piecewise defined

Independent degree of freedom

Fast curve point evaluation

Large amount of curve forms

Exact circle/sphere description

Not/Little oscillating

Knot vector

Controllable continuity (𝐶 )

Dr.-Ing. Stefan Kollmannsberger | Computation in Engineering | Geometric Modeling 165

You might also like