How to fit a square, a rectangle into an arbitrary triangle?

105 Views Asked by At

I need to check if a square or rectangle with given sides fits into a given arbitrary triangle. Shapes can be inscribed tangentially or not.

Does anyone know how to do that? Thanks in advance.

1

There are 1 best solutions below

0
On

Possible strategy, perhaps an answer, too long for a comment.

You can check each of six possible cases (either rectangle orientation on each side) with simple trigonometry. That would be a straightforward efficient computer program.

That assumes the optimal placement is in fact with one edge of te rectangle coinciding with an edge of the triangle. I think that's true but needs proof.