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
Current time:0:00Total duration:2:44

Video transcript

in the previous video we saw how to use three points to define a parabolic arc later we'll talk about how to define the width the color the motion and the variety that would be needed to create a convincing field of grass but first let's talk about what math we would need to create a computer program that our artists could use a program like this one for instance where I can pull points around and the parabola updates so what kind of math is required underneath this program first we need to talk about computing the locations of the points that we're going to connect together with the string art lines now some of these points are a little bit easier to construct than others and the easiest ones are the ones here at the midpoints so this point here is on the midpoint of this leg and this point here is on the midpoint of this leg and so on so let's look at the mathematics of midpoints so here I have a line segment a B the midpoint of that line segment is going to be somewhere in the middle like this yellow point here let's call that point Q now the question is if I know the coordinates of a suppose the coordinates of a are say a sub X and a sub y and similarly suppose the coordinates of B are B sub X and B sub y then the question is what are the coordinates of the midpoint Q well if you think about it for a minute you'll realize that Q is halfway between a and B in the x-direction and halfway between a and B in the Y direction and we can compute a point like that by simple averaging it is the x-coordinate of Q is going to be the average of the x-coordinates of a and B so that's going to be ax plus BX over 2 and the y-coordinate is going to be a y plus B Y over 2 so that's a very simple calculation I can abbreviate it make it look a little bit simpler by writing it writing Q is a plus B over 2 and what this means is take the average of X and the average of Y so these two expressions just mean the same thing now our string art construction requires more than just a pair of midpoints but we can create as many points as we want by computing midpoints of midpoints for instance here's just a pair of midpoints here and now I'm going to compute a midpoint on this sub segment and another midpoint on this sub segment similarly for these two sub segments so that gives me 3 points on each leg and I can create as many as I want just by continuing this midpoint of midpoint process next you'll have a chance to experiment with these ideas