WEBVTT 00:00:06.663 --> 00:00:09.040 At Pixar, we're all about telling stories, 00:00:09.040 --> 00:00:11.333 but one story that hasn't been told very much 00:00:11.333 --> 00:00:14.002 is the huge degree to which math is used 00:00:14.002 --> 00:00:15.418 in the production of our films. 00:00:15.418 --> 00:00:16.839 The math that you're learning in 00:00:16.839 --> 00:00:18.387 middle school and high school 00:00:18.387 --> 00:00:20.508 is used all the time at Pixar. 00:00:20.508 --> 00:00:23.095 So, let's start with a very simple example. 00:00:23.095 --> 00:00:26.727 Anybody recognize this guy? (Cheers) 00:00:26.727 --> 00:00:29.305 Yeah, so this is Woody from Toy Story, 00:00:29.305 --> 00:00:31.971 and let's ask Woody to, say, walk across the stage 00:00:31.971 --> 00:00:34.521 from, say, left to right, just like that. 00:00:34.521 --> 00:00:38.888 So, believe it or not, you just saw a ton of mathematics. 00:00:38.888 --> 00:00:40.055 Where is it? 00:00:40.055 --> 00:00:42.114 Well, to explain that, 00:00:42.114 --> 00:00:43.322 it's important to understand 00:00:43.322 --> 00:00:45.076 that artists and designers think in terms of 00:00:45.076 --> 00:00:46.829 shape and images 00:00:46.829 --> 00:00:49.639 but computers think in terms of numbers and equations. 00:00:49.639 --> 00:00:51.222 So, to bridge those two worlds 00:00:51.222 --> 00:00:52.888 we use a mathematical concept called 00:00:52.888 --> 00:00:54.752 coordinate geometry, right? 00:00:54.752 --> 00:00:56.754 That is, we lay down a coordinate system 00:00:56.754 --> 00:01:00.171 with x describing how far something is to the right 00:01:00.171 --> 00:01:02.945 and y describing how high something is. 00:01:02.945 --> 00:01:05.219 So, with these coordinates we can describe 00:01:05.219 --> 00:01:07.554 where Woody is at any instant in time. 00:01:07.554 --> 00:01:09.721 For instance, if we know the coordinates of 00:01:09.721 --> 00:01:11.803 the lower left corner of that image, 00:01:11.803 --> 00:01:13.772 then we know where the rest of the image is. 00:01:13.772 --> 00:01:16.471 And in that little sliding animation we saw a second ago, 00:01:16.471 --> 00:01:18.471 that motion we call translation, 00:01:18.471 --> 00:01:21.473 the x coordinate started with a value of one, 00:01:21.473 --> 00:01:24.306 and it ended with a value of about five. 00:01:24.306 --> 00:01:26.700 So, if we want to write that in mathematics, 00:01:26.700 --> 00:01:30.138 we see that the x at the end is four bigger 00:01:30.138 --> 00:01:32.053 than x at the start. 00:01:32.053 --> 00:01:35.082 So, in other words, the mathematics of translation 00:01:35.082 --> 00:01:36.500 is addition. 00:01:36.500 --> 00:01:37.835 Alright? 00:01:37.835 --> 00:01:38.972 How about scaling? 00:01:38.972 --> 00:01:41.303 That is making something bigger or smaller. 00:01:41.303 --> 00:01:44.138 Any guesses as to what the mathematics of scaling might be? 00:01:44.138 --> 00:01:48.222 Dilation, multiplication, exactly. 00:01:48.222 --> 00:01:49.889 If you're going to make something twice as big, 00:01:49.889 --> 00:01:52.305 you need to mulitply the x and the y coordinates 00:01:52.305 --> 00:01:53.944 all by two. 00:01:53.944 --> 00:01:56.192 So, this shows us that the mathematics of scaling 00:01:56.192 --> 00:01:57.521 is mulitiplication. 00:01:57.521 --> 00:01:58.554 Okay? 00:01:58.554 --> 00:01:59.472 How about this one? 00:01:59.472 --> 00:02:02.722 How about rotation? Alright, spinning around. 00:02:02.722 --> 00:02:06.071 The mathematics of rotation is trigonometry. 00:02:06.071 --> 00:02:08.139 So, here's an equation that expresses that. 00:02:08.139 --> 00:02:09.994 It looks a little scary at first. 00:02:09.994 --> 00:02:12.995 You'll probably get this in eighth or ninth grade. 00:02:12.995 --> 00:02:16.000 If you find yourselves sitting in trigonometry class 00:02:16.000 --> 00:02:18.759 wondering when you're ever going to need this stuff, 00:02:18.759 --> 00:02:21.170 just remember that any time you see anything rotate 00:02:21.170 --> 00:02:22.554 in one of our films, 00:02:22.554 --> 00:02:24.806 there's trigonometry at work underneath. 00:02:24.806 --> 00:02:27.176 I first fell in love with mathematics in seventh grade. 00:02:27.176 --> 00:02:29.722 Any seventh graders? A few of you? Yeah. 00:02:29.722 --> 00:02:32.055 My seventh grade science teacher showed me 00:02:32.055 --> 00:02:33.720 how to use trigonometry to compute 00:02:33.720 --> 00:02:36.640 how high the rockets that I was building was going. 00:02:36.640 --> 00:02:38.055 I just thought that was amazing, 00:02:38.055 --> 00:02:41.140 and I've been enamored with math ever since. 00:02:41.140 --> 00:02:42.859 So, this is kind of old mathematics. 00:02:42.859 --> 00:02:44.305 Mathematics that's been known and, you know, 00:02:44.305 --> 00:02:47.140 developed by the old dead Greek guys. 00:02:47.140 --> 00:02:49.221 And there's a myth out there that all the interesting 00:02:49.221 --> 00:02:51.493 mathematics has already been figured out, 00:02:51.493 --> 00:02:54.329 in fact all of mathematics has been figured out. 00:02:54.329 --> 00:02:56.304 But the real story is that new mathematics 00:02:56.304 --> 00:02:58.124 is being created all the time. 00:02:58.124 --> 00:03:00.334 And some of it is being created at Pixar. 00:03:00.334 --> 00:03:02.555 So, I'd like to give you an example of that. 00:03:02.555 --> 00:03:04.172 So, here are some characters 00:03:04.172 --> 00:03:05.888 from some of our early films: 00:03:05.888 --> 00:03:10.434 Finding Nemo, Monsters Inc. and Toy Story 2. 00:03:10.434 --> 00:03:13.682 Anybody know who the blue character in the upper left is? 00:03:13.682 --> 00:03:15.639 It's Dory. Okay, that was easy. 00:03:15.639 --> 00:03:16.602 Here's a little harder one. 00:03:16.602 --> 00:03:19.853 Anybody know who's the character in the lower right? 00:03:19.853 --> 00:03:22.445 Al McWhiggin from Al's Toy Barn, exactly. 00:03:22.445 --> 00:03:24.304 The thing to notice about these characters 00:03:24.304 --> 00:03:25.776 is they're really complicated. 00:03:25.776 --> 00:03:27.778 Those shapes are really complicated. 00:03:27.778 --> 00:03:31.805 In fact, the toy cleaner, I have an example, 00:03:31.805 --> 00:03:34.077 the toy cleaner there in the middle, 00:03:34.077 --> 00:03:35.746 here's his hand. 00:03:35.746 --> 00:03:37.749 You can imagine how fun it was to bring this 00:03:37.749 --> 00:03:40.917 through airport security. 00:03:40.917 --> 00:03:42.837 His hand is a really complicated shape. 00:03:42.837 --> 00:03:45.712 It's not just a bunch of spheres and cylinders stuck together, right? 00:03:45.712 --> 00:03:47.591 And not only is it complicated, 00:03:47.591 --> 00:03:49.727 but it has to move in complicated ways. 00:03:49.727 --> 00:03:51.509 So, I'd like to tell you how we do that, 00:03:51.509 --> 00:03:53.771 and to do that I need to tell you about midpoints. 00:03:53.771 --> 00:03:55.721 So, here's a couple of points, A and B, 00:03:55.721 --> 00:03:57.099 and the line segment between them. 00:03:57.099 --> 00:03:59.304 We're going to start out first in two dimensions. 00:03:59.304 --> 00:04:01.022 The midpoint, M, is the point 00:04:01.022 --> 00:04:03.389 that splits that line segment in the middle, right? 00:04:03.389 --> 00:04:05.108 So, that's the geometry. 00:04:05.108 --> 00:04:06.471 To make equations and numbers, 00:04:06.471 --> 00:04:08.529 we again introduce a coordinate system, 00:04:08.529 --> 00:04:10.472 and if we know the coordinates of A and B, 00:04:10.472 --> 00:04:12.405 we can easily compute the coordinates of M 00:04:12.405 --> 00:04:13.742 just by averaging. 00:04:13.742 --> 00:04:16.245 You now know enough to work at Pixar. 00:04:16.245 --> 00:04:17.578 Let me show you. 00:04:17.578 --> 00:04:19.541 So, I'm going to do something slightly terrifying 00:04:19.541 --> 00:04:22.055 and move to a live demo here. 00:04:22.055 --> 00:04:25.972 So, what I have is a four-point polygon here, 00:04:25.972 --> 00:04:27.088 and it's going to be my job 00:04:27.088 --> 00:04:29.132 to make a smooth curve out of this thing. 00:04:29.132 --> 00:04:31.761 And I'm going to do it just using the idea of midpoints. 00:04:31.761 --> 00:04:32.929 So, the first thing I'm going to do 00:04:32.929 --> 00:04:34.889 is an operation I'll call split, 00:04:34.889 --> 00:04:37.097 which adds midpoints to all those edges. 00:04:37.097 --> 00:04:39.221 So, I went from four points to eight points, 00:04:39.221 --> 00:04:40.518 but it's no smoother. 00:04:40.518 --> 00:04:41.722 I'm going to make it a little bit smoother 00:04:41.722 --> 00:04:44.691 by moving all of these points from where they are now 00:04:44.691 --> 00:04:47.805 to the midpoint of their clockwise neighbor. 00:04:47.805 --> 00:04:49.222 So, let me animate that for you. 00:04:49.222 --> 00:04:51.139 I'm going to call that the averaging step. 00:04:51.139 --> 00:04:52.556 So, now I've got eight points, 00:04:52.556 --> 00:04:53.639 they're a little bit smoother, 00:04:53.639 --> 00:04:55.325 my job is to make a smooth curve, 00:04:55.325 --> 00:04:56.890 so what do I do? 00:04:56.890 --> 00:04:59.077 Do it again. Split and average. 00:04:59.077 --> 00:05:00.997 So, now I've got sixteen points. 00:05:00.997 --> 00:05:02.554 I'm going to put those two steps, 00:05:02.554 --> 00:05:04.169 split and average, together into something 00:05:04.169 --> 00:05:05.616 I'll call subdivide, 00:05:05.616 --> 00:05:07.449 which just means split and then average. 00:05:07.449 --> 00:05:09.262 So, now I've got 32 points. 00:05:09.262 --> 00:05:10.700 If that's not smooth enough, I'll do more. 00:05:10.700 --> 00:05:12.117 I'll get 64 points. 00:05:12.117 --> 00:05:13.971 Do you see a smooth curve appearing here from 00:05:13.971 --> 00:05:15.638 those original points? 00:05:15.638 --> 00:05:17.117 And that's how we create the shapes 00:05:17.117 --> 00:05:19.222 of our charcters. 00:05:19.222 --> 00:05:20.558 But remember, I said a moment ago 00:05:20.558 --> 00:05:23.145 it's not enough just to know the static shape, 00:05:23.145 --> 00:05:24.146 the fixed shape. 00:05:24.146 --> 00:05:25.533 We need to animate it. 00:05:25.533 --> 00:05:27.277 And to animate these curves, 00:05:27.277 --> 00:05:28.900 the cool thing about subdivision. 00:05:28.900 --> 00:05:31.653 Did you see the aliens in Toy Story? 00:05:31.653 --> 00:05:32.534 You know that sound they make, 00:05:32.534 --> 00:05:34.701 "Ooh"? Ready? 00:05:34.701 --> 00:05:36.950 So, the way we animate these curves 00:05:36.950 --> 00:05:41.079 is simply by animating the original four points. 00:05:41.079 --> 00:05:43.666 "Ooh." 00:05:43.666 --> 00:05:46.783 Alright, I think that's pretty cool, 00:05:46.783 --> 00:05:49.086 and if you don't, the door is there, 00:05:49.086 --> 00:05:52.783 it doesn't get any better than that, so. 00:05:52.783 --> 00:05:54.617 This idea of splitting and averaging 00:05:54.617 --> 00:05:56.803 also holds for surfaces. 00:05:56.803 --> 00:06:00.222 So, I'll split, and I'll average. 00:06:00.222 --> 00:06:02.263 I'll split, and I'll average. 00:06:02.263 --> 00:06:03.867 Put those together into subdivide, 00:06:03.867 --> 00:06:05.616 and this how we actually create the shapes 00:06:05.616 --> 00:06:09.106 of all of our surface characters in three dimensions. 00:06:09.106 --> 00:06:10.534 So, this idea of subdivision 00:06:10.534 --> 00:06:13.234 was first used in a short film in 1997 00:06:13.234 --> 00:06:14.821 called Geri's Game. 00:06:14.821 --> 00:06:16.782 And Geri actually made a cameo apperance 00:06:16.782 --> 00:06:19.200 in Toy Story 2 as the toy cleaner. 00:06:19.200 --> 00:06:20.327 Each of his hands 00:06:20.327 --> 00:06:22.868 was the first time we ever used subdivision. 00:06:22.868 --> 00:06:24.667 So, each hand was a subdivision surface, 00:06:24.667 --> 00:06:26.506 his face was a subdivision surface, 00:06:26.506 --> 00:06:27.835 so was his jacket. 00:06:27.835 --> 00:06:29.783 Here's Geri's hand before subdivision, 00:06:29.783 --> 00:06:32.586 and here's Geri's hand after subdivision, 00:06:32.586 --> 00:06:34.590 so subdivision just goes in and smooths out 00:06:34.590 --> 00:06:35.842 all those facets, 00:06:35.842 --> 00:06:37.676 and creates the beautiful surfaces 00:06:37.676 --> 00:06:40.116 that you see on the screen and in the theaters. 00:06:40.116 --> 00:06:43.182 Since that time, we've built all of our characters this way. 00:06:43.182 --> 00:06:46.560 So, here's Merida, the lead character from Brave. 00:06:46.560 --> 00:06:48.313 Her dress was a subdivision surface, 00:06:48.313 --> 00:06:49.482 her hands, her face. 00:06:49.482 --> 00:06:51.200 The faces and hands of all the clansman 00:06:51.200 --> 00:06:52.821 were subdivision surfaces. 00:06:52.821 --> 00:06:55.066 Today we've seen how addition, multiplication, 00:06:55.066 --> 00:06:58.838 trigonometry and geometry play a roll in our films. 00:06:58.838 --> 00:07:00.075 Given a little more time, 00:07:00.075 --> 00:07:01.867 I could show you how linear algebra, 00:07:01.867 --> 00:07:04.662 differential calculus, integral calculus 00:07:04.662 --> 00:07:06.033 also play a roll. 00:07:06.033 --> 00:07:09.200 The main thing I want you to go away with today is 00:07:09.200 --> 00:07:12.117 to just remember that all the math that you're learning 00:07:12.117 --> 00:07:15.090 in high school and actually up through sophomore college 00:07:15.090 --> 00:07:19.925 we use all the time, everyday, at Pixar. Thanks.