Distance between highest and lowest point on rotated square

218 Views Asked by At

I have a square and I want to know the vertical distance between the highest point and the lowest point. The square is $10 \times 10$ cm. The amount of degrees the square is rotated can be anything, but I need a formula that always works no matter the amount of degrees it is rotated.

Does anyone know a formula to calculate this?

So in this picture I would need to know the length of the red line:

enter image description here

2

There are 2 best solutions below

5
On BEST ANSWER

Suppose that the square is rotated by an angle of $\theta$. You can draw a square $B$ that just touches the vertex of your original square, as in here ($\theta$ would be angle $STY$):

square

Thus, the height you are looking is the sum of $XS$ and $SY$, which are equal to the shortest sides of triangle STY. Thus, the height equals $(\cos(\theta)+\sin(\theta))L,$ where $L$ is the side length of the original square (in your case, 10 cm).

0
On

You need to know the angle $\theta$ that the square has been rotated relative to the horizontal. A small amount of trig then shows that the distance between the two lines is $10( \sin \theta +\cos \theta)$. The smallest the distance can be occurs when $\theta=0$, and is just 10, and the largest value occurs when $\theta = 45^\circ$ at which point it is $10\sqrt2$.