I am trying to make an algorithm which fits as much cubes into larger cube (container), as is possible.
Imagine that I have many cubes of five different sizes and I want to fit them into larger cubes (call them containers) with the fact that I want to use as few containers as I can.
I have found that it’s the Bin packing problem, but in my case every box is just a cube – all the three dimensions are identical.
The question I have is if is there an “easy” algorithm/way to do this?
It’s still bin packing.
Becasue you are using cubes, you can treat the the problem as one dimensional that’s all.
10 1cm cubes will fit in to 1 10 cm cube
10 1cm lines will fit onto one 10cm line.
Cubes essentally takes orientation out of the problem e.g. 2cm x 1 cm could be upright or layed flat.