I have an arbitrary rectangle I need to subdivide into equal tiles. I would like to optimise the number of tiles according to the following constraints in order of priority:
- The original rectangle will always be an integer number of units
- The maximum area of the tile is 12 units squared
- All tiles should be equal in dimensions
- Preference for compact tiles (closer to square)
- Preference for tiles to be 8-9 units squared
- Preference for tiles to be integer units
- Preference for fewer tiles
Thoughts on how to calculate the number of horizontal and vertical tiles given the size of the original rectangle?