Grasshopper

algorithmic modeling for Rhino

Hello all,

I am experimenting with programming a building using the graph visualization platform gephi and using the data generated to create a parametric massing model in grasshopper.  However, I'm kind of at a loss at the moment in terms of how to somehow link the two programs.  I'm dealing with graph theory parameters such as closeness centrality, degree, edge weight, etc.  Does anyone have any experience with a similar workflow that can offer some advice/ ideas?  Any input would be much appreciated.  For reference, here is the link to gephi: www.gephi.org.  Thanks!

Views: 1734

Replies to This Discussion

To clarify a possible path, it would be ideal if I could somehow get gephi to talk to grasshopper.  However, I'm really really inexperienced with code, so I would appreciate it if someone could point me to a possible source of help.  Thanks again!

Seems this could be useful in your quest: https://marketplace.gephi.org/plugin/graph-streaming/

Thanks Luis!  I will take a look at that.  Any further suggestions from anyone else would also be appreciated, the more the merrier!

Hi Katherine,

 

Did you end up having any luck linking Grasshopper and Gephi? Just curious if you were able to get it to work. Thanks!

hey Katherine,

not sure how this might help you 6 years on but If anyone else is curious about this there's a sloppy workflow that I was able to figure out.

1 - Construct a symmetric adjacency matrix on excel (leaving 0,0 cell blank and also making sure there are no commas in the names ) Also let's call the names "ID" 

2 - For the weight, use numbers ranging from 1 - 10 where 10 is the highest dependancy.

3 - Save the file as a Unicode CSV from excel

4 - Create another file on excel that has the attributes of your spaces, with the names of your spaces under the header ID (let's start with a simple "area" and "SNo" attribute but you could add more features for sorting and manipulating your data)

5 - Open Gephi and further open your matrix CSV file

5 - Import it as "," (comma delimited file) and make sure you check "matrix" for the data type

6 - Ensure the import is nondirectional as well (or Gephi adds silly arrows)

7 - Not gonna go into the gephi bit too much but select a force atlas layout and set the force to something high 1000 or 10000 depending on the size of the data and the attraction to a 1000th of that 1 or 10. Go to the data lab and import your excel with the attributes and append to your existing datasheet.

8 - Set the node attributes to use the area for the node size and color scheme to SNo

9 - Play around with all the layout options and finally go to your preview. Once you're happy with it, export it to a GDF graph file.

the GDF now has the coordinates of the circles and the diameters. as well as the edge connections.

I've written a very amateur script that converts this to GH geometry (below)

Hope this helps someone out, I'm still figuring out the gephi streaming API but I've only started with python about a month ago so might take a while to get there.

You can use the second half of the GDF files to also create dependency chord diagrams online as shown in the third image.

https://flourish.studio/2018/07/25/how-to-make-a-chord-diagram/

Cheers,

Sanjay

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service