If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

2. Linear interpolation

Animate a bouncing ball using pose-to-pose animation! First, we draw key poses like the highest point and ground contact, and then we add breakdowns in between to create smooth motion. Computers achieve this effect with linear interpolation, calculating in-between frames by connecting key poses with a straight line in a graph. Then, for more realistic animation, we can adjust keyframes to get the exact spacing we want.

Want to join the conversation?

Video transcript

- Okay, straight-ahead animation works, but a lot of times it's hard to figure out where you're going. A lot of times, it's helpful to start by working out what we call the key poses first. For a bouncing ball, that's gonna be where the ball is at its highest point and where it hits the ground. I'll start by drawing frame one up high. Now let's draw frame nine on the ground. Now I can draw the in-betweens using these key poses as a guide. I'll draw frame five in the middle. We call this a breakdown. Now I can keep adding more frames, subdividing the space. Sometimes it helps to make a little chart to keep track of all the numbers. (scribbling) Great, now let's shoot our drawings and play them back. In back, we can cheat and make it bounce back by reusing the same drawings on the way back up. (thudding) Hmm, the ball's moving, but it's not very realistic. Sometimes, before you get started, it helps to shoot video reference so you have some idea of what you're doing. Remember, the ball needs to speed up as it falls to the ground. Our frame five is halfway through the animation in time, but the ball shouldn't be halfway to the ground at that point. Instead, I'm gonna draw a new frame five that's biased towards the first pose. Maybe I'll draw it a third of the way down. Animators have developed a visual language using these timing charts to show how to space the drawing in between key poses. So frame five, remember, is a third of the way between one and nine. I'll draw frame three a third of the way between one and five, and so on. These charts help us keep track of the in-between drawings so we end up with the proper timing. When we play this back, the ball accelerates towards the ground. (thudding) Now let's see how we use the same technique of pose-to-pose animation on the computer. We'll start by positioning the ball up in the air in frame one, just like before. And then we'll skip ahead to frame nine and put the ball on the ground. Down below the picture, the computer shows us this graph. It's kind of like a 2D timing chart, and it shows us how the computer is going to calculate the in-between frames. The horizontal axis is time, and the vertical axis is how high up the ball is. Check this out. If we project the intersection of each frame onto the vertical axis, we end up with exactly the same timing chart that the 2D animators use. You can see that by default the computer connects our poses with a straight line in the graph. This is called linear interpolation. It results in even spacing of the poses. When we play it back, the ball will move at a constant rate. Now you give it a try. See if you can animate a convincing bouncing ball using linear interpolation. And here's a hint: you can add extra key frames in between to get the spacing that you want.