Grasshopper 13 - Creating a Parametric Spiral Staircase

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys in this tutorial we're going to look at how to create a parametric staircase in grass up all right so we're gonna dive into a new document and we'll start with a line this year we're gonna try and build this to a roughly world scale so my line STL asks for a start point direction and the lengths my start point is just gonna be an XYZ point with no values and fine with being at the origin which is 0 0 0 my direction is going to be defined by AZ vector and my line I'm gonna give it a slider the maximum value 6000 and I'll set the value to 2400 or 2.4 meters alright next I'm gonna pipe that and I'm also gonna make a slider for my pipe radius gonna sit this 2,000 and then set my value to 400 now I'll plug that into my radius and give it flat caps next I'm going to look at creating my my steps and so the first thing we're gonna define is a range and plug PI into there and a multiple of Pi probably bump this up to something about ridiculous like 20 and we'll leave it as real numbers so this is gonna give us because we're working with the circle we're gonna be we're gonna need to be working with angry measurements and so we're gonna use this we're gonna use Radian values in order to define the length of our eyes okay so now we're going to create an arc probably this one so it asks for a base plane which will be the world XY the radius of the arc okay we're gonna make this function of the radius that we've already set for a pipe and what are we gonna do that is we're gonna make an addition between this and this that's gonna be a radius so what that insures is that anytime we increase our pipe radius the stairs or the stair width increases accordingly now my angle domain okay so in order to set the angle domain we need to or we need to construct a domain so this so these are gonna form part of our domain we're also okay we're also gonna check in slider over here and I'll give that a value of maybe 50 for now and I'll plug that in get 12 steps and so we're gonna use this to define our start and end angle domain and what we're gonna do is we want to i'll start by just plugging this in and we also need an elevation value or else it's just gonna build a hole or a fox at zero zero zero and so for the elevation we're going to use a series component and my count is going to be x plus one because we're plugging 12 in here and we're getting thirteen values out and my step size is going to be let's have a look it should be let's try 2400 over 12 and then plug that in whoops sorry that needs to go into a point so this is our Z elevation and there we go alright you might you may or may not notice a slight problem here but I'll point it out later and we'll find a way to adjust it okay just tidying up a little okay so now we've got all these arcs and they're only defining the beginning point of our angle domain so everything is going from whatever this value is to two pi so what we want to do is we want to add an offset so basically what I'm gonna do I'll do it first and then I'll explain it so we're going to divide our total angle by the number of divisions and then we're gonna add that onto here and then we're gonna construct a domain between this first list and the second list and so what this does is it basically ensures that our arcs will start and end in line with the next step we can add a slight modification to this by multiplying this value by another slider which will sit between zero and two so this way at one slight are our steps will be exactly in line with each other at two they'll be exactly in line with the next one or we could set it to somewhere less than one if we wanted it to have no overlap okay so there we go there's our axe now we also want to do is we need to have a way to connect this end part of the step to this pipe in the middle and so what we can do is we can plug multiple radius values in here so we're going to plug the first one in that corresponds to our pipe and we're also gonna plug in this modified one and then we just need to graph those values and so that'll give us a curve on the pipe as well as one out here and then we can simply just loft between those but not so simply as you'll notice our data structure our data structure does not quite match up what we first because if we were to love these it will loft right between all of these codes in Roch is not what we want we want to flip the matrix so that it'll turn these two lists with 13 values into 13 lists with two values those two values being the start and the end curve and we love those we get our step now if we were to take these and extrude these by some amount which I will define with the slider maybe I'll set that to a maximum of 400 and then I'll plug that in you're gonna notice that our step is gonna go a little bit above output which is not ideally what we want so what we're gonna do is where we sit the series over here we said divide the maximum value by the number of steps so we're just going to change our maximum value to be related to the size of the step and then we're gonna replace that in our division and there we go that was the problem that I talked about earlier good well done if you spotted it and so now anytime we adjust this our steps not go above the pipe above the top of the pipe which is what we want and so that's basically the entire definition sussed we now we can now change the percentage of step lengths that we want to cover what I could do is I could also just edit snapping instead of value to one if I wanted to be able to consistently mark that off just while I'm hovering back and forth maybe I'll set it to yeah I'll just set it to one two now I'm also going to turn these off because these aren't doing anything anymore I might want to increase my outer radius I might want to yes okay so if you're wondering why I plugged in 0 to PI this is so that we can get one full revolution of the video what do we call it but the steps so it'll start and end in the exact same place that's kind of the nice thing about working with hole are with hole multiples of 2/pi see if we bump this up a little bit miss stuff to get something a little bit weird but I mean to be honest if that's what you want to do that's totally cool this is just a sort of OCD thing that I do so at 4 we're still getting that nice line up but we could just as easily bump that up we can also change the amount of steps that we want we could change the height of our steps we could add a whole lot more maybe reduce that angle down for getting these nice really elegant steps and maybe we'll give them tiny bit of overlap and yeah that's about it that's a really simple definition for spiral staircase go ahead and have fun with it
Info
Channel: Daniel Christev
Views: 19,076
Rating: 4.9153438 out of 5
Keywords: grasshopper, staircase, parametric, tutorial, yt:quality=high, spiral
Id: DywY0NnyyaU
Channel Id: undefined
Length: 11min 22sec (682 seconds)
Published: Wed Jan 27 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.