Grasshopper

algorithmic modeling for Rhino

Was wondering if someone could help with a simple problem.

I have a 70x20 rectangle, and I want to fit as many smaller rectangles (A, B, C) in it as possible.

The sizing of the smaller rectangles is as follows:

A = 2x3

B = 4x4

C = 8x9

The quantity and arrangement of these rectangles is based on some rules:

  • For every B rectangle there needs to be five A rectangles.
  • There are four C rectangles, regardless.
  • The A rectangles need to be touching the perimeter of the 70x20 perimeter.
  • All rectangles are oriented orthogonally (either 0 deg or 90 deg).

I have a feeling that there are many possible combinations, but maybe someone can shed light onto this puzzle. How can the combinations be determined quickly?

Cheers!

Views: 1701

Replies to This Discussion

Can u do a sketch to explain what you wanna achieve?

Here's a quick sketch.

As I was sketching, I noticed that there would be a lot of space between the 2x3 rectangles and the big 8x9 ones, so I decided to see what it would look like if I paired the 2x3s into clusters instead.

Can the clustering of rectangles be a parameter? It would be nice to know how much clustering is required to make better use of the available space.

This is a learning exercise, so I think that maybe some of the constraints will not be known until later on.

i think u might wanna look into using Galapagos, i did something like that a while ago. Let me find u the script...

Generation has a a simple 2d nesting component for planar, closed polygons.

Thanks Jonah,

I like the idea of nesting the rectangles.

But how can I have more control (rules described above) over how the nesting is done?

One way of describing my problem to solve is that I need to define my own nesting algorithm, ya?

You schould try galapagos then:)

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service