This is a video titled finding points from lines. What I've done is set up a code which takes a number of data inputs, and I want to just go through this first before I talk about how we can find points from input curves. I just want to point out a few things. This is my scene in Rhino space. I have a couple of closed shapes; one-degree curve, three-degree closed curve, three-degree curve. I have a straight segment line and two points. If we go back to the code, it can point out a couple of things. So in these first three, in my message, I'm asking for a curve, a line, and then a shape, and saving these in different variables. But if you notice, over the filter, they're all called curve. So even though I'm calling these different things in, and they are different types of objects in Rhino space, when I bring them into Python, it sees them all as a curve and curves at different degrees. Although we can understand that a curve may be something that has more than two points. So a line, just in terms of terminology, a line is a straight line between two points, and a curve could be a polyline, so it could be a series of straight segments, but it tends to be more than one straight segment. Then there are some tools we're going to find that do make distinctions between whether or not a shape is closed or open. For example, if I wanted to find the centroid of an area of a shape, it would have to be closed for me to do that. So I just wanted to make that terminology clear because we do tend to call these things different things, but they are input exactly the same way, so they use the same exact filter. Then we already looked at two different ways to input a point, one using the GetObject, which brings it in as an ID, and another one that brings it in as a coordinate. I may need to convert that ID into point coordinates, so I could do that using the PointCoordinates function. Then here I'm just printing out the data. This first part, this string part of the printout, has nothing to do with the functionality of what's printing it out. I'm just labeling everything so it makes it clear. So if we run this, select a curve, select a line, select one of the shapes, select one point, then the next point, and then it's printing out all of that data. We've gone over inputs a bit in these first couple of lessons and this should all start to make some sense. Now the question is, what can we do with some of this input data? So I set up another code here, and one of the first things that we can do is, from any of the curve input data, we can find points from that. Initially, this isn't the only points that we can find from curves, but this is a good place to start. We can find a start point and an end point of a curve. When I draw a curve in Rhino, if I click on it and I type in Dir up in the command line, and hit "Enter", it's going to show me the direction of the curve. So every curve has a direction to it whether or not it's an open curve or a closed curve. The direction that I drew it in, it can be flipped. Here we can lookup in the command line and it does give me an option when I type in Dir that I could flip the direction of that curve. Why that's significant is that, my direction also means my curve has a starting point and an end point. So when I'm finding in the code using the function called CurveStartPoint, I'm finding the start point of that curve. Let me turn off the bottom part of this code for a second so I don't run that. Shift Control C, comment that out. I'm just doing this for the first one curve, curveID. I'm going to find the curve startpoint, the midpoint, and the endpoint of that curve, and then I'm going to save it in these variables, and then I'm going to print that data out. We can turn these off also because I'm not going to do those yet. I'll run this, select a curve, that one, it's showing me what those variables are holding, so that each one of those variables is holding a point coordinate value. So an XYZ value. It's saving that in those variables. I don't see those points. Remember from the point lesson that there's a difference between to the rendering a point out and that point being a set of values within the code. Now, if I wanted to see them, I would have to render them out. So let's do that. Shift Control U for uncommenting that section. Actually, let's do this first. I'll explain that after. So I'm taking those coordinate values and then I'm using the function AddPoint to render those points out in Rhino space. So we'll see what that does. Now I have three points. I have a start point, midpoint, and an endpoint. Now, the thing to remember also is that these are, even though they were derived from this curve, they are separate entities. Those are separate objects. They're not tied in any way to the curve. That's going to work for this curve ID, we could replace, turn this off, turn our line back on, replace that, and here we have a space. Run it with the line ID. Of course, that doesn't really matter because I could select, even though I'm saying line, I could still select that curve, it's going to run the same. We can even do that. I could select that curve just because it says line, it's still inputting a curve and doing that. So I don't really need these different input names, I just write it out like that to let myself know, or if somebody else is using the code, to make it understandable what that's holding. But yeah, we could run it on this straight line. It's going to create three points, and then I can even run it on a closed shape. Let's just run that. Select any one of these. Of course, I'm only seeing two points because if my shape is closed, my start point and my endpoint reside in the same position, but I do create two points. I can see from the selection menu there's two points right on top of each other there. This is my midpoint, so that's one point. Then the last thing I do down at the bottom here, the point I'm trying to make is I could set that rendering of that point, AddPoint that's returning, not only does it create a point in the scene, but it also returns an ID value in the code. So if I wanted to do something with that or if I later wanted to delete that in the scene, I could use function DeleteObject and erase that geometry in the scene. But this is showing, a line 23 is showing, we'll print out that ID of that point. I run this one more time. Here it's printing out the ID of the endpoint. Then it created two points there, the start and the end of that closed shape, and then the midpoint there. In the next video, we're going to start to talk about transformation. See how we can input our curves, and finding points from them, but also using input points to do things like rotation, scaling, moving, copying, and this will lead to our first assignment.