The title of this video is 2D surfaces example two. So in this video, we're going to take a pattern from our 2D patterning exercise. We're going to see how we can make that three-dimensional on a surface, NURBS surface, although we're sort of keeping it in 2D flatness. So we're not truly working with three-dimensionality, yet until we get to the next set of lessons. We have a problem with this. We'll make the curves first. But if we want to make this space between this inner circle and these outer curves, a surface it poses a little bit of a problem since we can't, they're not planar, so we can't do a planar surf and we can't loft between them. So we're going to have to think about how we're going to do that. So the first problem is, how do we create these curves? We're going to use the same, let me explore these join them together. We're going to use the centroid, and we're going to use our corner points. So we're going to find the centroid by using a midpoint function between two opposing points, and we can find that centroid point. So let's take a look at the code. So we're using the same surface points code to evaluate the surface, to find the points, save them in a dictionary structure, and then we're looping through that. So we use those opposing points to find the midpoint from a midpoint function that we've put in here, and we find the centroid. Then we're going to find each curve using that centroid and then using the corner points that I just simply go around and do that for each curve. One thing to point out here is that within the loop itself, I'm creating a list called curves, and I'm saving those four curves in that list. The reason I do that is I need to, I want to join those curves together. This is a function we haven't seen yet. Join curves takes two arguments. One is a list of curves. So I don't need to put this in parentheses because I've already created a list. I'm giving it a list. It's asking me whether or not I want to delete the original curves. So I'm saying true because I just want that joined, that singular join curve, and I'm going to put that in a variable called outer curve. So I guess the thing to point out is that each time through, since this curves establishing this list within the loop, every time through the loop, it's going to clear whatever's in that list because it re-establishes it as an empty list. So you only need to use that just through here. Up until this point, I only use it once within the loop. So let's comment that out. So we're going to show the midpoint and then I'm going to show these curves when I run through this. Okay so select a surface interval eight in a u, eight in a v. So it's creating those curves looks good on that surface using that midpoint and now next I want to create that inner curve. So I'm going to do that just using these four points. I'm going to want to do it in a counterclockwise fashion. So it's going to create that and then I'm going to scale that based on that centroid point. So scale it down to that size and I think I used 40 percent, so 0.4. So we'll do that in the code. So this first part, I'm creating the inner curve and then scaling it. So now we want to think about how we're going to create this as a surface between these two curves. So I've already joined this outer curve together, and I have the inner curve as a whole curve. So what I want to do is find a point that I can draw a profile line between. So it could either be the midpoint of this curve or the start or end point, which is here. Now that starter endpoint and the midpoint is going to, because of the way that I drew this curve that I was using, these four points, it should align with one of the corner points. I don't know which one yet within the way that this generates it. Yeah, it looks like so start, it's telling me end there, but start end they are coincident. So we draw a line to that because what I want to do is I want to create a profile. Let's say if I was using the midpoint here, let's use the start end, and I draw to that point and then I could use sweep2 rail and select the outer and the inner, oops. Let's join those. Sweep2, select the outer and the inner, and then select that profile as a cross-section and then it's going to create, and it actually creates because these curves are going to a point, it's going to create a poly surface so I explode this. You can see that that's going to be made up of four surfaces. But sweep and the code will do that automatically. If it needs to create a poly surface, it'll just do it. First thing I want to do is find out where my start. I'm going to use the start point. So I'm going to find out where it is within this. So let's undo this and unhide that. I'm going to find the start point and I'm going to add it. So run that. So my start point is here, so I'm going to want to draw a profile line from that point to this corner point here, which is my i, j minus 1. That's what I've done in this line. So I'm drawing that profile line from the start point to i, j minus 1. Let's run that. So it's now drawing the profile. Now I can do my sweep. In order to do that, I have to again because sweep2 is looking for lists so now I have to put the inner and outer curve in a list called rails and then convert my profile to a list by setting it equal to itself in brackets. Then let's see how that works. So now it's creating the poly surfaces which follows that curvature. Now the thing to remember about the system is you could apply it to any surface. So I can have a very irregular shaped, this is a loft I created between separate profiles. We can run that on that and I might change the number of intervals. Well, let's run it first. Of course, the spacing's going to change, or the scale of the piece is going to change depending on the dimension that's going around, how much circumference I have to the loft is going to change the part dimension. I'll run this one more time and we can do a much finer interval. I'm going to turn our enable redraw. The other thing I can do is I can also, in the loop, mess with the position of the u and the v, the parameters by randomizing, adding a random factor. You want to be careful with this. If it gets too high, you can really mess up the order of your matrix C. So you can experiment with that, it's not going to hurt anything. Let's run this, select the surface, and let's go with like 12 and 20. So it's going to take a bit to calculate that. So it gives a much finer detail and also you can see some of the randomization juggling within the matrix, but it's still creating good geometry.