CS184 Section 7
Bezier Curves and De Casteljau's Algorithm

Brandon Wang
March 12, 2013
Material adapted from Fu-Chung Huang.


Midterm next week!


In the end, you'll be sending triangles to your GPU to render, so why represent things in this weird format?


Smooth curves. Triangles are jagged, etc. Think of it as a continuous representation of a curve, whereas triangles are a discrete sample. (Demo later)

Mario Kart

Nice Curves

Geri's Game


De Casteljau's Algorithm

Calculate f(u) at a specific point u. (Easier to think between 0 and 1)

Split each line at u.

De Casteljau Animation

De Casteljau Animation

Finite Subdivision

Can't calculate f(u) for all u. That's silly.

Compute a few points, then draw lines between them.

AS3 demo


Dynamic Programming

for i = 0:power
  p[i][power] = control_points[i]
for power = degree-1:0
  for i = 0:power
    p[i][power] = (1-u) * p[i][power+1] + u*p[i+1][power+1]
return p[0][0]

Bezier Surfaces

Worksheet time


Geometric, Parametric Continuity