2D packing with obstacles

Posted by cime on Stack Overflow See other posts from Stack Overflow or by cime
Published on 2010-03-26T10:17:24Z Indexed on 2010/03/26 10:23 UTC
Read the original article Hit count: 475

Filed under:
|

Anybody know of an efficient algorithm for moving rectangles in a square which contains obstacles?

Rectangles:

  • can rotate
  • can move
  • must not collide with obstacles (black squares)

Obstacles:

  • can't be moved
  • can be added anywhere

Goal: move rectangles until you can

State 1

State 2

State 3

State 4

State 5

© Stack Overflow or respective owner

Related posts about algorithm

Related posts about packing

  • 2D packing with obstacles

    as seen on Stack Overflow - Search for 'Stack Overflow'
    Anybody know of an efficient algorithm for moving rectangles in a square which contains obstacles? Rectangles: can rotate can move must not collide with obstacles (black squares) Obstacles: can't be moved can be added anywhere Goal: move rectangles until you can >>> More

  • C/C++ packing signed char into int

    as seen on Stack Overflow - Search for 'Stack Overflow'
    hello I have need to pack four signed bytes into 32-bit integral type. this is what I came up to: int byte(char c) { return (unsigned char)c; } int pack(char c0, char c1, ...) { return byte(c0) | byte(c1) << 8 | ...; } is this a good solution? Is it portable? is there a ready-made solution… >>> More

  • Packing a DBF

    as seen on Geeks with Blogs - Search for 'Geeks with Blogs'
    I thought my days of dealing with DBFs as a "production data" source were over, but HA (no such luck). I recently had to retrieve, modify and replace some data that needed to be delivered in a DBF file. Everything was fine until I realized / remembered the DBF driver does not ACTUALLY delete records… >>> More

  • Packing a DBF

    as seen on Geeks with Blogs - Search for 'Geeks with Blogs'
    I thought my days of dealing with DBFs as a "production data" source were over, but HA (no such luck). I recently had to retrieve, modify and replace some data that needed to be delivered in a DBF file. Everything was fine until I realized / remembered the DBF driver does not ACTUALLY delete records… >>> More

  • Bin packing part 6: Further improvements

    as seen on SQL Blog - Search for 'SQL Blog'
    In part 5 of my series on the bin packing problem, I presented a method that sits somewhere in between the true row-by-row iterative characteristics of the first three parts and the truly set-based approach of the fourth part. I did use iteration, but each pass through the loop would use a set-based… >>> More