Bezier
Bezier
Bezier
CS 319
Advanced Topics in Computer Graphics
John C. Hart
Bezier Curves
p1 = x1,y1
p2 = x2,y2
p0 = x0,y0
p3 = x3,y3
coordinate
system
dependent!
Any Degree
Bezier curves not necessarily cubic
Can be formulated for any degree
Desired degree = desired curve wiggles + 1 =
control points 1
Examples:
Degree 2 (quadratic): 3 CPs, 1 wiggle
Degree 3 (cubic): 4 CPs, 2 wiggles
Degree 4 (quartic): 5 CPs, 3 wiggles
Questions:
How can we add more control points to a
given Bezier curve?
How can we subdivide a Bezier curve into
two Bezier curve pieces?
Bernstein Polynomials
B03(t)
B33(t)
B13(t) B23(t)
Defined for any degree
Bin(t) = (ni) ti (1-t)n-i
n choose i
(ni) = n!/(i!(n i)!) = (ni- 1) + (ni--11)
Partition of unity
Sum to one for any t in [0,1]
Si=0..n Bin(t) = 1
Higher degrees lerps of lower degrees
Bin(t) = (ni) ti (1-t)n-i
= (ni- 1) ti (1-t)n-i + (ni--11) ti (1-t)n-i
= (1-t)Bin-1(t) + tBin--11(t)
0
0
1/3
2/3
b
d
a
c
p(t)=aB03(t)+bB13(t)+cB23(t)+dB33(t
)
n
i
( )=
n
i
( )=
1 2 3 n-2 n-1 n
(1 2 3 i) (1 2 3 n-i)
n
i
( )=
n
i
( )=
+i
n
i
n-1
i
n-1
i-1
( )= ( ) + ( )
Building Bernsteins
Bin(t) = (1-t)Bin-1(t) + tBin--11(t)
=
B02(t) =
(1-t)
B01(t)
+
=
B12(t)
(1-t)
B11(t) +
=
B22(t)
B11(t)
B01(t)
Bezier Properties
p1
p2
Affine invariance
Barycentric combination
Control points form convex hull
Bernstein basis in [0,1]
Endpoint interpolation
B0n(0) = 1; Bnn(1) = 1
Symmetry
Bin(t) = Bnn- i(1 t)
Derivatives
Bin(t) = n(Bin--11(t) Bin-1(t))
p0
p3
B03(t)
B33(t)
B13(t) B23(t)
de Casteljau
Algorithm
p1
p12
p012
1-t
Cascading lerps
p123
p0123
p01 = (1-t) p0 + t p1
p01
p12 = (1-t) p1 + t p2
t
p23
p23 = (1-t) p2 + t p3
p0
p012 = (1-t) p01 + t p12
p3
p123 = (1-t) p12 + t p23
p0123 = (1-t) p012 + t p123
coordinate
Subdivides curve at p0123
free!
p0 p01 p012 p0123
p0123 p123 p23 p3
Repeated subdivision converges to
curve
p2
Degree Elevation
p1
1/4
q1
1/2
q2
1/2
p2
1/4
q3
3/4
p3=q4
Blossoms
Defines a polar form f() for a
polynomial F(t)
Number of blossom parameters =
degree of polynomial (n)
Symmetric
f(t1,t2,t3) = f(t2,t1,t3) = f(t3,t2,t1)
Multiaffine
f(,S ai ti,) = S ai f(, ti,)
Evaluation by diagonalization
F(t) = f(t,t,,t)
q
F(q)(t) = n!/(n-q)! f(t,t,,t,1,,1)
Bezier Blossoming
f(0,0,1)
f(0,t,1)
f(0,t,t)
f(t,t,t)
f(0,1,1)
f(t,t,1)
f(0,0,t)
p(t) = f(t,t,t)
f(t,1,1)
f(0,0,0)
f(1,1,1)
Systolic Array
f(t,t,t)
(1-t)
f(0,t,t)
(1-t)
f(0,0,t)
(1-t)
f(0,0,0)
f(t,t,1)
(1-t)
f(0,t,1)
(1-t)
f(0,0,1)
f(t,1,1)
(1-t)
f(0,1,1)
f(1,1,1)