This video is titled, pulled point function. So another useful function, custom function is something called a pulled point function. Which is a derivation of the midpoint function. It works pretty much the same although there is an added value to the points. So when I input the points in the main down here. I'm also inputting a value for each point. The default is 10. So it's equal for both points. And still calling the function here. And we'll load the return point in a variable called new point. When I call the function pull point loading in the points and their associated values. So this is brought up into the function again point is cleared. And then there's a little bit more elaborate calculation. Now you don't have to exactly understand how this calculation works, although you could take it apart to figure it out. It is, of course pulling our X's or y's and Z's apart. And then putting them back together. But I'm using these values as both a multiplier and divider in the equation. And we'll see what that do that does. So, I'm returning the point that comes from that equation. And then I'm rendering that in the scene. So the first time through, we run this. So we have two points along the X-axis. And I'm going to command line saying, select point 1, click on that, select point 2, click on that, input pull value for point 1, 10 default. I'm just going to hit Enter. Input pull value for point 2, 10, I'll hit Enter, okay? So with the pull values equal, I create a midpoint. So they kind of cancel each other out. Now let's try changing one. So run this again. Select point 1, select point 2, input pull value for point 1. So, let me reduce that by half. I'll make it 5. And then let's leave the input pull value for point 2 as 10. We'll see what happens to that point. So now this point, because the value for point 2 is higher, twice as much than the value for point 1. That point is pulled towards that point 2, the point with a higher value. So let's try it again. Run that. So, select point 1, select point 2. Let's make it even less. So value for point 1 let's make it 2. And we'll keep the input value for point 2 at 10. Okay, so it's pulled it even closer. Run it one more time. And I want to point out that these inputs don't have to be integers. And you can see my input here is it GetReal, it's not a GetInteger. So it's going to take a real number. So they could be decimal numbers. So this could be a much finer pull value. So let's reduce it even more. So, select point 1, point 2, input pull value for point 1. Let's do it at like point 2. And then leave the input value for point 2 at 10, okay? Now it's getting very close. But not touching point 2. One more time. Let's do. So we got point 1, point 2. So let's set the input value for point 1 at zero. And then leave the input value for point 2 at 10, okay? So I don't see a point. But if I click on top of point 2, there's a point exactly on top of it. So if the value for input value pull value for point 1 is zero, then I'm going to create a point right on top of point 2. One more thing if I select point 1, select point 2, if I give a negative value for point 1. So, let's do a negative 2, keeping point 2 at 10 It's going to create a point on the other side outside of those two. So it's an incredibly flexible tool. And again, this is going to work anywhere with these points anywhere in space. They don't have to be on an axis or anything that could be anywhere within space. And as a, It's quick example of how this works. And to comment that out. And let's uncomment I created a little loop down here. And it's just going through a range. So using an i and a counter up to 10. And what I'm doing is I'm just taking the input value here 10 for point 2. And then I'm using the i counter to change the input value for the value 1, for point 1. So I just sort of automated it. And then it's going to render that point out in space. So let's run that. So, point 1, point 2. I can just hit Enter twice. Now it's showing me the range of points from lowest to highest. And if we want, we can output what those values are to see it in space. So if we do a TextDot to our new points that are created, we can see what that i value is for point 1. So, let's just turn that on. So adding a TextDot to the new point that's created. And then labeling it with the i value in the loop, which is the value that I'm giving to point 1 here. Right, so showing me first time through i is zero value for 1 as zero. So that point is right on top of point 2. And then as it increases, gets closer and closer to 10, if you remember if it's 10. If they're equal, I'm going to get a midpoint. So you can see it's a kind of exponential system, the difference, the range in changing dimension between them. So, this is a very, very interesting tool to use. And something like an iterative structure, where I can use it counters to change values. And allows me, it gives me a big range. Sort of changing geometry and that structure. And we'll take a look at that example in the next video. How I could apply it to creating geometry in a matrix.