0

I have a square. Then I have a known number of rectangles, varying in widths and heights (tendency to be near square, but not always). I need to pack the rectangles into the square such that a minimum amount of area is wasted in the square. So far, basic.

But additionally, the rectangles can be scaled, as well as rotated. Their relative sizes to one another should change by as little as possible.

With so many degrees of freedom the problem becomes rather fuzzy. Does anyone have links to further reading, or a suggestion on how to approach this problem?

Core Xii
  • 6,270
  • 4
  • 31
  • 42
  • Have you tried searching for "rectangle packing algorithm" ? There's a post here http://stackoverflow.com/questions/1213394/algorithm-needed-for-packing-rectangles-in-a-fairly-optimal-way – the_lotus Feb 25 '14 at 20:44
  • @the_lotus Yes. None of them have scaling, which is the crux of this question. – Core Xii Feb 25 '14 at 23:39
  • Did you eventually solve this? I'm working on a similar problem. – Seba Kerckhof Apr 08 '16 at 09:31
  • @SebaK I did not. Still need a good solution. I'd probably try simulated annealing, or something, were it acute to solve this myself. – Core Xii Apr 11 '16 at 17:39
  • Okay, thanks for the update. I have the additional constraint that the output should be deterministic, so that excludes most metaheuristics. – Seba Kerckhof Apr 11 '16 at 21:34

0 Answers0