All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Shapes
Heptagon in a Square (Posted on 2023-03-07) Difficulty: 3 of 5
Determine the side length of a regular heptagon having the largest area which can fit inside a square with side length 1.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution re: Some thoughts -- a solution | Comment 2 of 13 |
(In reply to Some thoughts by Kenny M)

This program evaluates the horizontal and vertical spaces occupied by the horizontal and nearly vertical chords as they are rotated varied degrees, relative to the side length of the heptagon:

clearvars,clc
centAngle=360/7;
intAngle=180-centAngle;
%calc  chord rel to hept side
liftAngle=180-intAngle;
chord=cosd(liftAngle)*2+1;
%calc diam rel to hept side
hTri=(1/2)/tand(centAngle/2);
radius=(1/2)/sind(centAngle/2);
diam=hTri+radius;
ret=atand((1/2)/diam);
for tilt=1:20
  fprintf('%11.8f %15.13f %15.13f \n',tilt,chord*cosd(tilt-ret), chord*cosd(tilt) )
end
syms tilt
eq=chord*cosd(tilt-ret)==chord*cosd(tilt);
t=solve(eq,tilt);
t
eval(t)
eval(chord*cosd(t-ret))


Its output:

 1.00000000 2.1990356914262 2.2466373778403 
 2.00000000 2.2067584015108 2.2456108044542 
 3.00000000 2.2138089116089 2.2439001962634 
 4.00000000 2.2201850740670 2.2415060743356 
 5.00000000 2.2258849466440 2.2384291679436 
 6.00000000 2.2309067931037 2.2346704143429 
 7.00000000 2.2352490837429 2.2302309584863 
 8.00000000 2.2389104958579 2.2251121526750 
 9.00000000 2.2418899141470 2.2193155561468 
10.00000000 2.2441864310506 2.2128429346013 
11.00000000 2.2457993470273 2.2056962596615 
12.00000000 2.2467281707675 2.1978777082740 
13.00000000 2.2469726193422 2.1893896620453 
14.00000000 2.2465326182902 2.1802347065164 
15.00000000 2.2454083016400 2.1704156303755 
16.00000000 2.2436000118694 2.1599354246083 
17.00000000 2.2411082998009 2.1487972815870 
18.00000000 2.2379339244342 2.1370045940978 
19.00000000 2.2340778527148 2.1245609543077 
20.00000000 2.2295412592394 2.1114701526697 
t =
45/7
ans =
          6.42857142857143
ans =
          2.23285106759513

shows that the optimal tilt is 45/7 of a degree (approx. 6.42857142857143°), at which time the horizontal and verticals are each  2.23285106759513 of the length of a side of the heptagon. Thus the side of the heptagon must be 1/2.23285106759513 or 0.447857904413231 units.



  Posted by Charlie on 2023-03-08 10:36:37
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (10)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information