Grasshopper - Advanced Attractor Logic Pt.1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello everyone and welcome back to this grasshopper tutorial today we will build our very first attracted definition attractors our geometries that act like a kind of virtual magnet it can influence the parameters of surrounding geometry attractors and parametric design and have a variety of applications they can be used as pattern design or which is maybe more interesting in performance design good for example use it for optimizing a facade through certain performance towards the Sun we will however start by learning how to implement attractive geometries by creating a small parametric city to start with our small city we will first define the streets with curves these curves will also be later our attracting geometry so we just take a control point curve or a polyline curve and draw nice beach grid this will be the only we need to draw in Rhino so now we will open grasshopper and reference these curves and through our definition let multiple curves act all of these confirm and we have them right here with these curves we can now define the area of our city we can do this by using a bounding box component between in all these planes and use it as a union box now the purse did perfectly in this area if you want we can always change them a bit but it's not really necessary what we will do next is to define the grid of our city blocks so obviously we first need a grid we will choose external grid and place it right here so we can now define the extent of our grid let's say we have 95 I'm 25 as our grid size this is of course now very small and doesn't really fit to the plane we defined with our curves so to hit the straight onto this plane as a component called map surface or map to surface or what this component does X curves and scales or stretches them that it's it's from a source geometry to attacted geometry so our curves we want to map of it unto our surface here of course these heads we want to do it all in one list I will flatten it here and connect it as our curves map what we need now is this force geometry so this is basically a surface on which our curves are lame and this surface then will be stretched but we will do the same we did with our [Music] Earth's bonding boards and use this union boards as always forced geometry so it will now take this surface and stretch it or scale it it will fit the surface and then take the same factor to stretch the curves we will do it right now and we see a smaller grid here now fits perfectly onto our city area between and all of this art and have our work structure now we need to somehow connect these curves to our attractor geometry right now they are independent from each other so what we will use is component will point and what this does it basically relates the closest point to driven geometry or to a variety of geometries in this case this will be our curves and then creates or puts the point on through this curve at the closest distance we need of course points we can calculate from and we will use the centroids of each of our city blocks we use area at our center points and what we can see now is that each of these points as now its marked point on its closest Earth right this component does not only give us the closest point on the curve but it also translates the distance between the original point in the grid and the new closest point on the curve and this distance is what we need to define our attractor definition as we don't want any blocks on our street we were elite every sale or block which is too close to the street this means we can take our distance choose every point that is smaller and a defined distance and delete it the first input is of course the distance and the second input is now the threshold value we want to define you know which points we need to delete and which not so let's just say we can make our streets 25 meters wide with this we can now define which point are far enough away to maintain in our city rate and which points are too close so we will delete them we will use the component sky pattern so we can basically hate all these curves we have here and we see in this list if they are far enough away or if they are too close for it means to close true means the distance is larger than 25 so they're okay to maintain in our grid we will now use this pattern as our coloring pattern and of course our block set as the list we want to try as a result we see it only the blocks very far away from our streets are still down to maybe the number 25 as a defensive distance from our streets it's a bit too large that's no problem we can simply scale it down and all right this seems like our streets are wide enough so we will keep this number and carry on with our geometries first things first we want to have a clean view of what we are doing and what not we will blend this art and just work with these geometry the first thing do with them is to scare them according to their distance to our geometries but we will use the distance of cross and scare our Lots according to it we already see that we have one scaling point around which is all failed so that's not what we want we want to define enter for each point which is then the centroid of it but we can't use this centroid list as it still has points of every city block so we will just do another pie pattern at this time with our list of centroids this is to fit as the centre for each of our geometries and now we straight them on point but we scare them all the same what we will do now is to define individualized actor of scaling according to the distance from the tractor geometry what we will do is we will use the distance of the points themselves as the parameter for the hectare of our straining we of course need the it in distance for each of these points we will kyle is two with the same pattern of claws and now we will remap these distance numbers they are from 7 to 38 but our scale factor has to be from 0 to 1 so we take these points and remap the numbers our value of course are the distance values our source domain from where to where the number is growing at the beginning of this remapping is this domain and now we can define our target right here it's defined from 0 to 1 this is also the domain we need so if we now connect our map values a few things happen first of all we do get a pair factor which depends on the distance [Music] attracting geometry but as well we are getting an error message here as our lowest distance is now defined as 0 and we translate with 0 and the third thing the blocks are larger the father away they are from the street which is obvious because they have a higher distance and now they're at a higher position at our new range from 0 to 1 so we want the closest buildings to be the largest and we of course don't want an error message in our scaling component we can do this by using a graph metal this graph my plan now basically again removes these numbers according to graph type we can define here so if we Trinette these numbers they define the value on this axis and get a new value on the y-axis so if we do it linear it should basically be the same which is right but the first thing we can do is we can change our lines so it doesn't go through zero so we start a bit above zero this eliminates the error message we are getting and to basically flip the value of the distance our closest buildings are the largest we can simply change the direction of our graph so now the lowest numbers it's the new highest number and the highest numbers which is brightest distance know that the lowest actor frustrating another thing we can do now is we can change the path type we are using this is linear which is pretty boring but if we first sample choose this here graph of course we can scroll 0 here we can change the vector of remapping in a pretty interesting way I think we're give this now we want to have a clean we make the preview off of these and these are our new city blocks right now but as you can see we only have the outer line of our city blocks we want to change this and extrude our blocks as solid buildings so we choose extrude and can now take this as a base or our Struzan but now we go to the respective all our city blocks of course have the same height and we can change this too and we may have that right we will use of course our distance right here so we already have our numbers mapped from 0 to 1 we can now use these numbers define the height of our extrusion we will do this again by remapping the numbers with another graph mapper that we have our previously mapped numbers remember they are from 0 to 1 as the values we want to remap the source domain as we already remap them is from 0 to 1 so this is right but we of course want to extrude more than just this little bit so our target domain will be a bit larger we construct our domain and let's say we go from 10 to 60 in start/end as our target and we want to define them with a new graph matter so we simply put this in between our map numbers basically remap them before mapping them to our new tune which is a graph type and yeah and this now means that our numbers are smaller the lower the distance this means that the closer the buildings are to the street window where they are which is exactly what we want we can now use these map numbers as our key factor and we see we created our city the numbers may be a bit much so we just reduce it here they are of course just the outer surfaces of the blocks so we kept our holes and have our buildings we can also use our distance as a parameter or the coloring of our geometries the components used to color our geometries or it's a gradient and we already see that we still need to work with domains creates lower limit and upper limit of our parameters this means at this point is our lower limit at this point or upper limit and all the geometries have a parameter which lies in between and according to this we get a trailer at a very point so we need the bounce or the low an upper limit of our domain we can construct our domain to get our starting and end point and now connect them as our lower and upper limit we can use of course now our B reps as the parameters with the three tolerant may be add similar colors which you train always added by double-clicking on this point here and typing in your color values and now we can use the trust in preview which lets us see our geometries which are our B reps in defined material or color we will use our gradient target in and have our colored city grid in this tutorial you learned about the basics of attractive definitions in grass Oakland we saw that we can use them to scale to extrude or to color or geometries but there are of course many other ways you can use interactive definitions we will get to know some of these other possibilities in the process of the crops so as always if you are taking the crossed computational design basics at your Darmstadt check on Moodle if you have any new exercises or tasks and if you're watching us on YouTube leave a like we hope you enjoy it and see you next time [Music]
Info
Channel: Digital Design Unit - TU Darmstadt
Views: 2,883
Rating: 5 out of 5
Keywords:
Id: QhV0UV2p5bY
Channel Id: undefined
Length: 19min 6sec (1146 seconds)
Published: Mon Jun 08 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.