# Max width of rectangle inside another rectangle in diagonal

Given the hatch sizes (length $$a$$ and width $$b$$ of the external rectangle) and the length of the material (internal rectangle, $$d$$), what is the max width $$c$$ of the material that can pass from the hatch?

(The material is longer than the Hatch length ($$d > a$$) and less than the Hatch diagonal.)

A similar problem has been asked before fitting rectangle inside another rectangle in diagonal However, the answers are on equality or inequality on matching conditions. As there is only one matching condition, is there any formula that gives the answer. (as $$c=?$$)

thanks

Nuvit

Note:The best solution that I could find is

c = d. (b.cos(t) - a.sin(t)) / (a.cos(t) - b.sin(t))

teta (t) as the angle between two rectangles. However still need to know angle teta.

an other formula showing the relation between a, b, d and angle teta:

(a+b)/(2d*(sin(t)+cos(t)) + (b-a)/(2d*(sin(t)-cos(t)) = 1

• Looks like it's one of these answers. Not very pretty: wolframalpha.com/input/… – David K Feb 21 at 14:26
• Did you find it? – Moti Feb 26 at 7:46
• The best solution that I could find is: – Nuvit Bayurgil Feb 27 at 8:06