Grasshopper

algorithmic modeling for Rhino

Hi everyone!

 

I´m new to grasshopper, and I´m trying to make a program (that's how you call it?) with grasshopper which can arrange defined areas (rectangles basically) through galapagos, by following  a chart of area relations (this chart represents which area goes nearer which area, for example, architecturaly talking, a bathroom should be near a bedroom and a kitchen near a dinning table).

 

First step is to cluster everything together, so what I did was make a bounding box of, for example, 3 rectangles, and "minimize" the area of the bounding box (through galapagos), being sliders of movement for the rectangles the genomes. That works ok but I need it to check if the rectangles touch each other so that in the solutions they dont overlap.

 

And that's where I'm stuck right now, so my question is if any of these aproaches to "collision detection" is possible:

 

1- Subtract a 2d domain from a MD slider (parametrically) so that the rectangle doesn't move in the subtracted area.

 

2- Check true if a 2d domain contains coordinates from another 2d domain (which would mean collision) and if so, how could I eliminate these colliding solutions from the best galapagos solutions.

 

The point is, that i don't want rectangles to overlap, or at least to detect when they do.

 

Hope I didnt bore you with my long post, and thanks in advance for any help.

Views: 875

Replies to This Discussion

Could I represent a domain as coordinates, and not just numbers? so I could just check if any coordinates from two different rectangles are the same and this I could minimize to 0 in galapagos.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service