Grasshopper

algorithmic modeling for Rhino

hi there,

 

the title says it all, how should i go about creating all different combinations of a cube, whereas the number of the cubes has a limit, lets say 100.

 

can this be achieved by gh components, or wouzld it be a scripted soulution ?

thank you very much

Views: 2686

Replies to This Discussion

Hey,

 

with a pattern (for example) this can be done with gh.

http://www.mathematische-basteleien.de/somacube.htm

As it is described here the pattern itself is generated with c++

Maybe this helps aou to get started

Best Regards

DeDackel

hey and thank you for the link,

 

this is interesting but it really would help to get a better explanation of the logics behind the c++ script.

 

 

Hi dcay,

 

you state in the post above:

creating all different combinations of a cube, whereas the number of the cubes has a limit, lets say 100.

There are only 8 solutions to this problem. The image you posted is a good illustration of this as 1 and 7 are the same and so is 5 and 6. They are just oriented differently.

You have from Left to Right: I, L, Left, N, O, O, I. All you are missing is T ( similar to L but with the protrusion in the middle), Right (opposite of left) and 3 (which is like Left but with the tower moved to the middle)

 

hey danny,

 

let me explain the problem a little bit more. the above combinations where just supposed to illustrate the problem. sure i forgot some solutions for the n=4 example. in some cases orientation plays a role, so number 1 and 7 are maybe the same in math sense but not by my definition.

but what im aiming for is plotting out all possible combination of lets say n=50 cubes. so i need some kind of logic to generate these combinations. filtering ( and predefing start combinations-like dedackelzuchts link ) out these combinations according to some criteria would be the next thing.

i have no scripting abilities therefore my question was if this could be done also by gh components.

i thought about something like this:

 

add cube

extrude one face (x,y or z) -> one possible geometry (if orientation doesnt play a role)

check the two cubes

extrude one face (faces that are at same position are not valid) - > two possible combinations

check the 3 cubes

...

and so on

 

 

the thig is that the combinations branches and i have no clue how to do this with grasshopper.

 

thanxs a bunch

 

 

 

 

 

I wrote a VB script that finds all combinations from a list of rectangles. You should be able to modify this for other geometries. When I have more time, I'll bang this up as a custom component that works for general objects- but don't hold your breath. ;)

Note: the script component doesn't move the rectangles around in space. It only finds the combinations (i.e. Pascal's Triangle) and groups them in separate branches of a data tree. This all inclusive strategy may not work for you. In your case you'd have to specify a 3d grid of cubes 100 x 100 x 100. 1,000,000 cubes gives 2^1,000,000,000 combinations... but you could write the script so that it only includes combinations up to 100. This would still include combinations with "stray" or "floating" cubes not attached. 

Attachments:

Hi Kris
I'm having problems opening your script. I too wish to modify the definition to use with cubes. I am trying to demonstrate all the possible combinations of cubes and arrangements.
Is there any chance you can reupload your VBScript, it does not seem to open on my version of Grasshopper.

Thanks

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service