Samantha’s square courtyard
(total area less than 100 m^2
) has an area equal to an integer number
of square meters. She decides to
install an octagonal fish pond in the
courtyard.
To mark the sides of the
pond, she draws lines from each
corner of the square to the midpoints
of the two sides not touching said
corner. She finds that the perimeter
of the pond, thus delimited, is an
integer number of meters.
What is
the area of the courtyard, and what
is the perimeter of the pond?
Start with a unit square to get the ratio of the side of the octagon to that of the pool.
Theta is the angle between one of Samantha's constructed lines and the nearest side of the square courtyard. Alpha is the angle between one of the constructed lines and the nearest diagonal, having the same apex (A) as theta.
Point B is the midpoint of one of the constructed lines, where it intersects another such line; it is one vertex of the octagon. Point C is an adjacent vertex of the octagon, which lies on the diagonal of the square that contains A.
We need to find angle ABC of the same named triangle in order to find BC, one side of the octagon.
Angle ABC is the vertex of an isosceles triangle whose base is half one of the square's sides. The two base angles are each 45°+ alpha, making ABC = 180 - 2*(45+alpha). Angle ACB is then 180 - alpha - ABC.
Side AB =.5/cos(theta), and BC/sin(alpha) = AB/sin(ACB).
BC is the ratio of the side of the octagon to the side of the square, so we can try out different integral perimeters of the octagon, one eighth of which is one side.
clearvars,clc
% assume unit square
theta=atand(.5);
alpha=(90-2*theta)/2;
AB=.5/cosd(theta);
ABC=180-2*(45+alpha);
ACB=180-alpha-ABC;
BC=AB*sind(alpha)/sind(ACB);
% BC is ratio of side of octagon to side of square
for octPeri = 1:19
octSide=octPeri/8;
sqSide=octSide/BC;
sqArea=sqSide^2;
% if abs(sqArea-round(sqArea))<.00001
fprintf('%17.12f %16.12f %3d %14.12f\n', ...
sqArea,sqSide,octPeri,octSide)
if sqArea>100
break
end
% end
end
---- Octagon ----
Area of Square Side of Square Perimeter Side
0.450000000000 0.670820393250 1 0.125
1.800000000000 1.341640786500 2 0.250
4.050000000000 2.012461179750 3 0.375
7.200000000000 2.683281573000 4 0.500
11.250000000000 3.354101966250 5 0.625
16.200000000000 4.024922359500 6 0.750
22.050000000000 4.695742752750 7 0.875
28.800000000000 5.366563145999 8 1.000
36.450000000000 6.037383539249 9 1.125
45.000000000000 6.708203932499 10 1.250
54.450000000000 7.379024325749 11 1.375
64.800000000000 8.049844718999 12 1.500
76.050000000000 8.720665112249 13 1.625
88.200000000000 9.391485505499 14 1.750
101.250000000000 10.062305898749 15 1.875
Only when the perimeter of the octagonal pond is 10 meters does the area of the square courtyard equal an integer, 45 square meters.
|
Posted by Charlie
on 2024-12-23 12:28:48 |