News for hackers. Stuff that matters.
Re:The many ways of splitting a rectangle in many by jhncls on Monday January 04, 2021 @07:59PM (#25640567)
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].

[0] https://youtu.be/BxQw4CdxLr8 [1] https://oeis.org/A285357

Re:The many ways of splitting a rectangle in many by dahart on Monday January 04, 2021 @08:53PM (#25641077)
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.
Re:The many ways of splitting a rectangle in many by Dylan16807 on Tuesday January 05, 2021 @02:07AM (#25642950)
I can get behind using the same aspect ratio for everyone, but boy 16x9 is not a very good aspect ratio for videoconferencing.
Re:The many ways of splitting a rectangle in many by dahart on Tuesday January 05, 2021 @10:32AM (#25646539)
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?
Re:The many ways of splitting a rectangle in many by riccardopa on Monday January 04, 2021 @02:09PM (#25636330)
A yak, very finely shaved indeed!
Re:The many ways of splitting a rectangle in many by FatalLogic on Tuesday January 05, 2021 @12:46AM (#25642569)
Better if the algorithm is weighted to prefer tall rectangles, not wide rectangles, to best fit faces
Re:The many ways of splitting a rectangle in many by graphviz on Monday January 04, 2021 @07:37PM (#25640415)
Re:The many ways of splitting a rectangle in many by praestigiare on Tuesday January 05, 2021 @09:45AM (#25646008)
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
Re:The many ways of splitting a rectangle in many by MrVitaliy on Monday January 04, 2021 @02:53PM (#25636928)
Interesting, this could be applied in shipping/packaging industry as a sort of heuristic, even if knapsack problem is a more natural fit.
Re:The many ways of splitting a rectangle in many by ThePadawan on Tuesday January 05, 2021 @01:56AM (#25642885)
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).

Re:The many ways of splitting a rectangle in many by sumtechguy on Monday January 04, 2021 @03:12PM (#25637195)
https://en.wikipedia.org/wiki/David_A._Klarner

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.

Re:The many ways of splitting a rectangle in many by sitzkrieg on Tuesday January 05, 2021 @03:21PM (#25650496)
why does the author feel its needed for a webpage to have a loading notification on the bottom left of the supposed webpage
Re:The many ways of splitting a rectangle in many by systemvoltage on Tuesday January 05, 2021 @02:34AM (#25643111)
Soon to be on Leetcode under easy difficulty category.