Suppose we are given a set of triangles (each triangle being a set of three integers which are side lengths). Is there any (reasonable) algorithm to check whether the shapes can be put together to form one big triangle?
By put together, I mean placed on a 2D plane so that - no two triangles overlap. - every portion of every triangle border overlaps with that of some other triangle, or forms the border of the large triangle. - the large triangle has no empty space leftover.
For 3-4 triangles, it makes sense to test cases manually as done here. Is there any way of automatically generating these cases? Also some cases require calculation of angles. Is that to be done using the cosine rule or is there a better approach that won't require floating point (and hence imprecise) calculations.
P.S. This is not a homework problem; I'm just curious.