Bezier Curves
陈仁杰
中国科学技术大学
计算机辅助几何设计2019秋学期
Bezier curves
• Bezier curves/splines developed by• Paul de Casteljau at Citroen (1959)• Pierre Bezier at Renault (1963)for free-form parts in automotive design
Bezier curves
• Today: Standard tool for 2D curve editing
• Cubic 2D Bezier curves are everywhere:• Inkscape, Corel Draw, Adobe Illustrator, Powerpoint, …• PDF, Truetype (quadratic curves), Windows GDI, …
• Widely used in 3D curve & surface modeling as well
Curve representation
• The implicit curve form 𝑓𝑓 𝑥𝑥,𝑦𝑦 = 0 suffers from several limitations:
Curve representation
• The implicit curve form 𝑓𝑓 𝑥𝑥,𝑦𝑦 = 0 suffers from several limitations:
• Multiple values for the same 𝑥𝑥-coordinates
• Undefined derivative 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑
(see blue cross)
• Not invariant w.r.t axes transformations
Parametric representation
• Remedy: parametric representation 𝑐𝑐 𝑡𝑡 = 𝑥𝑥 𝑡𝑡 ,𝑦𝑦 𝑡𝑡
• Easy evaluations
• The parameter 𝑡𝑡 can be interpreted as time
• The curve can be interpreted as the path traced by a moving particle
Modeling with the power basis, …
• Example of a parabola: 𝒇𝒇 𝑡𝑡 = 𝒂𝒂𝑡𝑡2 + 𝒃𝒃𝑡𝑡 + 𝒄𝒄
𝒇𝒇 𝑡𝑡 = 11 𝑡𝑡2 + −2
0 𝑡𝑡 + 10
Modeling with the power basis, …no thanks!• Examples of a parabola: 𝒇𝒇 𝑡𝑡 = 𝒂𝒂𝑡𝑡2 + 𝒃𝒃𝑡𝑡 + 𝒄𝒄: the coefficients of
the power basis lack intuitive geometric meaning
Back to the drawing board
• A point on a parametric line
𝒃𝒃𝟏𝟏
𝒃𝒃𝟎𝟎
𝒃𝒃𝟎𝟎𝟏𝟏𝒃𝒃𝟎𝟎𝟏𝟏 = 1 − 𝑡𝑡 𝒃𝒃𝟎𝟎 + 𝑡𝑡𝒃𝒃𝟏𝟏
Back to the drawing board
• Another point on a second parametric line
𝒃𝒃𝟏𝟏𝟏𝟏 = 1 − 𝑡𝑡 𝒃𝒃𝟏𝟏 + 𝑡𝑡𝒃𝒃𝟐𝟐𝒃𝒃𝟎𝟎𝟏𝟏 = 1 − 𝑡𝑡 𝒃𝒃𝟎𝟎 + 𝑡𝑡𝒃𝒃𝟏𝟏
𝒃𝒃𝟏𝟏
𝒃𝒃𝟎𝟎𝒃𝒃𝟐𝟐
𝒃𝒃𝟏𝟏𝟏𝟏
𝒃𝒃𝟎𝟎𝟏𝟏
Back to the drawing board
• A third point on the line defined by the first two points
𝒃𝒃𝟏𝟏
𝒃𝒃𝟎𝟎𝒃𝒃𝟐𝟐
𝒃𝒃𝟏𝟏𝟏𝟏
𝒃𝒃𝟎𝟎𝟏𝟏𝒃𝒃𝟎𝟎𝟐𝟐
𝒃𝒃𝟎𝟎𝟐𝟐 = 1 − 𝑡𝑡 𝒃𝒃𝟎𝟎𝟏𝟏 + 𝑡𝑡𝒃𝒃𝟏𝟏𝟏𝟏
𝒃𝒃𝟏𝟏𝟏𝟏 = 1 − 𝑡𝑡 𝒃𝒃𝟏𝟏 + 𝑡𝑡𝒃𝒃𝟐𝟐𝒃𝒃𝟎𝟎𝟏𝟏 = 1 − 𝑡𝑡 𝒃𝒃𝟎𝟎 + 𝑡𝑡𝒃𝒃𝟏𝟏
Back to the drawing board
• And then simplify…
𝒃𝒃𝟎𝟎𝟏𝟏 = 1 − 𝑡𝑡 𝒃𝒃𝟎𝟎 + 𝑡𝑡𝒃𝒃𝟏𝟏
𝒃𝒃𝟎𝟎𝟐𝟐 = 1 − 𝑡𝑡 𝒃𝒃𝟎𝟎𝟏𝟏 + 𝑡𝑡𝒃𝒃𝟏𝟏𝟏𝟏
𝒃𝒃𝟏𝟏𝟏𝟏 = 1 − 𝑡𝑡 𝒃𝒃𝟏𝟏 + 𝑡𝑡𝒃𝒃𝟐𝟐
𝒃𝒃𝟎𝟎𝟐𝟐 = 1 − 𝑡𝑡 1 − 𝑡𝑡 𝒃𝒃𝟎𝟎 + 𝑡𝑡𝒃𝒃𝟏𝟏 + 𝑡𝑡 1 − 𝑡𝑡 𝒃𝒃𝟏𝟏 + 𝑡𝑡𝒃𝒃𝟐𝟐
𝒃𝒃𝟎𝟎𝟐𝟐 = 1 − 𝑡𝑡 2𝒃𝒃𝟎𝟎 + 2𝑡𝑡 1 − 𝑡𝑡 𝒃𝒃𝟏𝟏 + 𝑡𝑡2𝒃𝒃𝟐𝟐
𝒃𝒃𝟏𝟏
𝒃𝒃𝟎𝟎𝒃𝒃𝟐𝟐
𝒃𝒃𝟏𝟏𝟏𝟏
𝒃𝒃𝟎𝟎𝟏𝟏𝒃𝒃𝟎𝟎𝟐𝟐
Back to the drawing board
• We obtained another description of parabolic curves
• The coefficients 𝒃𝒃𝟎𝟎,𝒃𝒃𝟏𝟏,𝒃𝒃𝟐𝟐 have a geometric meaning
𝒃𝒃𝟎𝟎𝟐𝟐 = 1 − 𝑡𝑡 2𝒃𝒃𝟎𝟎 + 2𝑡𝑡 1 − 𝑡𝑡 𝒃𝒃𝟏𝟏 + 𝑡𝑡2𝒃𝒃𝟐𝟐
𝒃𝒃𝟏𝟏
𝒃𝒃𝟎𝟎𝒃𝒃𝟐𝟐
𝒃𝒃𝟏𝟏𝟏𝟏
𝒃𝒃𝟎𝟎𝟏𝟏𝒃𝒃𝟎𝟎𝟐𝟐
Example re-visited
• Let’s rewrite our initial parabolic curve example in the new basis
𝒇𝒇 𝑡𝑡 = 11 𝑡𝑡2 + −2
0 𝑡𝑡 + 10
𝒇𝒇 𝑡𝑡 = 10 1 − 𝑡𝑡 2 + 0
0 2𝑡𝑡 1 − 𝑡𝑡 + 01 𝑡𝑡2
Example re-visited
• The coefficient have a geometric meaning
• More intuitive for curve manipulation
Another example
𝒃𝒃0 = 01 , 𝒃𝒃1 = 1
1 , 𝒃𝒃2 = 02
Going further
• Cubic approximation
• Given 4 points: 𝒑𝒑00 𝑡𝑡 = 𝒑𝒑0, 𝒑𝒑10 𝑡𝑡 = 𝒑𝒑1, 𝒑𝒑20 𝑡𝑡 = 𝒑𝒑2, 𝒑𝒑30 𝑡𝑡 = 𝒑𝒑3• First iteration
• 2nd iteration
• Curve𝒄𝒄 𝑡𝑡 = 1 − 𝑡𝑡 3𝒑𝒑0 + 3𝑡𝑡 1 − 𝑡𝑡 2𝒑𝒑1 + 3𝑡𝑡2 1 − 𝑡𝑡 𝒑𝒑2 + 𝑡𝑡3𝒑𝒑3
𝒑𝒑02 = 1 − 𝑡𝑡 2𝒑𝒑0 + 2𝑡𝑡 1 − 𝑡𝑡 𝒑𝒑1 + 𝑡𝑡2𝒑𝒑2𝒑𝒑12 = 1 − 𝑡𝑡 2𝒑𝒑1 + 2𝑡𝑡 1 − 𝑡𝑡 𝒑𝒑2 + 𝑡𝑡2𝒑𝒑3
𝒑𝒑01 = 1 − 𝑡𝑡 𝒑𝒑0 + 𝑡𝑡𝒑𝒑1𝒑𝒑11 = 1 − 𝑡𝑡 𝒑𝒑1 + 𝑡𝑡𝒑𝒑2𝒑𝒑21 = 1 − 𝑡𝑡 𝒑𝒑2 + 𝑡𝑡𝒑𝒑3
Throughout these examples, we just re-invented a primitive version of the de Casteljau algorithm
Now let’s examine it more closely …
De Casteljau algorithm
• De Casteljau Algorithm: Computes 𝑥𝑥 𝑡𝑡 for given 𝑡𝑡• Bisect control polygon in ratio 𝑡𝑡: 1 − 𝑡𝑡• Connect the new dots with lines (adjacent segments)• Interpolate again with the same ratio• Iterate, until only one points is left
De Casteljau algorithm
• De Casteljau Algorithm: Computes 𝑥𝑥 𝑡𝑡 for given 𝑡𝑡• Bisect control polygon in ratio 𝑡𝑡: 1 − 𝑡𝑡• Connect the new dots with lines (adjacent segments)• Interpolate again with the same ratio• Iterate, until only one points is left
De Casteljau algorithm
• De Casteljau Algorithm: Computes 𝑥𝑥 𝑡𝑡 for given 𝑡𝑡• Bisect control polygon in ratio 𝑡𝑡: 1 − 𝑡𝑡• Connect the new dots with lines (adjacent segments)• Interpolate again with the same ratio• Iterate, until only one points is left
De Casteljau algorithm
• De Casteljau Algorithm: Computes 𝑥𝑥 𝑡𝑡 for given 𝑡𝑡• Bisect control polygon in ratio 𝑡𝑡: 1 − 𝑡𝑡• Connect the new dots with lines (adjacent segments)• Interpolate again with the same ratio• Iterate, until only one points is left
De Casteljau algorithm
• Algorithm description• Input: points 𝒃𝒃0,𝒃𝒃1, …𝒃𝒃𝑛𝑛 ∈ ℝ3
• Output: curve 𝒙𝒙 𝑡𝑡 , 𝑡𝑡 ∈ 0,1
• Geometric construction of the points 𝒙𝒙 𝑡𝑡 for given 𝑡𝑡:𝒃𝒃𝑖𝑖0 𝑡𝑡 = 𝒃𝒃𝑖𝑖 , 𝑖𝑖 = 0, … ,𝑛𝑛
𝒃𝒃𝑖𝑖𝑟𝑟 𝑡𝑡 = 1 − 𝑡𝑡 𝒃𝒃𝑖𝑖𝑟𝑟−1 𝑡𝑡 + 𝑡𝑡 𝒃𝒃𝑖𝑖+1𝑟𝑟−1 𝑡𝑡
𝑟𝑟 = 1, … ,𝑛𝑛 𝑖𝑖 = 0, … ,𝑛𝑛 − 𝑟𝑟
• Then 𝒃𝒃0𝑛𝑛 𝑡𝑡 is the searched curve point 𝒙𝒙 𝑡𝑡 at the parameter value 𝑡𝑡
De Casteljau algorithm• Repeated convex combination of control points
𝒃𝒃𝑖𝑖𝑟𝑟 = 1 − 𝑡𝑡 𝒃𝒃𝑖𝑖
𝑟𝑟−1 +𝑡𝑡𝒃𝒃𝑖𝑖+1𝑟𝑟−1
𝒃𝒃00
𝒃𝒃10
𝒃𝒃20
𝒃𝒃30
De Casteljau algorithm• Repeated convex combination of control points
𝒃𝒃𝑖𝑖𝑟𝑟 = 1 − 𝑡𝑡 𝒃𝒃𝑖𝑖
𝑟𝑟−1 +𝑡𝑡𝒃𝒃𝑖𝑖+1𝑟𝑟−1
𝒃𝒃00
𝒃𝒃10
𝒃𝒃20
𝒃𝒃30
𝑡𝑡 𝒃𝒃01
𝒃𝒃11
𝒃𝒃21
𝑡𝑡
𝑡𝑡
De Casteljau algorithm• Repeated convex combination of control points
𝒃𝒃𝑖𝑖𝑟𝑟 = 1 − 𝑡𝑡 𝒃𝒃𝑖𝑖
𝑟𝑟−1 +𝑡𝑡𝒃𝒃𝑖𝑖+1𝑟𝑟−1
𝒃𝒃00
𝒃𝒃10
𝒃𝒃20
𝒃𝒃30
𝑡𝑡 𝒃𝒃01
𝒃𝒃11
𝒃𝒃21
𝑡𝑡
𝑡𝑡
𝑡𝑡
𝑡𝑡
𝒃𝒃02
𝒃𝒃12
De Casteljau algorithm• Repeated convex combination of control points
𝒃𝒃𝑖𝑖𝑟𝑟 = 1 − 𝑡𝑡 𝒃𝒃𝑖𝑖
𝑟𝑟−1 +𝑡𝑡𝒃𝒃𝑖𝑖+1𝑟𝑟−1
𝒃𝒃00
𝒃𝒃10
𝒃𝒃20
𝒃𝒃30
𝑡𝑡 𝒃𝒃01
𝒃𝒃11
𝒃𝒃21
𝑡𝑡
𝑡𝑡
𝑡𝑡
𝑡𝑡
𝒃𝒃02
𝒃𝒃12 𝑡𝑡 𝒃𝒃0
3 = 𝑥𝑥(𝑡𝑡)De Casteljau scheme
De Casteljau algorithm
• The intermediate coefficients 𝒃𝒃𝑖𝑖𝑟𝑟 𝑡𝑡 can be written in a triangular matrix: the de Casteljau scheme:
• 𝒃𝒃0 = 𝒃𝒃00
• 𝒃𝒃1 = 𝒃𝒃10 𝒃𝒃01
• 𝒃𝒃2 = 𝒃𝒃20 𝒃𝒃11 𝒃𝒃02
• 𝒃𝒃3 = 𝒃𝒃30 𝒃𝒃21 𝒃𝒃12 𝒃𝒃03
• ……………………
• 𝒃𝒃𝑛𝑛−1 = 𝒃𝒃𝑛𝑛−10 𝒃𝒃𝑛𝑛−21 … 𝒃𝒃0𝑛𝑛−1
• 𝒃𝒃𝑛𝑛 = 𝒃𝒃𝑛𝑛0 𝒃𝒃𝑛𝑛−11 … 𝒃𝒃1𝑛𝑛−1 𝒃𝒃0𝑛𝑛 = 𝑥𝑥 𝑡𝑡
De Casteljau algorithm
• Algorithm:• for r=1..n• for i=0..n-r
• 𝒃𝒃𝑖𝑖𝑟𝑟 = 1 − 𝑡𝑡 𝒃𝒃𝑖𝑖
𝑟𝑟−1 + 𝑡𝑡 𝒃𝒃𝑖𝑖+1𝑟𝑟−1
• end• end
• return 𝒃𝒃0𝑛𝑛
The whole algorithm consists only of repeated linear interpolations.
De Casteljau algorithm: Properties
• The polygon consisting of the points 𝒃𝒃𝟎𝟎, … ,𝒃𝒃𝒏𝒏 is called Bezier polygon(control polygon)
• The points 𝒃𝒃𝒊𝒊 are called Bezier points (control points)• The curve defined by the Bezier points 𝒃𝒃𝟎𝟎, … ,𝒃𝒃𝒏𝒏 and the de Casteljau
algorithm is called Bezier curve• The de Casteljau algorithm is numerically stable, since only convex
combinations are applied.• Complexity of the de Casteljau algorithm
• 𝑂𝑂 𝑛𝑛2 time• 𝑂𝑂 𝑛𝑛 memory• with 𝑛𝑛 being the number of Bezier points
De Casteljau algorithm: Properties
• Properties of Bezier curves:• Given: Bezier points 𝒃𝒃0, … ,𝒃𝒃𝑛𝑛
Bezier curve 𝒙𝒙 𝑡𝑡• Bezier curve is polynomial curve of degree 𝑛𝑛• End points interpolation: 𝒙𝒙 0 = 𝒃𝒃0, 𝒙𝒙 1 = 𝒃𝒃𝑛𝑛. The remaining Bezier
points are only approximated in general• Convex hull property:Bezier curve is completely inside the convex hull of its Bezier polygon
De Casteljau algorithm: Properties
• Variation diminishing• No line intersects the Bezier curve more often than its Bezier polygon
• Influence of Bezier points: global but pseudo-local• Global: moving a Bezier points changes the whole curve progression
• Pseudo-local: 𝒃𝒃𝑖𝑖 has its maximal influence on 𝑥𝑥 𝑡𝑡 at 𝑡𝑡 = 𝑖𝑖𝑛𝑛
• Affine invariance:• Bezier curve and Bezier polygon are invariant under affine
transformations
• Invariance under affine parameter transformations
De Casteljau algorithm: Properties
• Symmetry• The following two Bezier curves coincide, they are only traversed in
opposite directions:𝒙𝒙 𝑡𝑡 = 𝒃𝒃0, … ,𝒃𝒃𝑛𝑛 𝒙𝒙′ 𝑡𝑡 = 𝒃𝒃𝑛𝑛, …𝒃𝒃0
• Linear Precision:• Bezier curve is line segment, if 𝒃𝒃0, … ,𝒃𝒃𝑛𝑛 are colinear
• Invariance under barycentric combinations
Recap
de Casteljau algorithm
Bezier CurvesTowards a polynomial description
Bezier CurvesTowards a polynomial description
𝑥𝑥 𝑡𝑡 = �𝑖𝑖=0
𝑛𝑛
𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 ⋅ 𝑏𝑏𝑖𝑖
Polynomial description of Bezier curves
• The same problem as before:• Given: 𝑛𝑛 + 1 control points 𝒃𝒃0, … ,𝒃𝒃𝑛𝑛• Wanted: Bezier curve 𝒙𝒙 𝑡𝑡 with 𝑡𝑡 ∈ 0,1
• Now with an algebraic approach using basis functions
Desirable Properties
• Useful requirements for a basis:• Well behaved curve
• Smooth basis functions
Desirable Properties
• Useful requirements for a basis:• Well behaved curve
• Smooth basis functions
• Local control (or at least semi-local)• Basis functions with compact support
Desirable Properties
• Useful requirements for a basis:• Well behaved curve
• Smooth basis functions• Local control (or at least semi-local)
• Basis functions with compact support• Affine invariance:
• Appling an affine map 𝒙𝒙 → 𝐴𝐴𝒙𝒙 + 𝑏𝑏 on• Control points• Curve
Should have the same effect• In particular: rotation, translation• Otherwise: interactive curve editing very difficult
Desirable Properties
• Useful requirements for a basis:• Convex hull property:
• The curve lays within the convex hull of its control points• Avoids at least too weird oscillations
• Advantages• Computational advantages (recursive intersection tests)• More predictable behavior
Summary
• Useful properties• Smoothness• Local control / support• Affine invariance• Convex hull property
Curve basis function control points
𝒇𝒇 𝑡𝑡 = �𝑖𝑖=1
𝑛𝑛
𝑏𝑏𝑖𝑖 𝑡𝑡 𝒑𝒑𝑖𝑖
Notations
Affine Invariance
• Affine map: 𝒙𝒙 → 𝐴𝐴𝒙𝒙 + 𝒃𝒃• Part I: Linear invariance – we get this automatically
• Linear approach: 𝒇𝒇 𝑡𝑡 = ∑𝑖𝑖=1𝑛𝑛 𝑏𝑏𝑖𝑖 𝑡𝑡 𝒑𝒑𝑖𝑖 = ∑𝑖𝑖=1𝑛𝑛 𝑏𝑏𝑖𝑖 𝑡𝑡𝑝𝑝𝑖𝑖𝑑𝑑
𝑝𝑝𝑖𝑖𝑑𝑑
𝑝𝑝𝑖𝑖𝑧𝑧
• Therefore: 𝐴𝐴 𝒇𝒇 𝑡𝑡 = 𝐴𝐴 ∑𝑖𝑖=1𝑛𝑛 𝑏𝑏𝑖𝑖 𝑡𝑡 𝒑𝒑𝑖𝑖 = ∑𝑖𝑖=1𝑛𝑛 𝑏𝑏𝑖𝑖 𝑡𝑡 𝐴𝐴𝒑𝒑𝑖𝑖
Affine Invariance
• Affine Invariance:• Affine map: 𝒙𝒙 → 𝐴𝐴𝒙𝒙 + 𝒃𝒃• Part II: Translational invariance
�𝑖𝑖=1
𝑛𝑛
𝑏𝑏𝑖𝑖 𝑡𝑡 𝒑𝒑𝑖𝑖 + 𝒃𝒃 = �𝑖𝑖=1
𝑛𝑛
𝑏𝑏𝑖𝑖 𝑡𝑡 𝒑𝒑𝑖𝑖 + �𝑖𝑖=1
𝑛𝑛
𝑏𝑏𝑖𝑖 𝑡𝑡 𝒃𝒃 = 𝒇𝒇 𝑡𝑡 + �𝑖𝑖=1
𝑛𝑛
𝑏𝑏𝑖𝑖 𝑡𝑡 𝒃𝒃
• For translational invariance, the sum of the basis functions must be one everywhere (for all parameter values 𝑡𝑡 that are used).
• This is called “partition of unity property”• The 𝑏𝑏𝑖𝑖’s form an “affine combination” of the control points 𝒑𝒑𝑖𝑖• This is very important for modeling
Convex Hull Property
• Convex combinations:• A convex combination of a set of points 𝒑𝒑1, … ,𝒑𝒑𝑛𝑛 is any point of the form:
∑𝑖𝑖=1𝑛𝑛 𝜆𝜆𝑖𝑖𝒑𝒑𝒊𝒊 with ∑𝑖𝑖=1𝑛𝑛 𝜆𝜆𝑖𝑖 = 1 and ∀𝑖𝑖 = 1 …𝑛𝑛: 0 ≤ 𝜆𝜆𝑖𝑖 ≤ 1
• (Remark: 𝜆𝜆𝑖𝑖 ≤ 1 is redundant)
• The set of all admissible convex combinations forms the convex hull of the point set
• Easy to see (exercise): The convex hull is the smallest set that contains all points 𝒑𝒑1, … ,𝒑𝒑𝑛𝑛 and every complete straight line between two elements of the set
Convex Hull Property
• Accordingly:• If we have this property∀𝑡𝑡 ∈ Ω:∑𝑖𝑖=1𝑛𝑛 𝑏𝑏𝑖𝑖 𝑡𝑡 = 1 and ∀𝑡𝑡 ∈ Ω,∀𝑖𝑖: 𝑏𝑏𝑖𝑖 𝑡𝑡 ≥ 0the constructed curves / surfaces will be:
• Affine invariant (translations, linear maps)• Be restricted to the convex hull of the control points
• Corollary: Curves will have linear precision• All control points lie on a straight line⇒ Curve is a straight line segment
• Surfaces with planar control points will be flat, too
Convex Hull Property
• Very useful property in practice• Avoids at least the worst oscillations
• no escape from convex hull, unlike polynomial interpolation
• Linear precision property is intuitive (people expect this)• Can be used for fast range checks
• Test for intersection with convex hull first, then the object• Recursive intersection algorithms in conjunctions with subdivision rules (more on
this later)
Polynomial description of Bezier curves
• The same problem as before:• Given: 𝑛𝑛 + 1 control points 𝒃𝒃0, … ,𝒃𝒃𝑛𝑛• Wanted: Bezier curve 𝑥𝑥 𝑡𝑡 with 𝑡𝑡 ∈ 0,1
• Now with an algebraic approach using basis functions
• Need to define 𝑛𝑛 + 1 basis functions• Such that this describes a Bezier curve:
𝐵𝐵0𝑛𝑛 𝑡𝑡 , … ,𝐵𝐵𝑛𝑛𝑛𝑛 𝑡𝑡 over 0,1
𝒙𝒙 𝑡𝑡 = �𝑖𝑖=0
𝑛𝑛
𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 ⋅ 𝒃𝒃𝑖𝑖
Bernstein Basis
• Let’s examine the Bernstein basis: 𝐵𝐵 = {𝐵𝐵0𝑛𝑛 ,𝐵𝐵1
𝑛𝑛 , … ,𝐵𝐵𝑛𝑛𝑛𝑛 }
• Bernstein basis of degree 𝑛𝑛:
𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 = 𝑛𝑛
𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖 = 𝐵𝐵𝑖𝑖−th basis functiondegree
where the binomial coefficients are given by:
𝑛𝑛𝑖𝑖 = �
𝑛𝑛!𝑛𝑛 − 𝑖𝑖 ! 𝑖𝑖!
for 0 ≤ 𝑖𝑖 ≤ 𝑛𝑛
0 otherwise
Binomial Coefficients and Theorem
𝑥𝑥 + 𝑦𝑦 𝑛𝑛 = �𝑖𝑖=0
𝑛𝑛𝑛𝑛𝑖𝑖 𝑥𝑥𝑖𝑖𝑦𝑦𝑛𝑛−𝑖𝑖
1 1 1
1 2 11 3 3 1
1 4 6 4 11 5 10 10 5 1
𝑛𝑛𝑖𝑖 + 𝑛𝑛
𝑖𝑖 + 1 = 𝑛𝑛 + 1𝑖𝑖 + 1
Examples: The first few
• The first three Bernstein bases:
• 𝐵𝐵00 ≔ 1
• 𝐵𝐵01 ≔ 1 − 𝑡𝑡 𝐵𝐵1
1 ≔ 𝑡𝑡
• 𝐵𝐵01 ≔ 1 − 𝑡𝑡 2 𝐵𝐵1
2 ≔ 2𝑡𝑡 1 − 𝑡𝑡 𝐵𝐵22 ≔ 𝑡𝑡2
• 𝐵𝐵02 ≔ 1 − 𝑡𝑡 3 𝐵𝐵1
3 ≔ 3𝑡𝑡 1 − 𝑡𝑡 2 𝐵𝐵23 ≔ 3𝑡𝑡2 1 − 𝑡𝑡 𝐵𝐵3
3 ≔ 𝑡𝑡3
𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 = 𝑛𝑛
𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖
Examples: The first few
• 𝐵𝐵02 ≔ 1 − 𝑡𝑡 3
• 𝐵𝐵13 ≔ 3𝑡𝑡 1 − 𝑡𝑡 2
• 𝐵𝐵23 ≔ 3𝑡𝑡2 1 − 𝑡𝑡
• 𝐵𝐵33 ≔ 𝑡𝑡3
𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 = 𝑛𝑛
𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖
𝐵𝐵00 ≔ 1
𝐵𝐵01 ≔ 1 − 𝑡𝑡
𝐵𝐵11 ≔ 𝑡𝑡
𝐵𝐵01 ≔ 1 − 𝑡𝑡 2
𝐵𝐵12 ≔ 2𝑡𝑡 1 − 𝑡𝑡
𝐵𝐵22 ≔ 𝑡𝑡2
Bernstein Basis
• Bezier curves use the Bernstein basis: 𝐵𝐵 = 𝐵𝐵0𝑛𝑛 ,𝐵𝐵1
𝑛𝑛 , … ,𝐵𝐵𝑛𝑛𝑛𝑛
• Bernstein basis of degree 𝑛𝑛:
𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 = 𝑛𝑛
𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖 = 𝐵𝐵𝑖𝑖−th basis functiondegree
Bernstein Basis
• What about the desired properties?• Smoothness• Local control / support• Affine invariance• Convex hull property
Bernstein Basis: Properties
• 𝐵𝐵 = 𝐵𝐵0𝑛𝑛 ,𝐵𝐵1
𝑛𝑛 , … ,𝐵𝐵𝑛𝑛𝑛𝑛 , 𝐵𝐵𝑖𝑖
𝑛𝑛 𝑡𝑡 = 𝑛𝑛𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖
• Basis for polynomials of degree 𝑛𝑛
• Each basis function 𝐵𝐵𝑖𝑖𝑛𝑛 has its maximum at 𝑡𝑡 = 𝑖𝑖
𝑛𝑛
Smoothness
Local control (semi-local)
Bernstein Basis: Properties
• 𝐵𝐵 = 𝐵𝐵0𝑛𝑛 ,𝐵𝐵1
𝑛𝑛 , … ,𝐵𝐵𝑛𝑛𝑛𝑛 , 𝐵𝐵𝑖𝑖
𝑛𝑛 𝑡𝑡 = 𝑛𝑛𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖
• Partition of unity (binomial theorem)1 = 1 − 𝑡𝑡 + 𝑡𝑡
�𝑖𝑖=0
𝑛𝑛
𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 = 𝑡𝑡 + 1 − 𝑡𝑡 𝑛𝑛 = 1
Affine invariance Convex hull property
What about the desired properties?
• Smoothness
• Local control / support
• Affine invariance
• Convex hull property
YesTo some extentYesYes
Bernstein Basis: Properties
• 𝐵𝐵 = 𝐵𝐵0𝑛𝑛 ,𝐵𝐵1
𝑛𝑛 , … ,𝐵𝐵𝑛𝑛𝑛𝑛 , 𝐵𝐵𝑖𝑖
𝑛𝑛 𝑡𝑡 = 𝑛𝑛𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖
• Recursive computation𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 ≔ 1 − 𝑡𝑡 𝐵𝐵𝑖𝑖
𝑛𝑛−1 𝑡𝑡 + 𝑡𝑡𝐵𝐵𝑖𝑖−1𝑛𝑛−1 1 − 𝑡𝑡
with 𝐵𝐵00 𝑡𝑡 = 1,𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 = 0 for 𝑖𝑖 ∉ 0 …𝑛𝑛• Symmetry
𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 = 𝐵𝐵𝑛𝑛−𝑖𝑖𝑛𝑛 1 − 𝑡𝑡
• Non-negativity: 𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 ≥ 0 for 𝑡𝑡 ∈ [0. . 1]
𝑛𝑛 − 1𝑖𝑖 + 𝑛𝑛 − 1
𝑖𝑖 − 1 =𝑛𝑛𝑖𝑖
Bernstein Basis: Properties
• 𝐵𝐵 = 𝐵𝐵0𝑛𝑛 ,𝐵𝐵1
𝑛𝑛 , … ,𝐵𝐵𝑛𝑛𝑛𝑛 , 𝐵𝐵𝑖𝑖
𝑛𝑛 𝑡𝑡 = 𝑛𝑛𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖
• Non-negativity II
𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 > 0 for 0 < 𝑡𝑡 < 1
𝐵𝐵0𝑛𝑛 0 = 1, 𝐵𝐵1𝑛𝑛 0 = ⋯ = 𝐵𝐵𝑛𝑛𝑛𝑛 0 = 0
𝐵𝐵0𝑛𝑛 1 = ⋯ = 𝐵𝐵𝑛𝑛−1𝑛𝑛 1 = 0, 𝐵𝐵𝑛𝑛𝑛𝑛 0 = 1
Derivatives𝐵𝐵𝑖𝑖
𝑛𝑛 𝑡𝑡 = 𝑛𝑛𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖
• Bernstein basis properties• Derivatives:
𝑑𝑑𝑑𝑑𝑑𝑑𝐵𝐵𝑖𝑖
𝑛𝑛 𝑡𝑡 =
Derivatives𝐵𝐵𝑖𝑖
𝑛𝑛 𝑡𝑡 = 𝑛𝑛𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖
• Bernstein basis properties• Derivatives:
𝑑𝑑𝑑𝑑𝑑𝑑𝐵𝐵𝑖𝑖
𝑛𝑛 𝑡𝑡 = 𝑛𝑛𝑖𝑖 𝑖𝑖𝑡𝑡 𝑖𝑖−1 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖 − 𝑛𝑛 − 𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖−1
=𝑛𝑛!
𝑛𝑛 − 𝑖𝑖 ! 𝑖𝑖!𝑖𝑖𝑡𝑡 𝑖𝑖−1 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖 −
𝑛𝑛!𝑛𝑛 − 𝑖𝑖 ! 𝑖𝑖!
𝑛𝑛 − 𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖−1
= 𝑛𝑛 𝑛𝑛 − 1𝑖𝑖 − 1 𝑡𝑡 𝑖𝑖−1 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖 − 𝑛𝑛 − 1
𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖−1
= 𝑛𝑛 𝐵𝐵𝑖𝑖−1𝑛𝑛−1 𝑡𝑡 − 𝐵𝐵𝑖𝑖
𝑛𝑛−1 𝑡𝑡
(Notation: {𝒌𝒌} = 𝒌𝒌 if 𝒌𝒌 > 𝟎𝟎, zero otherwise)
Derivatives𝐵𝐵𝑖𝑖
𝑛𝑛 𝑡𝑡 = 𝑛𝑛𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖
• Bernstein basis properties• Derivatives:
𝑑𝑑2
𝑑𝑑𝑑𝑑2𝐵𝐵𝑖𝑖
𝑛𝑛 𝑡𝑡 = 𝑑𝑑𝑑𝑑𝑑𝑑𝑛𝑛 𝐵𝐵𝑖𝑖−1
𝑛𝑛−1 𝑡𝑡 − 𝐵𝐵𝑖𝑖𝑛𝑛−1 𝑡𝑡
= 𝑛𝑛 𝑛𝑛 − 1 𝐵𝐵𝑖𝑖−2𝑛𝑛−2 𝑡𝑡 − 𝐵𝐵𝑖𝑖−1
𝑛𝑛−2 𝑡𝑡 − 𝑛𝑛 − 1 𝐵𝐵𝑖𝑖−1𝑛𝑛−2 𝑡𝑡 − 𝐵𝐵𝑖𝑖
𝑛𝑛−2 𝑡𝑡
= 𝑛𝑛 𝑛𝑛 − 1 𝐵𝐵𝑖𝑖−2𝑛𝑛−2 𝑡𝑡 − 2𝐵𝐵𝑖𝑖−1
𝑛𝑛−2 𝑡𝑡 + 𝐵𝐵𝑖𝑖𝑛𝑛−2 𝑡𝑡
(Notation: {𝒌𝒌} = 𝒌𝒌 if 𝒌𝒌 > 𝟎𝟎, zero otherwise)
Bezier Curves in Bernstein form
• Bezier Curves:
𝒇𝒇 𝑡𝑡 = ∑𝑖𝑖=1𝑛𝑛 𝐵𝐵𝑖𝑖𝑛𝑛𝒑𝒑𝑖𝑖 , 𝑡𝑡 ∈ 0,1
Bezier Curves in Bernstein form
• Bezier Curves:
𝒇𝒇 𝑡𝑡 = ∑𝑖𝑖=1𝑛𝑛 𝐵𝐵𝑖𝑖𝑛𝑛𝒑𝒑𝑖𝑖 , 𝑡𝑡 ∈ 0,1
Bezier Curves in Bernstein form
• Bezier Curves:
𝒇𝒇 𝑡𝑡 = ∑𝑖𝑖=1𝑛𝑛 𝐵𝐵𝑖𝑖𝑛𝑛𝒑𝒑𝑖𝑖 , 𝑡𝑡 ∈ 0,1
Bezier Curves in Bernstein form
• Bezier Curves:
𝒇𝒇 𝑡𝑡 = ∑𝑖𝑖=1𝑛𝑛 𝐵𝐵𝑖𝑖𝑛𝑛𝒑𝒑𝑖𝑖 , 𝑡𝑡 ∈ 0,1
Bezier Curves in Bernstein form
• Bezier Curves, also in 3D
𝒇𝒇 𝑡𝑡 = ∑𝑖𝑖=1𝑛𝑛 𝐵𝐵𝑖𝑖𝑛𝑛𝒑𝒑𝑖𝑖 , 𝑡𝑡 ∈ 0,1
Bezier Curves in Bernstein form
• Bezier curves:• Curves: 𝒇𝒇 𝑡𝑡 = ∑𝑖𝑖=1𝑛𝑛 𝐵𝐵𝑖𝑖𝑛𝑛𝒑𝒑𝑖𝑖• Considering the interval 𝑡𝑡 ∈ 0. . 1• Properties as discussed before:
• Affine invariant• Curves contained in the convex hull• Influence of control pointsMoving along the curve with index 𝑖𝑖
Largest influence at 𝑡𝑡 = 𝑖𝑖𝑛𝑛
Single curve segments: no full local control
Bezier Curve Properties: another look at derivatives
• Given: 𝒑𝒑0, … ,𝒑𝒑𝑛𝑛, 𝒇𝒇 𝑡𝑡 = ∑𝑖𝑖=0𝑛𝑛 𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 𝒑𝒑𝑖𝑖
• Then: 𝒇𝒇′ 𝑡𝑡 = 𝑛𝑛∑𝑖𝑖=0𝑛𝑛−1𝐵𝐵𝑖𝑖𝑛𝑛−1 𝑡𝑡 𝒑𝒑𝑖𝑖+1 − 𝒑𝒑𝑖𝑖
• Proof: 𝒇𝒇′ 𝑡𝑡 = ∑𝑖𝑖=0𝑛𝑛 𝑑𝑑𝑑𝑑𝑑𝑑𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 𝒑𝒑𝑖𝑖 = 𝑛𝑛∑𝑖𝑖=0𝑛𝑛 𝐵𝐵𝑖𝑖−1𝑛𝑛−1 𝑡𝑡 − 𝐵𝐵𝑖𝑖𝑛𝑛−1 𝑡𝑡 𝒑𝒑𝑖𝑖
= 𝑛𝑛�𝑖𝑖=0
𝑛𝑛
𝐵𝐵𝑖𝑖−1𝑛𝑛−1 𝑡𝑡 𝒑𝒑𝑖𝑖 − 𝑛𝑛�𝑖𝑖=0
𝑛𝑛
𝐵𝐵𝑖𝑖𝑛𝑛−1 𝑡𝑡 𝒑𝒑𝑖𝑖
= 𝑛𝑛 �𝑖𝑖=−1
𝑛𝑛−1
𝐵𝐵𝑖𝑖𝑛𝑛−1 𝑡𝑡 𝒑𝒑𝑖𝑖+1 − 𝑛𝑛�𝑖𝑖=0
𝑛𝑛
𝐵𝐵𝑖𝑖𝑛𝑛−1 𝑡𝑡 𝒑𝒑𝑖𝑖 = 𝑛𝑛�𝑖𝑖=0
𝑛𝑛−1
𝐵𝐵𝑖𝑖𝑛𝑛−1 𝑡𝑡 𝒑𝒑𝑖𝑖+1 − 𝑛𝑛�𝑖𝑖=0
𝑛𝑛−1
𝐵𝐵𝑖𝑖𝑛𝑛−1 𝑡𝑡 𝒑𝒑𝑖𝑖
= 𝑛𝑛�𝑖𝑖=0
𝑛𝑛−1
𝐵𝐵𝑖𝑖𝑛𝑛−1 𝑡𝑡 𝒑𝒑𝑖𝑖+1 − 𝒑𝒑𝑖𝑖
Index change
Bezier Curve Properties
• Higher order derivatives:
𝑓𝑓 𝑟𝑟 𝑡𝑡 =𝑛𝑛!
𝑛𝑛 − 𝑟𝑟 !⋅ �𝑖𝑖=0
𝑛𝑛−𝑟𝑟
𝐵𝐵𝑖𝑖𝑛𝑛−𝑟𝑟 𝑡𝑡 ⋅ Δ𝑟𝑟𝒑𝒑𝑖𝑖
Bezier Curve Properties
• Imporant for continuous concatenation:• Function value at 0,1 :
𝒇𝒇 𝑡𝑡 = �𝑖𝑖=0
𝑛𝑛−1𝑛𝑛𝑖𝑖 𝑡𝑡𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖𝒑𝒑𝑖𝑖
⇒ 𝒇𝒇 0 = 𝒑𝒑0𝒇𝒇 1 = 𝒑𝒑1
• First derivative vector at 0,1• Second derivative vector at 0,1
Bezier Curve Properties
First derivative vector at 0,1𝑑𝑑𝑑𝑑𝑑𝑑𝒇𝒇 𝑡𝑡 =
Bezier Curve Properties
First derivative vector at 0,1𝑑𝑑𝑑𝑑𝑡𝑡𝒇𝒇 𝑡𝑡 = 𝑛𝑛�
𝑖𝑖=0
𝑛𝑛−1
𝐵𝐵𝑖𝑖−1𝑛𝑛−1 𝑡𝑡 − 𝐵𝐵𝑖𝑖
𝑛𝑛−1 𝑡𝑡 𝒑𝒑𝑖𝑖
Bezier Curve Properties
First derivative vector at 0,1𝑑𝑑𝑑𝑑𝑡𝑡𝒇𝒇 𝑡𝑡 = 𝑛𝑛�
𝑖𝑖=0
𝑛𝑛−1
𝐵𝐵𝑖𝑖−1𝑛𝑛−1 𝑡𝑡 − 𝐵𝐵𝑖𝑖
𝑛𝑛−1 𝑡𝑡 𝒑𝒑𝑖𝑖
= 𝑛𝑛 � −𝐵𝐵0𝑛𝑛−1 𝑡𝑡 𝒑𝒑0 + 𝐵𝐵0
𝑛𝑛−1 𝑡𝑡 − 𝐵𝐵1𝑛𝑛−1 𝑡𝑡 𝒑𝒑1 + ⋯
𝑑𝑑𝑑𝑑𝑑𝑑𝒇𝒇 0 = 𝑛𝑛 𝒑𝒑1 − 𝒑𝒑0
𝑑𝑑𝑑𝑑𝑑𝑑𝒇𝒇 1 = 𝑛𝑛 𝒑𝒑𝑛𝑛 − 𝒑𝒑𝑛𝑛−1
Bezier Curve Properties
• Imporant for continuous concatenation:• Function value at 0,1 :
𝒇𝒇 0 = 𝒑𝒑0𝒇𝒇 1 = 𝒑𝒑1
• First derivative vector at 0,1𝒇𝒇′ 0 = 𝑛𝑛 𝒑𝒑1 − 𝒑𝒑0𝒇𝒇′ 1 = 𝑛𝑛 𝒑𝒑𝑛𝑛 − 𝒑𝒑𝑛𝑛−1
• Second derivative vector at 0,1𝒇𝒇′′ 0 = 𝑛𝑛 𝑛𝑛 − 1 𝒑𝒑2 − 𝟐𝟐𝒑𝒑1 + 𝒑𝒑0
𝒇𝒇′′ 1 = 𝑛𝑛 𝑛𝑛 − 1 𝒑𝒑𝑛𝑛 − 2𝒑𝒑𝑛𝑛−1 + 𝒑𝒑𝑛𝑛−2
Degree elevation
• Given: 𝒃𝒃0,…,𝒃𝒃𝑛𝑛 → 𝒙𝒙 𝑡𝑡
• Wanted: �𝒃𝒃0, … , �𝒃𝒃𝑛𝑛, �𝒃𝒃𝑛𝑛+1 → �𝒙𝒙 𝑡𝑡 with 𝒙𝒙 = �𝒙𝒙
• Solution:
Degree elevation
• Given: 𝒃𝒃0,…,𝒃𝒃𝑛𝑛 → 𝒙𝒙 𝑡𝑡
• Wanted: �𝒃𝒃0, … , �𝒃𝒃𝑛𝑛, �𝒃𝒃𝑛𝑛+1 → �𝒙𝒙 𝑡𝑡 with 𝒙𝒙 = �𝒙𝒙
• Solution: �𝒃𝒃0 = 𝒃𝒃𝟎𝟎�𝒃𝒃𝑛𝑛+1 = 𝒃𝒃𝑛𝑛
�𝒃𝒃𝑗𝑗 = 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗−1 + 1 − 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗 for 𝑗𝑗 = 1, … ,𝑛𝑛
Proof
• Let’s consider1 − 𝑡𝑡 𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 = 1 − 𝑡𝑡 𝑛𝑛
𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛−𝑖𝑖𝑡𝑡𝑖𝑖 = 𝑛𝑛𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛+1−𝑖𝑖𝑡𝑡𝑖𝑖
=𝑛𝑛 + 1 − 𝑖𝑖𝑛𝑛 + 1
𝑛𝑛 + 1𝑖𝑖 1 − 𝑡𝑡 𝑛𝑛+1−𝑖𝑖𝑡𝑡𝑖𝑖
=𝑛𝑛 + 1 − 𝑖𝑖𝑛𝑛 + 1
𝐵𝐵𝑖𝑖𝑛𝑛+1 𝑡𝑡
Similarly
𝑡𝑡𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 =𝑖𝑖 + 1𝑛𝑛 + 1
𝐵𝐵𝑖𝑖𝑛𝑛+1 𝑡𝑡
Proof
𝒇𝒇 𝑡𝑡 = 1 − 𝑡𝑡 + 𝑡𝑡 𝒇𝒇 𝑡𝑡 = 1 − 𝑡𝑡 + 𝑡𝑡 �𝑖𝑖=0
𝑛𝑛
𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 𝑷𝑷𝑖𝑖 = �𝑖𝑖=0
𝑛𝑛
1 − 𝑡𝑡 𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 + 𝑡𝑡𝐵𝐵𝑖𝑖𝑛𝑛 𝑡𝑡 𝑷𝑷𝑖𝑖
= �𝑖𝑖=0
𝑛𝑛𝑛𝑛 + 1 − 𝑖𝑖𝑛𝑛 + 1
𝐵𝐵𝑖𝑖𝑛𝑛+1 𝑡𝑡 +𝑖𝑖 + 1𝑛𝑛 + 1
𝐵𝐵𝑖𝑖+1𝑛𝑛+1 𝑡𝑡 𝑷𝑷𝑖𝑖 = �𝑖𝑖=0
𝑛𝑛𝑛𝑛 + 1 − 𝑖𝑖𝑛𝑛 + 1
𝐵𝐵𝑖𝑖𝑛𝑛+1 𝑡𝑡 𝑷𝑷𝑖𝑖 + �𝑖𝑖=0
𝑛𝑛𝑖𝑖 + 1𝑛𝑛 + 1
𝐵𝐵𝑖𝑖+1𝑛𝑛+1 𝑡𝑡 𝑷𝑷𝑖𝑖
= �𝑖𝑖=0
𝑛𝑛𝑛𝑛 + 1 − 𝑖𝑖𝑛𝑛 + 1
𝐵𝐵𝑖𝑖𝑛𝑛+1 𝑡𝑡 𝑷𝑷𝑖𝑖 + �𝑖𝑖=1
𝑛𝑛+1𝑖𝑖
𝑛𝑛 + 1𝐵𝐵𝑖𝑖𝑛𝑛+1 𝑡𝑡 𝑷𝑷𝑖𝑖−1
= �𝑖𝑖=0
𝑛𝑛+1𝑛𝑛 + 1 − 𝑖𝑖𝑛𝑛 + 1
𝐵𝐵𝑖𝑖𝑛𝑛+1 𝑡𝑡 𝑷𝑷𝑖𝑖 + �𝑖𝑖=0
𝑛𝑛+1𝑖𝑖
𝑛𝑛 + 1𝐵𝐵𝑖𝑖𝑛𝑛+1 𝑡𝑡 𝑷𝑷𝑖𝑖−1
= �𝑖𝑖=0
𝑛𝑛+1
𝐵𝐵𝑖𝑖𝑛𝑛+1 𝑡𝑡𝑛𝑛 + 1 − 𝑖𝑖𝑛𝑛 + 1
𝑷𝑷𝑖𝑖 +𝑖𝑖
𝑛𝑛 + 1𝑷𝑷𝑖𝑖−1
Using results from
last slide
Adding null terms, 𝑖𝑖 = 𝑛𝑛 + 1, 𝑖𝑖 = 0
Degree elevation: Example
• �𝒃𝒃0 = 𝒃𝒃0 �𝒃𝒃𝑗𝑗 = 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗−1 + 1 − 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗• �𝒃𝒃𝑛𝑛+1 = 𝒃𝒃𝑛𝑛 𝑗𝑗 = 1, … ,𝑛𝑛
Degree elevation: Example
• �𝒃𝒃0 = 𝒃𝒃0 �𝒃𝒃𝑗𝑗 = 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗−1 + 1 − 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗• �𝒃𝒃𝑛𝑛+1 = 𝒃𝒃𝑛𝑛 𝑗𝑗 = 1, … ,𝑛𝑛
1
Degree elevation: Example
• �𝒃𝒃0 = 𝒃𝒃0 �𝒃𝒃𝑗𝑗 = 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗−1 + 1 − 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗• �𝒃𝒃𝑛𝑛+1 = 𝒃𝒃𝑛𝑛 𝑗𝑗 = 1, … ,𝑛𝑛
𝟑𝟑𝟒𝟒
𝟏𝟏𝟒𝟒
Degree elevation: Example
• �𝒃𝒃0 = 𝒃𝒃0 �𝒃𝒃𝑗𝑗 = 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗−1 + 1 − 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗• �𝒃𝒃𝑛𝑛+1 = 𝒃𝒃𝑛𝑛 𝑗𝑗 = 1, … ,𝑛𝑛
𝟏𝟏𝟐𝟐
𝟏𝟏𝟐𝟐
Degree elevation: Example
• �𝒃𝒃0 = 𝒃𝒃0 �𝒃𝒃𝑗𝑗 = 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗−1 + 1 − 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗• �𝒃𝒃𝑛𝑛+1 = 𝒃𝒃𝑛𝑛 𝑗𝑗 = 1, … ,𝑛𝑛
𝟑𝟑𝟒𝟒
𝟏𝟏𝟒𝟒
Degree elevation: Example
• �𝒃𝒃0 = 𝒃𝒃0 �𝒃𝒃𝑗𝑗 = 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗−1 + 1 − 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗• �𝒃𝒃𝑛𝑛+1 = 𝒃𝒃𝑛𝑛 𝑗𝑗 = 1, … ,𝑛𝑛
𝟏𝟏
Degree elevation: Example
• �𝒃𝒃0 = 𝒃𝒃0 �𝒃𝒃𝑗𝑗 = 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗−1 + 1 − 𝑗𝑗𝑛𝑛+1
𝒃𝒃𝑗𝑗• �𝒃𝒃𝑛𝑛+1 = 𝒃𝒃𝑛𝑛 𝑗𝑗 = 1, … ,𝑛𝑛
Degree elevation
For repeated degree elevation, the Bezier polygon converges to the Bezier curve. (slow convergence)
Recap
Useful properties for basis functions
• Smoothness
• Local control / support
• Affine invariance
• Convex hull property
Curve basis function control points
𝒇𝒇 𝑡𝑡 = �𝑖𝑖=1
𝑛𝑛
𝑏𝑏𝑖𝑖 𝑡𝑡 𝒑𝒑𝑖𝑖
de Casteljau algorithm
Summary and Outlook
• Bezier curves and curve design• The rough form is specified by the position of the control points• Results: smooth curve approximating the control points• Computation / Representation:
• de Casteljau algorithm• Bernstein form
• Problems:• High polynomial degree• Moving a control point can change the whole curve• Interpolation of points• →Bezier splines
Top Related