How many rectangles fit in a triangle?

  • Context: Undergrad 
  • Thread starter Thread starter benbenny
  • Start date Start date
  • Tags Tags
    Fit Triangle
Click For Summary

Discussion Overview

The discussion revolves around calculating the maximum number of whole rectangles that can fit into a triangle, given the lengths of the triangle's sides and the dimensions of the rectangles. The conversation explores various mathematical approaches and assumptions related to the problem, including orientation restrictions and potential algorithms for solving it.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant inquires about the calculation method for fitting rectangles into a triangle, specifying the dimensions involved.
  • Another participant asks about the application and any restrictions that might simplify the problem.
  • A participant proposes a formula for calculating the number of rectangles that can fit, noting that it only considers rectangles in portrait or landscape mode and not in combination or diagonally.
  • It is suggested that every rectangle should ideally have one side collinear with a side of the triangle or another rectangle, proposing a recursive algorithm to explore possible positions for the rectangles.
  • A clarification is requested regarding the term "straddle t2," leading to a discussion about the positioning of rectangles relative to the triangle's sides.
  • A different approach is presented that eliminates the straddling assumption but maintains the same orientation assumption, involving a series of calculations based on triangle side rotations and rectangle dimension swaps.
  • One participant expresses uncertainty about the correctness of their proposed method, indicating a potential math error despite confidence in the principle.

Areas of Agreement / Disagreement

Participants express various approaches and assumptions regarding the problem, and there is no consensus on a single method or solution. Disagreements exist about the implications of rectangle orientation and positioning within the triangle.

Contextual Notes

Some limitations include unresolved mathematical steps, the dependence on specific assumptions about rectangle orientation, and the potential for errors in proposed calculations.

benbenny
Messages
38
Reaction score
0
Does anyone know how one could calculate the maximum number of whole rectangles that can fit into a triangle.

Say you know the length of the sides of the triangle (t1,t2,t3) and the of the sides of the rectangle (r1,r2).

Thanks.
 
Physics news on Phys.org
What's the application? Are there any other restrictions that would make it easier?
 
Ive come up with this so far. It only allows to fit the rectangles in portrait or landscape mode, not a combination of both, nor diagonally.

Any triangle can be made into two right triangles (I think).

A given right triangle has bases t1,t2, and hypotenuse t3.

The number of rectangles (r1,r2) that can fit in the first row in the triangle is

N = \downarrow \frac{[(t1-r1)\frac{t2}{t1}]}{r1}

(down arrow denotes rounding down to nearest integer)

The total number of rectangles that can fit in the triangle is then:

N = \Sigma_{n=1} \downarrow \frac{[(t1-nr1)\frac{t2}{t1}]}{r1}

where the sum is from n=1 until the outcome of the expression is zero (I don't know how to denote this mathematically).

This needs to be done twice, the second time you switch between r1 and r2, to find out if landscape or portrait offers the bigger solution.
 
That'd be a nice way if you could prove that they will all be stacked in the same orientation as each other. And allow them to straddle t2.

It seems intuitive that every rectangle should have one side collinear with a side of the triangle or another rectangle, and should be slid up against a side of something. So maybe you can do it with a recursive algorithm that tries every possible position of each new rectangle being added - that won't be too many because there's only a finite number of sides for them to be parallel with, and only a couple of positions along those sides.
 
What do you mean by "straddle t2"?

Thanks for the input!
 
I mean one side of the rectangle is on each side of the perpendicular line (which I think you called t2) that cuts the triangle in two. It seems like your formulae require all rectangles to be butted up against this line.

By the way "floor" and "cieling" functions force rounding down/up. \left\lfloor 3.4 \right\rfloor \left\lceil 3.4 \right\rceil
 
Ok, so here is one way to do it that gets rid of the straddling assumption. But it does not get rid of the same orientation assumption.

If the triangle sides are a,b,c. The number of rectangles that can fit would be

\Sigma_{n=1} \downarrow\frac{d_{n}}{R_{2}}

where

d_n = a - ( \frac{nR_1}{tan(arccos(\frac{-c^2 +a^2+b^2}{2ab}))}+ \frac{nR_1}{tan(arccos(\frac{-b^2 +a^2+c^2}{2ac}))})

Now you have to rotate a-->b b-->c c-->a carry out the calculation again, than rotate again and do it again. You also need to do it twice with R1<-->R2 for every rotation. In total this gives 18 calculations and the biggest figure is the max number of whole rectanlges that can fit.

Its not the most elegant way of doing it, but you can apply it in excel to get quick results.

I haven't tested it yet, so although I am pretty sure about the principle of it, there may be a math error.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 32 ·
2
Replies
32
Views
2K
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
755
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
2
Views
3K