Description: Considering n number rectangles each of size h x w, what would the optimal size of these rectangles be in order to occupy the most area of a larger rectangular parent container, of size H x W, while maintaining the aspect ratio of the children rectangles?
The first attempt at this problem was a brute force method, but something that ran faster was desired. The following explanation outlines my attempt and my solution.
To Search:
File list (Check if you may need any files):
ScalingTiles
............\ScalingTiles
............\ScalingTiles.sln
............\ScalingTiles.suo
............\............\App.xaml
............\............\App.xaml.cs
............\............\bin
............\............\...\Debug
............\............\...\.....\ScalingTiles.exe
............\............\...\.....\ScalingTiles.pdb
............\............\...\.....\ScalingTiles.vshost.exe
............\............\...\.....\ScalingTiles.vshost.exe.manifest
............\............\MainWindow.xaml
............\............\MainWindow.xaml.cs
............\............\obj
............\............\...\x86
............\............\...\...\Debug
............\............\...\...\.....\App.g.cs
............\............\...\...\.....\App.g.i.cs
............\............\...\...\.....\DesignTimeResolveAssemblyReferences.cache
............\............\...\...\.....\DesignTimeResolveAssemblyReferencesInput.cache
............\............\...\...\.....\GenerateResource.read.1.tlog
............\............\...\...\.....\GenerateResource.write.1.tlog
............\............\...\...\.....\MainWindow.baml
............\............\...\...\.....\MainWindow.g.cs
............\............\...\...\.....\MainWindow.g.i.cs
............\............\...\...\.....\ScalingTiles.csproj.FileListAbsolute.txt
............\............\...\...\.....\ScalingTiles.exe
............\............\...\...\.....\ScalingTiles.g.resources
............\............\...\...\.....\ScalingTiles.pdb
............\............\...\...\.....\ScalingTiles.Properties.Resources.resources
............\............\...\...\.....\ScalingTiles_MarkupCompile.cache
............\............\...\...\.....\ScalingTiles_MarkupCompile.i.cache
............\............\...\...\.....\TempPE
............\............\...\...\.....\......\Properties.Resources.Designer.cs.dll
............\............\Properties
............\............\..........\AssemblyInfo.cs
............\............\..........\Resources.Designer.cs
............\............\..........\Resources.resx
............\............\..........\Settings.Designer.cs
............\............\..........\Settings.settings
............\............\ScalingTiles.csproj