Main content

## Pixar in a Box

### Unit 10: Lesson 2

Mathematics of animation curves- Start here!
- 1. Mathematics of linear interpolation
- Linear interpolation
- 2. Repeated linear interpolation
- 3. De Casteljau's algorithm
- Constructing curves using repeated linear interpolation
- 4. What degree are these curves?
- Bonus: Equations from de Casteljau's algorithm

© 2022 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# 3. De Casteljau's algorithm

We can use de Casteljau's algorithm to calculate curves using any number of points.

## Video transcript

- So, how'd it go? Did you figure out how to extend a Casteljau's algorithm to 4 points? It's not so easy, so don't
worry if you had some trouble. Here's what De Casteljau came up with. First, we use linear interpolation along with our parameter
t, to find a point on each of the 3 line segments. Now we have a 3-point polygon,
just like the grass blade. As before, we find a point
on each of the new segments using linear interpolation
and the same t value. Now we have a 2-point polygon, or a line. We find a point on our line using linear interpolation, one more time. As we vary the parameter
t, this final point traces out our smooth curve. These are the kind of
curves we typically use to control the motion of our
characters as we animate. We use something called a graph editor, which lets us manipulate
the control points of these curves to get
smooth motion between poses. This is the graph editor
that we use at Pixar. In between each one of my
key poses is a Bézier curve. We also tend to group
the adjacent segments so they maintain the slope of the
curve across the key frame. This prevents sudden jerks in the motion. You can use the next interactive excercise to get some experience with Bézier curves that have 3, 4, or even more points.