Don Knuth's 2017 Christmas lecture featured a way to count how many ways a rectangle can be subdivided into rectangles [0]. It got its own entry in the Online Encyclopedia of Integer Sequences [1].
I don’t want my video conferencing software to choose different sized rectangles and/or different aspect ratios for different people. The splitting into vertical slices in MS Teams in driving me nuts, with its (crappy) automated panning to keep the face in view, that they had to add because they decided to chop the sides off. Just put all same-sized rectangles that all have the same aspect ratio in the view and allow some background if the number of people isn’t a rectangular number.
Oh yeah, totally agreed. Maybe just square would be great. 4:3 at the widest. I guess there probably are 16:9 webcams, but aren’t they typically narrower?
I did some playing with this a while back, taking a different approach. I wanted all windows to have the same aspect ratio, and all to be the same size except for (optionally) one "selected" window which would be bigger by some factor. Options were scored by percentage of total space used, deviation from desired aspect ratio, and optionally preferring solutions that magnified the selected window. https://observablehq.com/@tomcburke/rectangle-packing
Worked a bit for a logistics provider. My experience was this:
Investing tens of thousands of dollars of engineering and processing time isn't worth it to save seconds for an employee working minimum wage (that does the packing for awkward shapes by hand).
When I was in school Dr Klarner was looking into that exact problem. He had it pretty well dialed in on 2d. Once you move to 3d though it becomes a strange problem as what was once optimal for 2d may no longer be in 3d.
In practical terms though time/speed is usually more important in packing. For example you may have optimal packing but it takes 10 hours to physically pack it out is not great. Optimal load size is usually better if you have fixed size packages that interlock in some known pattern or are willing to allow some slack.
[0] https://youtu.be/BxQw4CdxLr8 [1] https://oeis.org/A285357