Today’s Outline
• Quadratic Bézier curves
• de Casteljau formulation
• Bernstein polynomial form
• Bézier splines
• Cubic Bézier curves
• Drawing Bézier curves
2
The Goal:
Create a system that provides an accurate, complete, and indisputable definition of
freeform shapes.
4
de Casteljau’s Algorithm (quadratic)
p10 = lerp(p0,p1, u)
p11 = lerp(p1,p2, u)
p(u) = lerp(p10,p
11, u)
p0
p1
p2
8
Bernstein Polynomials
0 0.25 0.5 0.75 1
0.25
0.5
0.75
1
b0,2(u) = (1� u)2
b1,2(u) = 2u(1� u)
b2,2(u) = u2
9
Bernstein Form of a Quadratic Bézier
p0
p1
p2
p(u) = (1� u)2p0 + 2u(1� u)p1 + u2p2
= b0,2(u)p0 + b1,2(u)p1 + b2,2(u)p2
=2X
i=0
bi,2(u)pi
10
0 0.25 0.5 0.75 1
0.25
0.5
0.75
1
Third Degree Bernstein Polynomials
b0,3(u) = (1� u)3
b1,3(u) = 3u(1� u)2
b2,3(u) = 3u2(1� u)
b3,3(u) = u3
28
Bernstein form of a Cubic Bézier
p(u) = (1� u)3p0 + 3u(1� u)2p1 + 3u2(1� u)p2 + u3p3
= b0,3(u)p0 + b1,3(u)p1 + b2,3(u)p2 + b3,3(u)p3
=3X
i=0
bi,3(u)pi
p0
p1
p2
p3
29
Two methods for evaluating your curve
p0 p1 p2 p3
p10 p1
1 p12
p20 p2
1
p(u)
u1� u
p(u) =nX
i=0
bi,n(u)pi
bi,n(u) =
✓ni
◆ui(1� u)n�i
de Casteljau
Bernstein
Which one do you think is more efficient?
34
Things to Remember
• Bézier curves and splines can provide an accurate, complete, and indisputable definition of freeform shapes
- defined by de Casteljau construction or Bernstein polynomials
- quadratic (3 points), cubic (4 points), or higher order
• Splines are just curve segments joined together
- can have various degrees of parametric/geometric continuity
• Draw splines by approximating them with line segments, just like parametric curves! (same considerations apply)
36
Top Related