Imagine a rectangle (x1 by y1) always has to be drawn with horizontal and vertical lines (so it can't have lines at 45 degrees). If the rectangle is rotated by angle θ, it needs to have a rectangle drawn inside it so that this new rectangle still follows the rules. In the diagram, the black rectangle is the original, the red one is the rotated rectangle, and the green ones are three possible options (the two extremes, and one which maintains the aspect ratio).
How can I work out (in terms of x1, y1 and θ):
- the dimensions (x2 and y2) of the rectangle which maintains the aspect ratio of the original?
- the dimensions (x2 and y2) of the rectangle which has the largest possible area within the given boundaries?
- x2 for a given y2 (and vice-versa) within a valid range?
Answers to only one part are quite welcome. I've tried to work this out myself by looking at what I know about the resulting triangles, and can't seem to get anywhere (it's been a while since I studied Maths), so an answer to one of these might point me in the right direction.