Pixar: The math behind the movies - Tony DeRose
-
0:07 - 0:09At Pixar, we're all about telling stories,
-
0:09 - 0:11but one story that hasn't been told very much
-
0:11 - 0:14is the huge degree to which math is used
-
0:14 - 0:15in the production of our films.
-
0:15 - 0:17The math that you're learning in
-
0:17 - 0:18middle school and high school
-
0:18 - 0:21is used all the time at Pixar.
-
0:21 - 0:23So, let's start with a very simple example.
-
0:23 - 0:27Anybody recognize this guy? (Cheers)
-
0:27 - 0:29Yeah, so this is Woody from Toy Story,
-
0:29 - 0:32and let's ask Woody to, say, walk across the stage
-
0:32 - 0:35from, say, left to right, just like that.
-
0:35 - 0:39So, believe it or not, you just saw a ton of mathematics.
-
0:39 - 0:40Where is it?
-
0:40 - 0:42Well, to explain that,
-
0:42 - 0:43it's important to understand
-
0:43 - 0:45that artists and designers think in terms of
-
0:45 - 0:47shape and images
-
0:47 - 0:50but computers think in terms of numbers and equations.
-
0:50 - 0:51So, to bridge those two worlds
-
0:51 - 0:53we use a mathematical concept called
-
0:53 - 0:55coordinate geometry, right?
-
0:55 - 0:57That is, we lay down a coordinate system
-
0:57 - 1:00with x describing how far something is to the right
-
1:00 - 1:03and y describing how high something is.
-
1:03 - 1:05So, with these coordinates we can describe
-
1:05 - 1:08where Woody is at any instant in time.
-
1:08 - 1:10For instance, if we know the coordinates of
-
1:10 - 1:12the lower left corner of that image,
-
1:12 - 1:14then we know where the rest of the image is.
-
1:14 - 1:16And in that little sliding animation we saw a second ago,
-
1:16 - 1:18that motion we call translation,
-
1:18 - 1:21the x coordinate started with a value of one,
-
1:21 - 1:24and it ended with a value of about five.
-
1:24 - 1:27So, if we want to write that in mathematics,
-
1:27 - 1:30we see that the x at the end is four bigger
-
1:30 - 1:32than x at the start.
-
1:32 - 1:35So, in other words, the mathematics of translation
-
1:35 - 1:36is addition.
-
1:36 - 1:38Alright?
-
1:38 - 1:39How about scaling?
-
1:39 - 1:41That is making something bigger or smaller.
-
1:41 - 1:44Any guesses as to what the mathematics of scaling might be?
-
1:44 - 1:48Dilation, multiplication, exactly.
-
1:48 - 1:50If you're going to make something twice as big,
-
1:50 - 1:52you need to mulitply the x and the y coordinates
-
1:52 - 1:54all by two.
-
1:54 - 1:56So, this shows us that the mathematics of scaling
-
1:56 - 1:58is mulitiplication.
-
1:58 - 1:59Okay?
-
1:59 - 1:59How about this one?
-
1:59 - 2:03How about rotation? Alright, spinning around.
-
2:03 - 2:06The mathematics of rotation is trigonometry.
-
2:06 - 2:08So, here's an equation that expresses that.
-
2:08 - 2:10It looks a little scary at first.
-
2:10 - 2:13You'll probably get this in eighth or ninth grade.
-
2:13 - 2:16If you find yourselves sitting in trigonometry class
-
2:16 - 2:19wondering when you're ever going to need this stuff,
-
2:19 - 2:21just remember that any time you see anything rotate
-
2:21 - 2:23in one of our films,
-
2:23 - 2:25there's trigonometry at work underneath.
-
2:25 - 2:27I first fell in love with mathematics in seventh grade.
-
2:27 - 2:30Any seventh graders? A few of you? Yeah.
-
2:30 - 2:32My seventh grade science teacher showed me
-
2:32 - 2:34how to use trigonometry to compute
-
2:34 - 2:37how high the rockets that I was building was going.
-
2:37 - 2:38I just thought that was amazing,
-
2:38 - 2:41and I've been enamored with math ever since.
-
2:41 - 2:43So, this is kind of old mathematics.
-
2:43 - 2:44Mathematics that's been known and, you know,
-
2:44 - 2:47developed by the old dead Greek guys.
-
2:47 - 2:49And there's a myth out there that all the interesting
-
2:49 - 2:51mathematics has already been figured out,
-
2:51 - 2:54in fact all of mathematics has been figured out.
-
2:54 - 2:56But the real story is that new mathematics
-
2:56 - 2:58is being created all the time.
-
2:58 - 3:00And some of it is being created at Pixar.
-
3:00 - 3:03So, I'd like to give you an example of that.
-
3:03 - 3:04So, here are some characters
-
3:04 - 3:06from some of our early films:
-
3:06 - 3:10Finding Nemo, Monsters Inc. and Toy Story 2.
-
3:10 - 3:14Anybody know who the blue character in the upper left is?
-
3:14 - 3:16It's Dory. Okay, that was easy.
-
3:16 - 3:17Here's a little harder one.
-
3:17 - 3:20Anybody know who's the character in the lower right?
-
3:20 - 3:22Al McWhiggin from Al's Toy Barn, exactly.
-
3:22 - 3:24The thing to notice about these characters
-
3:24 - 3:26is they're really complicated.
-
3:26 - 3:28Those shapes are really complicated.
-
3:28 - 3:32In fact, the toy cleaner, I have an example,
-
3:32 - 3:34the toy cleaner there in the middle,
-
3:34 - 3:36here's his hand.
-
3:36 - 3:38You can imagine how fun it was to bring this
-
3:38 - 3:41through airport security.
-
3:41 - 3:43His hand is a really complicated shape.
-
3:43 - 3:46It's not just a bunch of spheres and cylinders stuck together, right?
-
3:46 - 3:48And not only is it complicated,
-
3:48 - 3:50but it has to move in complicated ways.
-
3:50 - 3:52So, I'd like to tell you how we do that,
-
3:52 - 3:54and to do that I need to tell you about midpoints.
-
3:54 - 3:56So, here's a couple of points, A and B,
-
3:56 - 3:57and the line segment between them.
-
3:57 - 3:59We're going to start out first in two dimensions.
-
3:59 - 4:01The midpoint, M, is the point
-
4:01 - 4:03that splits that line segment in the middle, right?
-
4:03 - 4:05So, that's the geometry.
-
4:05 - 4:06To make equations and numbers,
-
4:06 - 4:09we again introduce a coordinate system,
-
4:09 - 4:10and if we know the coordinates of A and B,
-
4:10 - 4:12we can easily compute the coordinates of M
-
4:12 - 4:14just by averaging.
-
4:14 - 4:16You now know enough to work at Pixar.
-
4:16 - 4:18Let me show you.
-
4:18 - 4:20So, I'm going to do something slightly terrifying
-
4:20 - 4:22and move to a live demo here.
-
4:22 - 4:26So, what I have is a four-point polygon here,
-
4:26 - 4:27and it's going to be my job
-
4:27 - 4:29to make a smooth curve out of this thing.
-
4:29 - 4:32And I'm going to do it just using the idea of midpoints.
-
4:32 - 4:33So, the first thing I'm going to do
-
4:33 - 4:35is an operation I'll call split,
-
4:35 - 4:37which adds midpoints to all those edges.
-
4:37 - 4:39So, I went from four points to eight points,
-
4:39 - 4:41but it's no smoother.
-
4:41 - 4:42I'm going to make it a little bit smoother
-
4:42 - 4:45by moving all of these points from where they are now
-
4:45 - 4:48to the midpoint of their clockwise neighbor.
-
4:48 - 4:49So, let me animate that for you.
-
4:49 - 4:51I'm going to call that the averaging step.
-
4:51 - 4:53So, now I've got eight points,
-
4:53 - 4:54they're a little bit smoother,
-
4:54 - 4:55my job is to make a smooth curve,
-
4:55 - 4:57so what do I do?
-
4:57 - 4:59Do it again. Split and average.
-
4:59 - 5:01So, now I've got sixteen points.
-
5:01 - 5:03I'm going to put those two steps,
-
5:03 - 5:04split and average, together into something
-
5:04 - 5:06I'll call subdivide,
-
5:06 - 5:07which just means split and then average.
-
5:07 - 5:09So, now I've got 32 points.
-
5:09 - 5:11If that's not smooth enough, I'll do more.
-
5:11 - 5:12I'll get 64 points.
-
5:12 - 5:14Do you see a smooth curve appearing here from
-
5:14 - 5:16those original points?
-
5:16 - 5:17And that's how we create the shapes
-
5:17 - 5:19of our charcters.
-
5:19 - 5:21But remember, I said a moment ago
-
5:21 - 5:23it's not enough just to know the static shape,
-
5:23 - 5:24the fixed shape.
-
5:24 - 5:26We need to animate it.
-
5:26 - 5:27And to animate these curves,
-
5:27 - 5:29the cool thing about subdivision.
-
5:29 - 5:32Did you see the aliens in Toy Story?
-
5:32 - 5:33You know that sound they make,
-
5:33 - 5:35"Ooh"? Ready?
-
5:35 - 5:37So, the way we animate these curves
-
5:37 - 5:41is simply by animating the original four points.
-
5:41 - 5:44"Ooh."
-
5:44 - 5:47Alright, I think that's pretty cool,
-
5:47 - 5:49and if you don't, the door is there,
-
5:49 - 5:53it doesn't get any better than that, so.
-
5:53 - 5:55This idea of splitting and averaging
-
5:55 - 5:57also holds for surfaces.
-
5:57 - 6:00So, I'll split, and I'll average.
-
6:00 - 6:02I'll split, and I'll average.
-
6:02 - 6:04Put those together into subdivide,
-
6:04 - 6:06and this how we actually create the shapes
-
6:06 - 6:09of all of our surface characters in three dimensions.
-
6:09 - 6:11So, this idea of subdivision
-
6:11 - 6:13was first used in a short film in 1997
-
6:13 - 6:15called Geri's Game.
-
6:15 - 6:17And Geri actually made a cameo apperance
-
6:17 - 6:19in Toy Story 2 as the toy cleaner.
-
6:19 - 6:20Each of his hands
-
6:20 - 6:23was the first time we ever used subdivision.
-
6:23 - 6:25So, each hand was a subdivision surface,
-
6:25 - 6:27his face was a subdivision surface,
-
6:27 - 6:28so was his jacket.
-
6:28 - 6:30Here's Geri's hand before subdivision,
-
6:30 - 6:33and here's Geri's hand after subdivision,
-
6:33 - 6:35so subdivision just goes in and smooths out
-
6:35 - 6:36all those facets,
-
6:36 - 6:38and creates the beautiful surfaces
-
6:38 - 6:40that you see on the screen and in the theaters.
-
6:40 - 6:43Since that time, we've built all of our characters this way.
-
6:43 - 6:47So, here's Merida, the lead character from Brave.
-
6:47 - 6:48Her dress was a subdivision surface,
-
6:48 - 6:49her hands, her face.
-
6:49 - 6:51The faces and hands of all the clansman
-
6:51 - 6:53were subdivision surfaces.
-
6:53 - 6:55Today we've seen how addition, multiplication,
-
6:55 - 6:59trigonometry and geometry play a roll in our films.
-
6:59 - 7:00Given a little more time,
-
7:00 - 7:02I could show you how linear algebra,
-
7:02 - 7:05differential calculus, integral calculus
-
7:05 - 7:06also play a roll.
-
7:06 - 7:09The main thing I want you to go away with today is
-
7:09 - 7:12to just remember that all the math that you're learning
-
7:12 - 7:15in high school and actually up through sophomore college
-
7:15 - 7:20we use all the time, everyday, at Pixar. Thanks.
- Title:
- Pixar: The math behind the movies - Tony DeRose
- Description:
-
View full lesson: http://ed.ted.com/lessons/pixar-the-math-behind-the-movies-tony-derose
The folks at Pixar are widely known as some of the world's best storytellers and animators. They are perhaps less recognized as some of the most innovative math whizzes around. Pixar Research Lead Tony DeRose delves into the math behind the animations, explaining how arithmetic, trigonometry and geometry help bring Woody and the rest of your favorite characters to life.
Talk by Tony DeRose.
- Video Language:
- English
- Team:
- closed TED
- Project:
- TED-Ed
- Duration:
- 07:34
Jessica Ruby approved English subtitles for Pixar: The math behind the movies - Tony DeRose | ||
Jessica Ruby accepted English subtitles for Pixar: The math behind the movies - Tony DeRose | ||
Jessica Ruby edited English subtitles for Pixar: The math behind the movies - Tony DeRose | ||
Jessica Ruby edited English subtitles for Pixar: The math behind the movies - Tony DeRose | ||
Jennifer Cody edited English subtitles for Pixar: The math behind the movies - Tony DeRose | ||
Jennifer Cody edited English subtitles for Pixar: The math behind the movies - Tony DeRose |