02-21-2025, 08:07 PM
Again, you're not maintaining your set ratios.
Yes, a 7x3 grid is going to hold 21 items, but it's not going to be able to match your 16:9 ratio.
7x3 is going to scale to a 21:9 ratio, which doesn't match what you started with originally at all.
If that ratio is something that doesn't have to be maintained, then why's it even there to start with? What's the point for it?
1x1 is square.
1x2 is... not square.
2x1 is... not square.
If I have 2 items, I can put them in a 1x2 grid, or a 2x1 grid, but those grids aren't going to be SQUARE -- which was the whole initial requirement for things.
It's only at:
1x1 that we have a square.
2x2 that we have a square.
3x3 that we have a square.
4x4 that we have a square.
Your description sets the ratio that you want to find a solution for, but then the solutions you are finding doesn't match that ratio.
Let's say you want to sort out how large a SQUARE grid you need to hold 12 items.
3x3 IS square, but it can only hold 9 items.
4x3 isn't square, but it can hold 12 items.
4x4 IS square, but it holds 16 items. You have 4 empty spaces left over on your grid.
Is the 4x3 a better answer? Sure, it might be -- but it's NOT a SQUARE grid like the ratio demanded it to be.
If you don't need to maintain the ratio, all you need to do is simple math and look for values that multiply to the closest number for you. The best answer would always just be a simple 1xnumber grid. It'd never have any spaces left over.
Yes, a 7x3 grid is going to hold 21 items, but it's not going to be able to match your 16:9 ratio.
7x3 is going to scale to a 21:9 ratio, which doesn't match what you started with originally at all.
If that ratio is something that doesn't have to be maintained, then why's it even there to start with? What's the point for it?
1x1 is square.
1x2 is... not square.
2x1 is... not square.
If I have 2 items, I can put them in a 1x2 grid, or a 2x1 grid, but those grids aren't going to be SQUARE -- which was the whole initial requirement for things.
It's only at:
1x1 that we have a square.
2x2 that we have a square.
3x3 that we have a square.
4x4 that we have a square.
Your description sets the ratio that you want to find a solution for, but then the solutions you are finding doesn't match that ratio.
Let's say you want to sort out how large a SQUARE grid you need to hold 12 items.
3x3 IS square, but it can only hold 9 items.
4x3 isn't square, but it can hold 12 items.
4x4 IS square, but it holds 16 items. You have 4 empty spaces left over on your grid.
Is the 4x3 a better answer? Sure, it might be -- but it's NOT a SQUARE grid like the ratio demanded it to be.
If you don't need to maintain the ratio, all you need to do is simple math and look for values that multiply to the closest number for you. The best answer would always just be a simple 1xnumber grid. It'd never have any spaces left over.