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

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# 4. What degree are these curves?

Bonus! In this video we'll connect the

**degree of these curves**to the**number of control points**in the construction.## Want to join the conversation?

- this is too hard for me and what is the difference between linear interpulation and a beziar curve?(15 votes)
- Linear interpolation means, that the change is at a constant rate. Imagine an electric garage door closing or sand in an hourglass running.

Bezier curves allow you to make a change in the speed of the changes, accelerate and decelerate things. Since this is the way most things actually move, the beziers are quite essential to animation.(7 votes)

- I dont understand any of this(7 votes)
- My brain is popping. Can anyone explain this whole video?(7 votes)
- I got confused within the first 30 seconds... where does Q=(1-t)A + tB come from??(7 votes)
- linear equals straight

curve equals curve(4 votes) - for Q=(t-1)A+tB can A swap with B but still have the same answer?(4 votes)
- The resulting curve would be different, assuming we keep R = (1-t)*B+t*C.

Let's picture the value of Q when we give t values from 0 to 1.

- If we use Q = (1-t)*A + t*B, then Q starts at point A and moves on the line segment toward point B.

- If we use Q = (1-t)*B + t*A, then Q starts at point B and moves on the line segment toward point A.

If you plug in the expressions for Q and R into the equation for P, you'll find that P = t(1-t)*A + (1-t)*B + t^2*C, which is different from the equation for P in the video.(0 votes)

- It is elaborated shortly. Please explain with more ease.(3 votes)
- Is the variable A, B and C the angle or the point on a coordinate plain, or something else?(3 votes)
- The variables A, B, and C are just the name of 3 points on a plane and the video explains how to construct a beziers curve using these three points. However, you could use any amount of points and still get a curve, and you could name each point a different name.(1 vote)

- lots of 3d animation uses trigonometry. you know collage level stuff. ez stuff.
**unhinged laughter**(2 votes) - I think the only people understanding this are animators and or mathematicians/people godly at math.(2 votes)

## Video transcript

- Now that we've seen how Bézier curves behave geometrically, let's
take a look at the algebra starting with a three-point polygon. As before, we construct a point Q using linear interpolation, that is a weighted average
on the line segment AB. Algebraically, Q can be written as Q = (1-t)A + tB Next we construct a point
R on the line segment BC, which means that R can be written as R = (1-t)B + tC Finally we connect Q and R, and do one final linear interpolation to get P, out point on the curve. P = (1-t)Q + tR From this last equation, it kinda look like P is degree 1 in t. But the first two
equations also depend on t. So let's substitute the first
two equations into the third to get this combined expression. Multiplying out the terms and collecting, I can rewrite P as P = (1-t)2*A + 2t(1-t)B +t2*C. All those squared terms show us that P is actually a degree 2 polynomial. Interesting, a three-point polygon leads to a degree 2 polynomial. Thar kinda makes sense
because we did two stages of linear interpolation. In the first stage we computed Q and R and in the second stage we computed P. Now, what happens to the degree if we start with a four-point polygon? Can you guess? In the first stage, I compute three points using linear interpolation. In the second stage, I compute two points, and in the third stage,
I compute one point. Since I have three stages, the resulting curve will be degree 3. That means a four-point polygon
results in a degree 3 curve. You can generalize deCastlejau's algorithm to start with five, six,
or any number of points. The rule is, if we start with n points, you get a polynomial of degree n-1. Pretty neat. And congratulations on
finishing this lesson. If you're feeling particularly bold, try your hand at the
following bonus challenge.