Main content
Pixar in a Box
Course: Pixar in a Box > Unit 3
Lesson 2: Mathematics of subdivision- Start here!
- Weighted average of three points
- Weighted average intuition
- Weighted average of three points
- 2. Weighted subdivision
- Weighted subdivision
- 3. Fun with weights
- Interativo: subdivisão ponderada
- Subdivision weights
- Bonus: Equations for points in subdivision
© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice
Weighted average of three points
First we'll review weighted averages of two points and extend the idea to three points.
Practice weighted averages of two points in Environment Modeling if you haven't seen it before.
Practice weighted averages of two points in Environment Modeling if you haven't seen it before.
Want to join the conversation?
- I don't understand why:
results in "M is undefined" rather than M defaulting to the center of △ABC triangle (which is the case for all other situations where the values are equal, like: 1, 1, 1, or 5,5,5 etc.). If there is no weight, it should be in the center of the triangle, right?M is the weighted average of three points, A, B and C. What is the position of M of using weights of 0, 0 and 0, respectively?
(7 votes)- Because, according to the mathematical formula, the average is
(aA + bB + cC)/(a + b + c) = (0A + 0B + 0C)/(0 + 0 + 0) = 0/0 = Indeterminate
.(4 votes)
- Athe says that to make the expression a proper average you have to divide by a+b. Why? By doing that you change the value don't you? 1:29(5 votes)
- When you're taking an average of several numbers, you add all the numbers up, then divide by the number of numbers. So the average of the set [1,7,3] is (1 + 7 + 3) / 3.
When you're taking a weighted average, you count one of your numbers more than once. So if you weight the previous average so that the 3 is twice as important as the other two is (1 + 7 + 3 + 3) / 4.
In the same way, when you take the weighted average of geometric points, if you increase a point's importance, you have to increase the divisor equal to the extra level of importance you give it.
To illustrate: If you're simply averaging two points A and B, then the formula is (A + B) / 2. The divisor is equal to the number of points you're averaging. If you want A to count twice as much as B, then it's (A + A + B) / 3. Again, the divisor is equal to the number of points, even though one of them is really the same point twice. Here, the "little a" is 2 and the "little b" is 1. So it could be rewritten as (2*A + 1*B) / 2 + 1.
If you don't increase the divisor like this, you won't get an average, and your new point will wind up in the wrong place.(5 votes)
- 0:03
- Now that you have a feel for how t works,0:05
we're ready to calculate our intersection point I0:08
between our ray CP and our line segment AB.0:11
Recall from the previous video that0:13
the slope intercept form of the line AB0:15
is y equals negative three x plus 110:18
and the parametric representation of the ray CP0:21
is the function R of t equals one minus t0:25
times C plus t times P.0:29
Different values of the parameter t0:31
locate different points on the ray.0:36
The intersection point that we're after0:38
is one such point on the ray so there0:40
must be some value of t, call it t star,0:44
such that I equals R of t star.0:49
This is really two equations, one for the x-coordinate0:52
of I and one for the y-coordinate.0:55
These two equations are I sub x equals R sub x0:59
of t star, which equals one minus t star1:03
times C sub x plus t star times P sub x.1:09
In the same way I sub y equals R sub y of t star,1:14
which equals one minus t star times C sub y1:18
plus t star times P sub y.1:22
In this particular case C, our camera position,1:26
has coordinates zero, zero1:28
and P has coordinates two, 1/2.1:33
So we have I sub x equals t star times two1:38
and I sub y equals t star times 1/2.
•1:42
I is also on the line segment AB meaning that1:46
I satisfies the slope intercept form for AB,1:50
that is I sub y equals negative three1:53
times I sub x plus 11.1:57
So we have three equations and three unknowns,2:01
I sub x, I sub y and t star.2:06
We can solve the system of equations2:08
by substituting the first two equations2:10
into the third to get an equation just in t star.2:14
1/2 t star equals negative three2:18
times two times t star plus 11.2:23
Solve this for t star, then plug that value2:26
of t star into the first two equations2:28
to get I sub x and I sub y.2:32
And that's how it's done.2:33
Before we continue get some experience using this2:36
kind of parametric function in the next exercise.(6 votes) - what is weighted average?(3 votes)
- Imagine that you want the average of two points, X and Y, but you want Y to be twice as important. So rather than saying (X + Y)/2, you average X, Y, and Y, saying (X + 2Y)/3.
Now, the technical definition: The weighted average of vectors (fancy word for points) X_1, X_2, X_3, . . ., X_n with weights A_1, A_2, A_3, . . ., A_n is (A_1 X_1 + A_2 X_2 + A_3 X_3 + . . . + A_n X_n)/(A_1 + A_2 + A_3 + . . . + A_n).(5 votes)
- I forgot!! In one video, they had a recommended free software or something, and I wanted to try that out! It may be past this point..if anyone finds it, can you tell me which video? Thanks!(2 votes)
- In this video (https://www.khanacademy.org/partner-content/pixar/environment-modeling-2/animating-parabolas-ver2/v/tony-derose) Tony mentions Blender, which is a free 3D modeling and animation software.(6 votes)
- I didn't understand what he said at the end. (The language he was speaking).
Also, what did he say?(4 votes)- It was Spanish. I would suggest looking at the above comment.(2 votes)
- Hi I am kinda new to this, so what does little a, little b and little c represent?(3 votes)
- a b and c are the weights of the triangle(2 votes)
- How is M the weighted average of A, B and C(3 votes)
- Ok the way he explains the math makes WAY more sense then what the other guy in Environment Modeling did, and now I understand it better, not entirely but better(3 votes)
Video transcript
Here we are again with the interactive replacement curves