From a rectangular wallpaper pattern with periods $(w,0)$ and $(0,h)$, you must cut a rectangle with aspect ratio $m$, to include every part of the pattern-unit; in other words, you must cover the (flat) torus. You may rotate this sample-piece at any angle relative to the pattern. How do you choose the rotation to allow the smallest such rectangle?
A sub-problem is: for a given rotation angle, what is the smallest $m:1$ rectangle that covers?
Partial answer, 2019 Feb 13. I think it necessary and sufficient that, for each point $(x,y)$ on the boundary of the (scaled and rotated) ‘sample’ rectangle, there exist integers $j,k$, not both zero, such that $(x+jw,y+kh)$ is within the (closed) rectangle.
The solution, then, will be to minimize (over rotation) the maximum (over the set of boundary points) of the minimum (over $j,k$) of a family of trig functions which express the minimum scale factor.