Is the algorithm for packing rectangles without rotation?
Maybe implementation in C++?
I found this
and
- GuillotineBinPack
- ShelfBinPack
- SkylineBinPack
But they rotate rectangles.
Is the algorithm for packing rectangles without rotation?
Maybe implementation in C++?
I found this
and
But they rotate rectangles.
You can sort the boxes by width and then place it into a node of a tree. Then split the tree along the 2 axis. For the next box look for the best fit, I.e. least waste and place the box into the free node. Rinse and repeat until no boxes or node is left. You can look into packing lightmaps with a kd-tree by blackpawn.