Grasshopper

algorithmic modeling for Rhino

Working off Marc Syp's video idea I've created my own version. It's a little more clunky, but it gets the job done. It all starts from my excel file where I've listed program names and then areas. These are imported through the plug-in

Ghowl to Grasshopper. In grasshopper you have to manually list which items should be attracted to what. My file has a bunch of adjacency requirements, then a few off site requirements I've tried to communicate in my diagram. This is where list-item grabs the appropriate areas and attracts them to each other. The example is for an elementary school.

Next I've set surfaces in rhino for attraction. This example is for a vertical elementary school, so for example views were important for certain rooms. With Marc's program, they all tend towards a sphere themselves. For more vertical designs, I've added a core attractor surface to draw the bubbles vertically. This can definitely be refined, but I wanted to share it asap to all those people waiting for Marc to share something. All in all it's basically a simple sphere packing script I found and adapted to suit architectural purposes. 

Here's a video of it in action

https://www.youtube.com/watch?v=_IfeLW6sEmI

Views: 12300

Attachments:

Replies to This Discussion

Thanks Jesse!
Will definitively try this out.

Hey Jesse, can you explain a little how you overcame the sphere boundary problem, how do you keep the fidelity of the boundary? i have downloaded the script but cant seem to understand.

Thanks!

It has to do with the springs rest length and cut-off. In the script I calculated the radius based on the required area and matched it up with each point so that the springs essentially won't work beyond that threshold.

Hello Jesse, wrt sphere fidelity could you please explain the components list index + pshift?

tx

AB

I'm just gonna explain that whole bit, cause it's all connected.

I grab the start and end points of the interconnected lines. Now see the diagram, each point has a position in the list which corresponds to a center of a sphere. I need to say to point 1 and 3 to equal X radius but also add point 1 and 4 radii to be a single length for Kangaroo, and so on for all of them.

There is probably several ways to do this. I begin with MIndex.

MIndex is matching points 1 and 3 with list item X (not a radius yet).

PShift. The results from MIndex are in individual branches and they need to be in the same branch so I can add them later using MassAddition. This component is like a flatten component except it is adjustable by using -1,-2... etc. to flatten one tree, or two, etc. 

This image shows how it's taking the tree ID 0;0;0;0 and -1 from the tree to make it 0;0;0. By minusing 1 from the tree ID we are left with two identical tree ID's instead of two separate ID's which become merged. 

The output from MIndex has divided the points into their own tress using either a 0 or 1. By removing those 0 or 1 the tree ID is now the same again and the numbers join.

List Item. The List item component is assigning the radius from our list. Before we only had index list locations (from MIndex), now we take those index list locations and assigning the appropriate radius to each number. 

Hi jesse,

First of all kudos to successfully attempt 'computational space planning' and 2ndly thanks for being so generous of sharing it.

I have few queries, if you could please answer those.

i still use Rhino 4.0 and corresponding GH version, as a result i could not open your Rhino file.

Hence in your definition as i see,

1) Spring Force-1 -Connection has 11 'inter' components. The inter components do not have any input data and hence 'orange'. What are the inputs for 'inter'?

2) Spring Force - 2 -'Connection'has 1 point component. Rest length & Cut off has 'mass addition' data. This force is also orange, could u throw a light on this please?

3) Pull to surface - both forces has no point input, hence it is orange too. could u throw a light on this too please?

4) There are 2 x Cartesian product components not connected to anything.

I realise that partially it could be because i'm using lower version of Rhino. However, ur input will be highly appreciated.

Kind Regards,

Agneesh

This image above hopefully explains some of what's missing for spring force 1 and the Cartesian products. This list item mess is just me defining additional attractions between certain points.

The pull to surface bit should have a surface to reference in the rhino model, so make one up in rhino and link it to grasshopper. The surface could be whatever site constraints you may want/have. 

Below is the spring force 2 that is all orange for you. Not sure exactly what you may be missing, but this is how it should look. This is the force that firmly cements the sphere fidelity. 

Hi Jesse,

Thanks for you post!  I am wondering if you can help me out.  I am trying to create a 2D version of your script.  I have detached all forces except for the two spring forces (the one for initial spacial connections and the one to respect the boundary of the circles).  When I run kangaroos the circles overlap.  I cannot figure out why.  I think it has something to do with the fact that some circles need to be farther away than their two added radii because of the intrusion of other circles.  Any help you can offer would be greatly appreciated.  I attached an image of what I am seeing below.

Thanks,
Sam

Attachments:

Another way that seems like it should work is to use a power law with the radii as the cut off.  This seems to be trying to produce the result I am looking for, but the strength has to be brought way up in order to have the circles repel each other.  You can't tell from the picture, but when this happens the circles jump around like crazy.  I apologize for the messyness of the script image, I am testing several things at once.

Sam

Attachments:

 This base of my script was from a definition I found on the grasshopper3d fourms, although I can't recall from where exactly. You will have to mess around with each of the forces to get a good balance anyways.

There are plenty of examples of "Circle Packing" out there. It really depends on what you'd like them to become, and which method you'd like to use. Here are some resources.

http://grasshopperdefinitions.wordpress.com/2011/10/04/circle-pakin...

http://www.grasshopper3d.com/group/kangaroo/forum/topics/circle-pac...

http://www.designcoding.net/searching-for-a-full-circle-packing/

LOOKS VERY COOL LOL 

Im getting an error from the get go, it does not allow me to attach my excel file (recently downloaded open office) which it seemed that was the issue but still same error. This is the message "1. Solution exception:The type initializer for 'ClosedXML.Excel.XLWorkbook' threw an exception." Thank you in advance!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service