This is a video that's entitled What's the Point demo. So if variables are the building block of Python code, points are the building blocks of geometry and of Rhino script code. There's pretty much everything we do in creating geometry will, on some level, involve points. So it's really important to understand what constitutes them and how we use them, how we give them to certain functions, how we output them, see them. All these things are really important to creating geometry using Rhino script and Python. So if I just create a point in the scene and select it and type in what in the command line, I'll get some information about that point. So that point is carrying with it an ID and it's also carrying with it its coordinate values. So a point is essentially a location in x, y, z space and that's what's represented by these three values x, y, and z. It's laying flat on the c plane. So z is 0 value and it's this fundamental difference, I would say, between the point being an object that exists in space having an ID and an object and a thing that is just values. So that difference between those two things can lead to some confusion when using points in code because I don't always need a point as an ID, I don't need it as an object that exists. For most things, I just need it as a series of values. And also when it exists as a series of values in code, I don't necessarily see it within Rhino space. I have to, let's say, render it out in order to see it using those values. So it's this difference that I'm going to talk about a little bit and how we deal with it with some of the fundamental tools that we use in the code. So if we have a line of code that's importing that point as an object and then printing out what that variable's holding, when I select that point, We'll see that it understand that point as an ID. Now, I can use a tool called PointCoordinates. So I can use this function. And actually, if we just copy this line, and here's a handy little shortcut I can show you. If you just put your cursor on the end of a line and you hit Ctrl+C, and then return and then Ctrl+V for paste, it'll paste that entire line. So I don't have to select that entire line in order to cut and paste it. So I'm going to put that line up here. I'm just going to change this to point coordinate and we're going to take point ID, PtGUID and we're going to, Run this function called PointCoordinates on that input ID and then we're going to print out, What that variable is holding. Okay, so we'll first print out the ID and then we're going to extrapolate from that ID using the function PointCoordinates to find out what the coordinates are. So I can extrapolate from that ID my point coordinates using this function PointCoordinates. So we'll often have to do that. If you get an error that some function is looking for point values and you're giving it an ID and it's breaking, it's not working, you'll sometimes have to translate or extrapolate from that ID the coordinates I'm going to comment that out. Let's look at, so let's input 2 points. Before we do that, let's also look, there's another method I can use here, To input a point, so I don't have to use GetObject when I'm inputting a point. I could use a function called GetPoint. If I use a function called GetPoint, It simply sees that point as a series of values. So it doesn't carry the ID with it. So that's another option for imputing points. Now, let's go back up to the top. I'll comment these two lines out, And I'm going to change these two lines. We'll input two points. So uncomment those, And let's just change this variable. So I'm inputting those two points and let's use those two points to create a line. So I need a second point. So run the select a point, select another point, and it creates a line between those two points. And it didn't have this function AddLine, does not have a problem with points when they're ID values. If I look at that function closely, which we did in the last lesson, the last video, We went in here and searched out AddLine. Okay, under parameters, it tells me that it can both accept a point as values or an ID. So if we see this within a function, within the help menu of a function, we'll understand that it will accept either of those. We can also do an AddLine, we can treat a point within the code as we don't need to deal with it as an ID. So if I run this, so this is creating a point or point value at 0, 2, 0. So 2 in the y value, so it should be on the y axes. So I'll run that, Still selecting those two points, but I'll notice it's not creating a point there. So this point exists within the code just as a series of values. So another example of that is if I do another AddLine, sort of using those values directly, hard code it into this function, this should create a new line within the scene between these two points. And so you'll notice again that I'm seeing those points for this first line because they existed within the scene. And I input those two points and use those to construct this line between those two points. So I still see those two points because they existed within the scene. With this line, I hard coded the start and the end point of that line. I don't see those start and end points as aligned as points that are rendered in the scene, but they still work within the code as points. Now, In working in code, you'll often want to see a point rendered out within the scene. because I need to see it in space for a number of different reasons to see what sort of geometry that I'm creating with those points. If I want to do that, if I want to render a point value out in the scene, and essentially making it an ID, which I could also demonstrate, I need to use a function called AddPoint. And so I'm just going to, Turn these off, so we don't have to go through these. So I'm going to comment those lines out. Okay, so we're just establishing the point value here. We're going to render that value out using the function AddPoint. Actually, let me delete these lines first. So it did create that point there. Let's do it one more time. So I run it again. And now, it's rendered that point sort of out in the scene. I can also use that point value, Instead of hard coding those values into my function. I could also use this variable, which is holding those values within that function. So it's creating that line and it's also rendering that point out. We're going to, at some point, talk about another function called PointAdd, which actually adds two point values together. It's significant to when we look at vectors, which are essentially points in space, special points in space with magnitude. So don't confuse these two. AddPoint is when we're rendering something out. PointAdd is when we're adding two points together. And if you look these up within the dictionary, you'll understand the difference between those two. So let's comment these out, And we'll look at one more section of code here, which I'll uncomment. And so here's a situation in which you might need to extrapolate from the point as an ID into a value. So, We're going to look at some of these functions in the next lesson, MoveObject, CopyObject. There are number of different functions, which you use something called a translation, which is a simple equation essentially calculated between two points, an end point and a start point. So if I just use these two as input points and, let's say, we have a rectangle around one of them. And I want to move that rectangle over the distance between these two points using this first point as my start point and this point as my end point. So those are the three things I'm going to input. I get my curve, I get my startPt, and I get my endPt. And then I'm going to calculate a translation, and then I feed the crvID into that function MoveObject, and I feed the translation value between my endpoint and my start point. So you run that select curve to move, it's asking within the command line, I select the rectangle, I'll select star point, select that point and select endpoint, that point. So now, I'm getting an error and it's saying, the message is unsupported operand types for Guid and Guid. So I am giving and showing me the trace back as line 28. So that's where my translation calculation is. So what this is telling me is that I'm giving it the incorrect type of data to perform that equation. And so this is a very common situation that we'll face in the curve particularly in the next series of lessons. And so I could do one of two things. I could either use my GetPoint, which is going to input my points as just values or I could extrapolate from these what my start point and end point values are using my PointCoordinates function. So let's do the second. And so I'll copy this line, And we'll paste it in here before translation function because I have to do that. We'll need to do it twice, one time for each point. And then I just need to change my variables here. So what I'm going to do is find the point coordinates for start point and then I'm going to overwrite that variable start point with those point coordinates. And I'll do the same thing for end point. And then what we also might want to do is print out. We could say print, Start point, end point. Remember, I don't need to use parentheses for print in this version of Python, and then we could print those out. Let's copy that whole line. Just print those out after I do this and overwrite them, okay? And then we'll do the translation with those and then my MoveObject. So let's run this again. So I select the rectangle, select the start points like the end point and it works. So it's moved that rectangle between those two points. It's printed out the IDs in that first line here and then it's printed out the two values, which are now overwritten. If I wanted to save these separately, if I wanted to keep those IDs for some reason in those variables, then I would have given these different names and then changed it in the code down here to those different names. Again, there's nothing within the name of these, the name translation has nothing to do with its functionality, right? This could be, Idontknow. I just have to write it the same exact way again. Although, that's going to tell me little about what it's doing. You could also play around in this and see what happens. What if I select this as my start point and this is my end point? Then my rectangle is going to move the other way. We're going to look at transformations, get into them a lot deeper in the next section of the lesson. But it's really important to understand these fundamentals about points and extrapolating values and the relationship between point as an ID and point as a value to understand what we're going to be doing in those lessons. And ultimately, the first assignment.