#ThisWeeksFiddler, 20260925

This week the #puzzle is: Can You Frame the Triangle? #trigonometry #triangle #circumscribe #montecarlo #coding #minimum #average

Congratulations—you just won your school’s tabletop football championship! You flicked your lucky paper football to victory countless times, and would now like to frame it for posterity.
The football is an equilateral triangle with a side length of 1 inch. What is the side length of the smallest square frame that will contain the football?

And for extra credit:

To add a little excitement to the framing process, your new plan is to spin the triangular football by a random angle, and then frame it with a square that is not rotated. That is, the square consists of two perfectly horizontal sides and two perfectly vertical sides.
On average, what can you expect the side length of the smallest resulting square frame to be?

Can You Frame the Triangle?

Solution, possibly incorrect:

Desmos Program

Checking… Yeah, this is a triangle, where all 3 sides have the same length.

My sense is, that this square will have side length 1 inch. But let me just check. Oh, that’s not right. Messing around with Desmos gives me something like 0.966. This is achieved, when 1 side of the triangle has exactly a 45 deg angle on the horizontal and vertical axes. This was actually fun. To go from an angle to a triangle, to a circumscribed rectangle, to a circumscribed square. Visit Desmos to see an animation!

So that’s method 1. Method 2 is monte carlo (where it’s kind of overkill to have a variance check, I’m looking for a minimum). Result confirmed.

0.966 inches.

And for extra credit:

The easiest is to let the monte carlo register a lot of squares and take the average. (It was already registering a lot of them and taking the minimum.)

======================================
Number of loops.... 5 * : 32010
Target deviation........: 0.0001000
Deviation so far........:
................result 1: 0.0000029
................result 2: 0.0000886
======================================
Final result 1..........: 0.9659279
+/- 0.0000029
Final result 2..........: 0.9886172
+/- 0.0000886

0.989 inches. This makes sense, as being between the minimum and 1.

Skriv en kommentar