#
CS184 Section 5

Bezier Curves and De Casteljau's Algorithm

Brandon Wang

September 26, 2012

Material adapted from Fu-Chung Huang.

Bezier Curves and De Casteljau's Algorithm

Brandon Wang

September 26, 2012

Material adapted from Fu-Chung Huang.

HW2 deadline moved to Thurs!

- Curves: Why?
- Curves Worksheet
- Polar Form (maybe)

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

- Scale/arbitrary precision (fonts, vector graphics)
- Some objects are easier to represent in this way
- The sampling algorithm isn't
*too*bad.

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

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

Split each line at u.

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

Compute a few points, then draw lines between them.

HW4 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]