Calculate the maximum rotation angle of a rectangle to overlap a smaller rectangle within a fixed distance

34 Views Asked by At

I'm trying to figure out how far a rectangle can rotate from its center while still overlapping a smaller rectangle given vertical and horizontal constraints

Rectangle overlap without rotation

Rectangle overlap with rotation

I need to figure out the range that the black rectangle can rotate + move while still fitting over a certain amount of the blue rectangle. Basically, I am trying to solve for the maximum offset the black rectangle can have while meeting these conditions.

V1 can be between 0 and 20 cm

H1 can be between 0-9 cm

Any feedback for what equations I need to use or resources that might help me would be greatly appreciated.