How can I find a point on a rotated square that has a set y value?

88 Views Asked by At

I have this square that is rotating inside the circle. enter image description here I want the horizontal line on the left to always be on the edge of the rotating square (where the green point is), but it will be constantly rotating, so can I calculate the point where the line will first meet the square based on the angle and side length? Desmos

2

There are 2 best solutions below

2
On

Well, let see... one corner of the square is $(\cos \theta, \sin \theta)$ and the other corner is $(\cos(\theta + 90), \sin (\theta +90))=(\sin \theta, -\cos \theta)$.

Those two points are on a line with slope $\frac {\sin \theta + \cos\theta}{\cos \theta - \sin \theta}$.

And that should do it.... we have the slope of a line, we have two points of the line so we can make the equation for the line and we can calculate the $x$ intercept from that.

0
On

I figured it out! Image of desmos Desmos

I used point slope form line + regressions to get the intercept. Thanks for all the help! :)

All I need to do now is use only the two points that are on the right side, but I can figure that out!