This video is titled Plane From Points. In the last video of the last lesson, we were faced with this conundrum where we're trying to create circles, which except a point and a radius as their arguments. We're using a midpoint and the matrix to create the circles but the circles are being created in the same plane as the C plane and we wanted to create them in the plane of the front faced and eventually the back face of the matrix. If I look at the help for AddCircle, we'll see you on the parameters that a circle excepts either a plane or a center. So since I've just been giving it a point, it's treating it as a center and it's just going to use the act of construction plane as its plane that it's creating it on. So that's why it creates the circles the way it does here. Which brings us to the subject of this lesson, which is planes and how to begin to work with them. Now, one of the easiest ways to create a plane, and probably the most common, I would say probably 90 percent of the time, you're going to be creating a plane, you're going to be doing it create using three points. The reason that is, is because anytime, anywhere you have three points in space here on the C plane and of course they're flat because they're on the C plane. But if I move one of these points up, it's still creates a planar surface. So a triangle in space is always going to be planar. It's why meshes are made of triangles as their base geometry. So let's take a closer look at this within the code that I created here plane from points. The function plane from points, which creates a plane from inputting three points, is very specific about the order that it takes those points and so the first point is going to be the origin of my plane. The next two points are going to be the x-axis and the y-axis. I've just set up an input to take those points in that way and then just to begin with, actually, if we comment these out, just to begin with, let's print out what a plane actually is in terms of its data. So run this, select this point as my origin first, I'm going to select this point as my x-axis and this point as my y-axis. It prints out a whole list of data. It's not putting it in parentheses or brackets, but I can still understand this as a list because each one of its components are separated by a comma. So I have an origin value, I've been x-axis value, y-axis value, and z-axis value. The other thing I'm going to look at too is nothing really happened within the scene. So one of the difficult things, at least at first you'll find working with planes in code is that you don't see them. Unlike when you work with a construction plane in rhinospace, moving it around and then I'm constructing things on that plane, so I can see it in space. Well, that doesn't happen in the code, you actually have to create something on that plane to actually be able to see the plane in space. So that's something to get used to. Let's take a closer look at this data that's being output here. The origin, this 13.5, 12, and 0. If I click on the origin point and type what, I'm going to see those same values. The x and the y are quite those points. Actually, they don't align to those points at all. So that is a higher decimal. It actually has a negative in it, the x-value. If I click on that point and type what, it's nowhere near those values. So what are those values in that plane representing? Well, let's find out exactly where one of these, this is a point value. So if I cut and paste that into my code and I just add a point at those values, I can see where it shows up. So let's do that. Run this again, select the point x-axis, y-axis. Let's look at our scene. So now I see that there's a point that's created all the way over here by my origin. If I draw a line from my origin to that point and then move that line over to my origin over here, I wouldn't see, and if I extended that line, kept extending it, it's going to run right through that point. So what the plane data is, is it's an origin point and then its two axes which are actually vectors. Now, you don't really need to understand what that is in order to use a plane. We're going to get into vectors in lesson 5. We're really not going to go over that now, but it's important to at least know something a little bit about that data, what that's producing. The other thing, interesting thing here is if I click on that line and I type length in, I'll find that that length is exactly one-inch. If we go back to our code, we'll see too that our z-axis is 0, 0, 1, so it's one unit, whatever units I'm working in in here in the z direction, and that's because I'm working flat on that plane, so my z vector is straight up and down from my origin. Again, we'll get into vectors more in the next lesson, but it's interesting introduction to those. Let's do something with our plane here. I can turn this off. Another, maybe useful thing here is I've just separated out at our parts of that list also to show that it is actually a list that it's outputting and that'll print out beneath this. Let's create something. You're going to find, in addition to circle, there are actually a lot of different types of geometry that require a plane. The circle doesn't necessarily require a plane, but something like a rectangle, an ellipse, an arc, some 3D geometry like a cone, cylinder, require a plane as their input. So if you want to create those types of forms, you'll need to know how to create a plane. Let's do the first one, AddRectangle, it accepts a plane and then it has a width value and what it's calling a height value, and run that, select the origin, x-axis, y-axis. It creates that rectangle, starting at the origin, and then its x-axis is the default axis that it goes to first. So this doesn't have to be a perfect 90 relationship to create that plane for that rectangle that looks like the first value is along my x-axis, that's four. Let's run that again. We'll move this point up for again x-axis, y. Now you see it's creating. So if you want to actually see your planes in space, creating something like a rectangle is actually a really handy thing to do. Let's run it a few more times. So here I'm going to create a circle using the plane origin, x, y. It uses as its center the origin point. Then lastly, let's do something, a three-dimensional, so a cylinder which takes a radius and height, x and y, and it also uses the origin as its center point. So that's again one of the primary ways you're going to create planes is to use three points. We'll look at another method in the next video.