Title of this video is Bone Structure 3. So this is the third and final example of bone structures I'm going to give in this lesson. In this one, we're using the simplest form of input. We're just going to input a point. From that point, we're going to derive a circle, and then we'll derive our geometry from that circle. Actually, let me change one thing, so let's change this radius to 10. That circle takes an origin point, and a radius value, and it returns a circle from that. To create this circle, I'm going to divide it, saving the points, divide it into eight segments. Let's show our points here. Since it's a closed form, so my first point and my last point are going to be the same. So that's going to have a couple of ramifications for how I'm creating my geometry and dealing with that point list, which is a little bit different than an open curve. Let's label those, uncomment that section. If I had eight segments in an open curve, I would have nine points beginning my counting, beginning at zero and ending at eight. If we run this, it's going to label everything, and this is my first point here, points 0. There's not another label created underneath it of points 8. Actually, what I get is an error message, index out of range. It's giving me that because there is no point 8 because the first and last would be the same. It's just given me one point which is points 0, which is the first. So I don't need this last line. That should not throw an error. So I'm no longer getting that error. What sort of geometry do I want to create with this? We can actually do quite a bit with circles. You can have circles derive other circles. I could have circles created from these points and then derive geometry from that. As with bone structures, you can do a lot with circles. I'm going to do something fairly simple and straightforward. Just for the sake of time, we could use that center input point as our starting point. Go to points 0, points 1, and then back to that point, so we could make these kind of flower petals. Another thing you could do would be to make a one-point curve from that. Then in the code, find the midpoints of that, and then save that, there's midpoints in their own list. Then use those to snap to also, which would create a tighter curve. There's a bunch of things you could do. I'm going to go with the first option because it's fairly straightforward. So I'm starting with that input point going to points 0, points 1, and then back to that input point. That's my pseudocode that I could write out. I'm starting in the middle, this input point, then go to points 0, points 1, and then back to the start to close the curve. I can take that line, copy it, keeping its parentheses, and drop it in here. Again, if I want to create a level 3 curve, I don't have to write anything because it's going to go to that by default. The next one goes from that middle point to points 1, points 2, then back to the middle point. That's what I've written out here. Could take this line, copy it, and then just paste this. Let's undo this and move around this. It's creating those first two petals. Again, you could start to recognize a pattern in this, it's going 01, and then 12, then 23, then 34, then 45, so on. To go around that circle, I almost really don't need to look at it because if I recognize that pattern. The only caveat to that is when I get to the end. I'm going to go all the way around here. Then when I get to the last one, points 7, I'm going to go the midpoint, points 7, and then there is no points 8. I have to go back to points 0. Because remember there is no points 8 because it's a closed curve, so I got to go to points 0. That's the only anomaly in this system is the last one as points. Points 7 goes to points 0. Let's uncomment that and run it. Now we could hide our labeling, uncommenting it out and hide our circle. We don't need to create these points. So we could turn those off here, and the divide curve, change our first true defaults because we don't need to see the points, although we're still returning the values. That still works fine. Now, one last thing I'm going to do with this is that we could give ourselves bunch of points and we could run this separately at each point. We could also maybe add start to look at how we might vary that for each point. What if we could vary the radius of the circle but do it within the code. There's another module called random. If I type in import random, and from this point on, I'm going to refer to it as rnd as I do with rhinoscriptsyntax being referred to as rs. This is another module, and I can use that module as a couple methods that we're going to use. This first one allows me to derive integer between two input values. If this wasn't here, and I just typed in rnd and then dot and then type in random. There's three methods here. l see there's random int, there's random, and there's random range. We'll look at random and random range some point later. This first one, random int, so it's r-a-n-d-i-n-t, and then hit the parenthesis. Then down here in the output, I'll see it has a little help on the method, and it's telling me randint self a, b it's a class method. Don't really need to know what that is. But it returns a random integer in a range, and what I do is give it two values, and it's also telling me including both end points. It wouldn't just be between those two values, but it also includes those values. If we give it a value of five and value of 15, it's going to generate a random selection between 5 and 15, including five and 15. I'm going to save that in a variable called radius, and if we want, we could also print that out to see what it does as it generates it. Then replace our 10 add circle function with the variable radius. Whatever value that outputs we'll use as our radius, and so that's going to be different every time because it randomly generate it. Now run this again. Each time I select the point it should generate a different radius circle which is going to generate a different scale of geometry. I didn't hit anything there that's why I got that error. We'll look at other uses of the random number generator and other codes that we'll do another lessons. That's bone structures and you have assignment to deal with that and have fun with it.