Grasshopper - Creating Tensile Structures With Kangaroo

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys in this tutorial we're going to take a look at tensile structures we're going to sort of look at something similar to the friar Otto German pavilion um just to show you this is the simulation that we're going to be running in kangaroo plugin for grasshopper which is going to create a mesh in tension all right cool so that's uh that's the end result we're going to go ahead and recreate it now so I'm going to start by building that sort of spiral shape that we had and I use this method every now and again we're going to start with two expressions to form a parametric equation and the equation is going to be a times T times sine of T and the other equation is going to be a times T times cosine of T so if you if you take sine of T and cosine of T for a defined range between zero to 2pi what you will get is a circle I've explained that in previous tutorials but if we if we have our T over here as well as outside the the call to the sine function or you can do is you can create an incremental sort of increase which is how we get the spiral sort of shape so that's what I'm going to do now I'm going to create a range and I'm going to make it a multiplier of Pi for my domain and I'm going to plug in a slider which is going to have a maximum value of six which would give me three full rotations because that's three times two pi but for the moment I'm good with this one so I'm going to plug that into my actually haven't relabeled these yet so this is going to be T and this is going to be a and same thing here this is T and I'm going to add a up here cool so now I'm also going to throw down some sliders I'll actually just one more slider with the maximum value of 100 for my for my amplitude and actually we do need one more slider which is going to be an integer slider and this one is going to control our number of divisions all right so now we need to put down a construct point node and this is our X component and this is our Y component as you can see as we increase this we're getting more and more like a greater sort of portion of a spiral so what I'm going to do now is I'm going to put an interpolate curve through here which is going to give me um an interpolated curve through these points and then what I'm also going to do is I'm going to take a curve closest point there we go curve closest point and what I want to find is the parameter whoops I want to find the parameter at which each of these points exists on this curve so that I can get if i do a evaluate curve what i can get is a parameter over here which will correspond with these points and this gives me a tangent vector actually instead of doing a curve evaluate i might just see how my perpendicular frame works sometimes this can be just about what we need that's what I'm looking for here is that all my or all my X directions are lining up and you can see we do have an issue here where this one is facing the wrong way so I don't like that that's not going to work for me so I'm going to see if my curve evaluate does any better than that so um this tangent vector is not quite what we want because the tangent is basically all a tangent would form a line going straight across like this at this point because the tangent is sort of how do you explain that tangent a tangent is the direction in which that curve is heading at that specific moment whereas what we want is the normal vector the vector pointing directly straight outwards so all we need to do is we need to rotate that vector so I'm going to take my vector here and I'm going to rotate it along the z axis and I just need an angle I'm not going to plug in a slider for this because this is going to be fixed it's going to be 0.5 times pi which is 1/4 of a rotation and now I'm going to create a linear array of this collection of points along this direction and there we go that's what I wanted this is giving me um where this is this is really good so now I've got sort of the uniform distance offset along each of these curves with a whole lot of points so now I can increase okay so my direction on my distance between these points is a little bit small so what I will do is I will throw down a multiplier here um thing to note if I hadn't explained this before is vector amplitude and multiplication do the exact same thing does not matter which one you use um and for whatever reason I prefer to use a multiplication I don't know maybe it feels like makes me feel like I know grass up a bit better but you can see if I plug this in here I do the same with this it'll do the exact same thing and that's because this tangent vector that I've extracted um is a unit vector meaning that it has the vector has a vector length value of one units whereas this so this amplitude here if I would take this vector length whoops can't spell properly if I would take this vector length and pull out a panel you can see that it's always going to equal three point eight seven seven um whereas let's say if I were to take this vector here and then multiply it again and then put it though and then put it through my vector length it's going to be three point eight seven seven squared so yeah that that's why this multiplication works and you know as long as you're using unit vectors they're exactly the same thing so I'm going to stick with my multiplication all right so that was a little bit of a tangent but now we're now I good to continue so we've got the base points for our um for the configuration of our mesh so I'm gonna now use a mesh from points component and oops not that mesh from points so I'm going to plug this in here um the mesh from points component if you do not have it I say this every single time I use the component because I always get questions about this the measuring points component is a it's a plug-in called mesh edit or it's called buteau oh you can find it on the food for Rhino website I'll probably put a link to it in the description as well get it it is super useful cool so in order to create this mesh from points we need to flatten this input and we need a number of U and V divisions so our u divisions I believe they're going to be this number here plus one and I'm just going to change this to you and then I'll drag it over here and plug it in and now my V divisions are going to be the number of elements in the linear array over here so I'm going to create a slightest that I have control over this and I'll make it an integer slider with a maximum value of 20 plug that in and I do not need to do V plus 1 for this direction cool so there's our mesh we can preview this off and I can just increase that a touch so I'm happy with that that's that the stage apart from one thing I do feel like I want a bit of elevation in my Z direction so that this is not just a completely plain our mesh at the moment and that will change my my tangent not my tangent vector a little bit but I'll probably still be alright with it so we're going to put a multiplication down and we're going to multiply this range of value coming out probably with maximum value of 100 and we'll plug that into my C and yeah something like that works for me so you can see this this point stays fixed here but this one moves up a little bit and you know what I'm not too bothered by that so I'm going to keep it like that all right so now now we can get into the kangaroo side of things once we built this mesh so like I talked about in my previous tutorial anytime using kangaroo you need to put down the kangaroo solver which you access from kangaroo here kangaroo physics and so our mesh goes into geometry and now we need to start setting up the rest of it so our four subjects is the first thing I like to set up and so for this we're going to use Springs from line and so the springs from line asks for a connection I'm going to get my weaverbird mesh edges I'm going to plug that in and so the connection is just a line between two points so now that's gone if that's turned from orange to white indicating that that is now working properly so we can now plug that into our for subject I'm also going to insert a unary force and the points for my unary Forks are going to come from my mesh from points I'm going to deconstruct the mesh and that will give me my collection of vertices and then I just need to plug in a force which is a vector in any given direction um we're going to be using gravity so I am more than happy to keep that as a Z vector and I'm going to give this a maximum value of 100 and a minimum value of negative 100 um this is just a personal preference thing I always like my gravity value when it's going downwards to be positive um you don't need to do that you can just have like if you just plate negative 100 and that would be your like your direction of gravity but personal preference as I said all right so now our unary force can also go into the springs or it and into the four subjects with the springs and now we can we can begin to test the simulation we've got four subjects in geometry so we can see what happens you can use either a button or a boolean toggle I prefer use a button and you're going to notice that it throws an error and that's because key thing that I really want to reiterate with these tutorials is your force objects have to be flattened it's just a convention of how grass uple of how kangaroo for grasshopper works all right so now when we press the button it will reset our simulation and we're good to go I also need a timer and this is going to make sure that my simulation continues to update so I'm going to set the interval to 20 milliseconds and you can see we are getting a very strange result I might just set this back to 0 for now and reset the simulation so we can kinda see what's going on umm so the issue that we're having is that well our our Springs have a rest length of 0 meaning that they're trying to tend to absolute 10 sylheti blue that's right word yeah so what we need is we need a curve length value over here so I'm going to take this curve length and if I were to plug this into my rest length well immediately that's gonna do something quite strange but if I reset the Sun and let it go again you can see nothing's happening because now they're at a rest length of what their length already is so then now I can take this rest length and I can multiply it by a slider so I'm gonna mountain yes multiplied by a slider so I'll set it to 1 plug it in and just quickly realign everything and now as soon as I change this we should see our mesh begin to shrink at zero starts do the same thing that it was doing before and if we put it back up to one get a it implodes on itself which is not ideal but that's kind of what's going to happen all right so now for this next part of the simulation I'm going to show you two ways how to do it I'm going to show you how you can do it just in writer and then I'm going to show you how you could do it so that it remains completely parametric alright so we're going to do is we're going to extract the points from this deconstruct mesh component and I'm going to bake them out and so then when I preview them off and preview this off let me also just grab a mesh output for this geometry out on this side and preview this off um it is going to give us a collection of points for all these off of this mesh so we can do is we can plug in some anchor points so I'll just make a copy of this point note here and I'm going to start tell it which points I want to be fixed so maybe I'll select around these points here oh wait I don't quite like how I did that I'll select this one this one this one here here just making a selection at the moment be pretty rough with it yeah yeah and cool so those are going to be our anchor points I'm also going to set a few anchor points for my middles and they set this one this one this one this one this one this one this one you and you all right so now I can plug these into my bank points and if we were to now take down our rest length you can see we start to get a bit of tension in the mesh anywhere that we've got an anchor point it's going to hold so what we could do with this as well is we could start to pick some of these points that we had for our anchors this one and this one and when we move them up our mesh is going to react accordingly which is a really cool thing which is a really cool thing that the kangaroo does and now I might just add a bit more gravity into this that we're getting a bit more sort of realistic behavior from the simulation and yeah we can once again move these around we could move around some of these edge ones to notice these all these ones that I've selected that aren't part of simulation aren't going to affect it at all but yet we can interactively come in and mess around these now that's all well and good but the reason I have a problem with this is because as soon as we reset this simulation um all these points that we have here have all they've um should we say they've sort of lost their their stickiness to the mesh they're their mesh index if you will so they even though we're referencing them em as anchor points and they were in that original location they no longer have any influence of the mesh you can see as well the ones that we moved on this side they aren't doing thing anymore so I mean you could sort of bring your mesh points back to where they were then start simulation again and you'll have all that feedback back but you know I prefer not to do that I'm going to show you how we can sort of extract that information to build it build it into the grasshopper definition so that this doesn't happen I'm going to remove all these points and our mesh is going to start to do something funky again so I'm going to delete this and I'm going to pause the simulation and what I'm gonna do is I'm gonna I'm going to preview all this stuff off that I don't need and I'm just going to move this ball forward so that we've got a bit of space to work with so now I'm going to firstly I'm going to take my naked boundary of this mesh and that's going to give me a curve right around the perimeter and then I'm going to explode it and what we're going to do is we're going to take these points and we're going to run them through a cull pattern and so my pattern is going to be true false false false so that's multi-line data and we should now get a result we'll also need to turn off this first list of points over here somewhere all right so there we go so these are all these would all now be our new anchors um key thing to note with this sort of approach is that um like sometimes you might not get these corner ones in Nets that's sort of something you just need to balance between the like the the length of this list here corresponding with your number of steps so that needs to be in sort of an equal multiplier so 42 42 steps means I'm going to get 43 points so what I actually need is this to be maybe 44 now okay it looks like we might be a little bit off with our our divisions along this axis as well so let me just correct that too hey you can see when I get to 13 it um we'll get a point will we get these two corner points which is where our mesh starts from and then if we were to go back here and adjust this there we go now we're getting all those corner pieces in all right so now the next thing I'm going to do is I want to pull out sort of a ring of faces on the inside so what I'm going to do is I'm going to do any mesh explode I'm going to explode this mesh from points over here which is going to give me all my individual faces and then I'm going to do a partition list and my size of my partitions I'm not sure which collection I want at the moment I'm gonna try this one here my the partitions and then we can just test whether that's working or not with a list item I know no it's not quite we'll try our V and no still not quite okay looks like we're close here but we might need to do pardon me let's try X minus one there we go so oh yes of course so we'll have if we have from our linear array if we have 13 points that's going to result in 12 mesh faces so yeah that makes sense shoulda thought of that so now we have our list item and I'm also going to parametrically extract the sort of central um face loop the way I'm going to do that is by creating another expression and this expression is going to be the four of x over two so we take so this is taking the UM all the sort of limit of the amount of points we have and then dividing that by two and finding the um or rounding it to its lowest integer and let me just remove these pardon me and then I'll plug that into my list item and you can see we get that middle row faces so now I'm going to flatten this and I'm going to use a weaverbird join weaverbird is another custom grasshopper component I don't as far as I'm aware the last time I downloaded weaverbird you do not get it from food foreigner you get it from the reiner website I think I'm not entirely sure but I'll post a link otherwise you can just google we're good and you should be able to find a link pretty easily anyway slight tangent there so now we've got our ring of faces on the inside what I'm going to do is I'm going to take the naked boundary of that again and can't quite tell what it's giving me at the moment so I'll just preview all this off and there we go so that's that is what we want you know I'll just kick this preview off while I'm doing this um and so we're almost there all I want to do is I want to extract I want to extract sort of one line well like oh yes one one edge loop not one face loop so I'm going to explode this polyline and I'm going to take a list item and this list item is going to be um let's see I think it will be based on a series of um this count here you plus one yep so there we go there's our I mean it has given us one uh one point that we don't want so we could probably just insert a time little expression here to fix this just put the slider down here and so it's either going to be negative one positive one okay there we go so that's that's fixed it now we now have any collection points which correspond to our developer the center point patently at the middle of our mesh so now I can preview this off and I can use another culling pattern because obviously we don't want all these edges and I'm just pulling that out in case I wanted to have a different coloring pattern for that but now we've got our our our collections of points that we're going to plug into our anchor points so it looks like I don't need as much space as I thought I did um I'm going to no wait I'm going to plug these points into my anchor points here straight away because those ones I do not want to move and these ones I'm going to put through a move component and so this move component needs to have the Z vector for its input and a slider for that z vector and that will go up to I don't know maybe 100 like I said this log is not really any sort of fixed parameters for this so now we can plug these points straight into here as well and when we reset simulation turn our mesh on and enable it we should see a result move this up and there we go we're now getting a good result out of our out of our mesh and so okay so now I mean that's we're almost there you can see as soon as I reset the simulation again once again we lose in native contact between these points and the mesh so there is one more thing that I can do and it involves this button um I've talked about this in a previous tutorial but what we what we have with a button or a boolean value is either true or false and that can also be interpreted if we would have plug this into an integer as either a zero or and so we can in fact use is this button as a multiplier which sort of tells us whether to move the geometry or not so um I can put a multiplier down here and I can multiply this result here except okay so at the moment when the simulation is running um it's giving me false which means it's going to multiply my result by zero which is not what I want so all I need to do is take this button and put it through and not gate a not gate is a boolean operator which flips the boolean so um false not false equals true and not true equals false so we plug that into a B and then there we go so whenever the simulation is running um we're going to get a value out of that so you can see now when I hit this button and release it it resets the points to zero and then as soon as the simulation starts up again the points move up which is pretty sweet now we've got our simulation doing exactly what you want and maybe at this point now I can go back and tweak some of the earlier results so we can dynamically increase the some sort of portion of the spiral that we want to fill and the reason we can do that is because it does not change the underlying structure of the geometry it only changes where points are which is all well and good to do if we were to change the number of steps we're going to begin to break the geometry um but that's not too much of an issue because all you need to do is simply like if you did if you did want to up the resolution on this a little bit um we can just reset the simulation will good to go again you know what maybe I'm thinking this culling pattern needs a bit more Oh fewer points around the center so I've change that culling pattern and there we go I sort of didn't like how many points of influence there were around that so I'm pretty happy with this at this stage and as you can see if we look back that's kind of water Frei Otto is doing with the German Pavillion I was sort of looking at this back region over here and sort of okay maybe the last they are there's two other things that I'll show you we could put this through a kettle clock subdivision just that we're getting a bit of a smoother result which is always a bit nicer you don't lose too much of that sort of peak information and all the other thing we could do actually is instead of extracting this as a mesh we could turn it back into a surface so all we need to do is a surface from points deconstruct this mesh over here I might stop the simulation for now and so this is our collection of points and our value is exactly the same is what are you value was for this mesh from points which is this value here so I'll just plug that in and when I preview the self now we're getting this really nice surface result there we go then that looks pretty sweet um there was one more thing that I didn't want to do let me see if I can remember that was oh yes this is sort of just an added little extra that I I don't really think I've talked about before but what we can do is using kangaroo and what we could do is we could we could sort of mess around with the length of these of all these individual curve elements a little bit we can do that in a few ways what I'm going to do is we have these curve lengths over here so I'm going to get a remap numbers component I'm also going to get a a balance component so balance is going to tell me the lowest and the highest value in this list and I'm going to plug this into my source domain my curve lengths are going to go into my value so basically it's going to look at these numbers inside this domain and it's going to reassign them to this zero to one domain which is all well and good and then what I want to do is I want to reverse um sort of owner reverse things numbers so what I'm going to do so I'm going to do 1 minus X I'll get rid of my Y over here and then I'm going to remap them again when we're going to remap them instead of from the source domain I'm going to remap them from 0 to 1 back to this target domain and so what this is basically doing is this is looking at our our input mesh wherever it is think it's over here and so with the curves you can see that some of these mesh edges are longer than others and so what it's going to do is it's going to flip that wrap so where there's a shorter edge those are going to become the longer regions and the longer edges are going to end up being the shorter edges which is kind of a I think it's subtle sort of interesting way to manipulate the mesh data to give a slightly more interesting result and then we could once again take this result over here and multiply it by the slider and then when I set my simulation up again I won't use the surface pretty I'll use the mesh preview and okay well I mean this is sort of straying a bit from what the intention was with the fry order simulation but it is just another sort of cool thing that you can do with these meshes oh let me reset simulation over here yeah there we go so now it's really pushing out inside these inner regions which were quite small and then it's it's sort of tightening up a little bit in these external ones over here which were a bit longer um but like I said we don't necessarily need to do that that was just a little extra thing that I thought might be interesting put it back in tension and yeah there we go this has had a look at how we can create the German Pavilion by FRA Otto using a kangaroo to create tensile structures hope you enjoyed
Info
Channel: Daniel Christev
Views: 56,964
Rating: 4.9614644 out of 5
Keywords: grasshopper, tutorial, kangaroo, tensile, structures, german, pavillion, yt:quality=high
Id: eE_c40GvRMI
Channel Id: undefined
Length: 38min 34sec (2314 seconds)
Published: Sat Mar 05 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.