Move Objects on Points?


(Ogprostean) #1

Hello Guys,

So … In the pictures below there is a floor plan which contains a grid of points. Next to the floor plan there is a bed. In Grasshopper the red groups is the grid and the blue group should be the random seed.
I am trying to take the bed now and randomly put it on one of this grid points starting with lets say the upper left vertex of the bed. So when I move the number slider, I want to get a new position on this grid for my bed … every time. mby also rotate it?

Can someone help me? I got stuck :frowning:

I attached the gh + rhino folder

Thank you very much

forumgh.gh (9.3 KB)
Automatisches01.3dm (3.3 MB)


#2

Did you mean something like that? If you wanted rotation to be “random” as well you can apply same rule
forumgh1.gh (10.0 KB)


(Ogprostean) #3

Wow! cool . thats exactly what I looked for. One more question… I added now 1 new element ( a couch ). How can I add the couch to this system so It can also be put randomly somewhere on this grid? but not necessarily on the same position as the bed. I plan to create a whole list with elements that will be randomly placed inside the floor plan.

Thank you kind sir :slight_smile:
aaaaaaaaaaaa.3dm (3.3 MB)
forum3.gh (15.0 KB)


#4

I don’t really get what you want to do - place elements one by one with slider for each step or get “random” layouts with all elements using one slider?


(Ogprostean) #5

get random layouts with all elements using one slider. If I add a sofa now to the same slider, the sofa and the bed will be randomly put on the same point. I want to use the same slider but get different ( random ) points individually for the sofa and bed. :slight_smile:


#6

The problem is that each block contains of many curves. You would have to create a tree with each branch being a collection of curves matching each block. Than create a tree with random points to move to as well, which branches number would have to match blocks number. To be sure you cover all points you would probably need another slider for offset (as points collection is bigger than blocks collection). That’s quite complex and I’m busy now so can’t help you with that. Anyway - here’s a quick one that may or may not work for you. It’s drawback is that probably not all points can be covered.forumgh2.gh (16.5 KB)


(Ogprostean) #7

This is lovely and way out of my league :)). you did more than enough. I thought it was easier. Anyway, thank you very much for your help. I will know take 1 day off to understand everything you did here.

Cheers and all the best,

Aufwiederschnitzel !!