I want to divide a rectangle into grid rows and columns.
I need the grid to have fewer rather than more rows and columns.
Here's an illustration
Requirements for each cell (eg the blue cell above):
The height of each cell in the grid should be equally sized.
The width of each cell in the grid should be equally sized.
The ratio of each cell width & height should be 1.25 or less.
Max(width,height) / Min(width,height) <= 1.25
Is there an algorithm to calculate the number of rows and columns needed to produce the fewest number of "square-ish" sub-rectangles?