Looking for correlation between length and angle

66 Views Asked by At

The problem I'm facing might be rather easy to solve, but I can't think of a way how to do it atm. I want to clip straight 90-degree and some other degree lines. If I clip them at a fixed height (like h in the graphic) the 90-degree lines are too long. So all I need to know is how to calculate the difference (x) which occurs if the line is not rotated by angle alpha.

Variables I know: alpha and h

sketch

2

There are 2 best solutions below

0
On BEST ANSWER

The portion of the blue line segment between the vertex and the intersection with the dashed line must have length $x+h$, and that allows you to find $x$ like so: $$\begin{align} \cos(\alpha)&=\frac{h}{x+h} \\[0.2ex] x+h&=h\sec(\alpha) \\[0.7ex] x&=h(\sec(\alpha)-1) \end{align}$$

0
On

Use Cosine(x) = adjacent / hypotenuse