It would seem like this can be done by solving various optimization formulas via plane geometry? The radicals arise from solving maximization polynomials assuming it's a constructable solution.
However, Multi dimensional bin packing problems are the some of the hardest non linear optimization problems.