2
$\begingroup$

I have two identical rectangles. I'm wanting to rotate one rectangle by either + or - $30^\circ$ about its center point. Then calculate the dimensions required to stretch the rotated rectangle out equally from its center point to cover the other rectangle completely.

I can calculate the width of rotated rectangle using a square root I was hoping someone could help with calculating the height required.

I hope the following will help illustrate what I mean; essentially I can't figure out how to calculate the red line.

The length will change dependent on angle and the dimensions of the original rectangle.

Illustrating dimensions

$\endgroup$
4
$\begingroup$

There are corresponences between rotation angle and angles between base and rotated rectangles:

enter image description here Larger version

We can use definitions of sinus and cosinus to find lengths of s, t, u and v segments, assuming that $\alpha\in[0,\frac{\pi}{2}]$, $w>0$ and $h>0$:

$$ \cos\alpha=\frac{s}{w}\Rightarrow s=w\cos\alpha\\ \sin\alpha=\frac{t}{w}\Rightarrow t=w\sin\alpha\\ \cos\alpha=\frac{u}{h}\Rightarrow u=h\cos\alpha\\ \sin\alpha=\frac{v}{h}\Rightarrow v=h\sin\alpha $$

Finally, lenghts of sides of a rotated rectangle:

$$ w'=v+s=h\sin\alpha+w\cos\alpha\\ h'=t+u=w\sin\alpha+h\cos\alpha $$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.