Dimensions of a rectangle containing a rotated rectangle

4.7k Views Asked by At

Given sides a, b, and an arbitrary rotation Θ (0 - 360 degrees) around the centerpoint of the rectangle, how would I calculate sides A and B of a containing rectangle?

Illustration of rectangles in question

1

There are 1 best solutions below

5
On BEST ANSWER

B = $a*sin(90-\theta)+b*sin(\theta)$

A = $b*sin(90-\theta)+a*sin(\theta)$

(Assuming the image shows minor clockwise rotation)

when $\theta=0\ $ $B=a\ $ $A=b\ $ (matching the image)