Skip to content

Instantly share code, notes, and snippets.

@mrflip
Last active January 12, 2026 08:07
Show Gist options
  • Select an option

  • Save mrflip/a973b1c60f4a38fc3277ddd57ce65b28 to your computer and use it in GitHub Desktop.

Select an option

Save mrflip/a973b1c60f4a38fc3277ddd57ce65b28 to your computer and use it in GitHub Desktop.
Ancient Greek Geometry walkthrough / answers / cheats

Solutions for Ancient Greek Geometry (https://sciencevsmagic.net/geo)

Most solutions taken from the about thread. See the comments below for more additions since my last check-in.

Polygons

Circle Packs

Circumscribed Polygons

Non-Constructible Figures

Abuse of floating-point math can make the widget approve non-constructible polygons (polygons with edge count 7, 9, 11, 13, 14, 18, 19, 21, 22, 23, 25, 26, 27, 28, 29, 31, 33, 35, ..., which cannot be precisely constructed using straightedge and compass):

@Eddy119
Copy link

Eddy119 commented May 6, 2020

Hmm... is my construction of the 17-gon the fastest (least amount of moves) for drawing it inside the origin circle?

@mrflip
Copy link
Author

mrflip commented May 6, 2020

Yes it still is! Will update. You can save a lot of moves by doing the star trick -- instead of drawing all the scalloped circles and then the lines, get two edges to intersect at the points of the 17-sided star, and then walk them around the shape.

@Eddy119
Copy link

Eddy119 commented May 6, 2020

I guess you're not going to add any more approximations? Is there an easy way to make approximations for an n-gon?

@Eddy119
Copy link

Eddy119 commented May 7, 2020

If you check the Wikipedia article on the 17-gon, it says that another more recent construction is given by Callagy, and the source is here: https://www.jstor.org/stable/3617271 (if you need to go over the paywall I have a copy from my university account)
It finds the central angle of the 17-gon directly, but I'm not sure if it's faster...
Maybe this is faster?

@Eddy119
Copy link

Eddy119 commented May 7, 2020

@mrflip
Copy link
Author

mrflip commented May 7, 2020 via email

@Eddy119
Copy link

Eddy119 commented May 8, 2020

I guess the next challenge is the 51-gon!
I gave up on the 13-gon... Still looking for a nice simple construction that tricks the code... Please send here if anyone finds one
Also, anyone know how small the error has to be to trick it?

@Eddy119
Copy link

Eddy119 commented May 8, 2020

Well, to construct a 13-gon, you have to trisect a certain angle... check http://web.archive.org/web/20151219180208/http://apollonius.math.nthu.edu.tw/d1/ne01/jyt/linkjstor/regular/7.pdf out for 3θ (3 times the desired angle) or https://commons.wikimedia.org/wiki/File:01-Dreizehneck-N%C3%A4herung.svg for a very good approximation... I tried to do both but I just couldn't...

@Eddy119
Copy link

Eddy119 commented May 8, 2020

Once we know how to approximately trisect an angle well enough to trick the website, we can pretty much make all of the polygons up to 40 except 23, 25, 29, 31

@Eddy119
Copy link

Eddy119 commented May 8, 2020

41, 43, 47, 53, 59, 67, 71... basically all the prime numbers that are neither fermat primes nor pierpoint primes

@Eddy119
Copy link

Eddy119 commented May 8, 2020

51-gon should be constructible as it is 17*3 and (2^n)*, 3* or 5* (7, 9, 11, 13, 19 , 37) should be approximately constructible as 7, 9, 11 is already done and 13, 19, 37 are pierpoint primes

@Eddy119
Copy link

Eddy119 commented May 8, 2020

Should be recognised by website except Bold:
2 (...)
3 (fermat no.)
4 (2^2)
5 (fermat no.)
6 (3*2)
7 (approx. constructible, pierpoint prime)
8 (2^3)
9 (3^2, approx. const.)
10 (5*2)
11 (approx. constructible as shown by me)
12 (3*2^2)
13 (should be approx. const. , please share, pierpoint)
14 (7*2, approx. const.)
15 (7*5)
16 (2^4)
17 (fermat prime, next fermat is 257)
18 (9*2, approx. )
19 (pierpoint, should be approx. const., please share)
20 (5*2^2)
21 (7*3, should be approx. please share)
22 (11*2)
23 (not pierpoint, if someone can approximate this, congrats, please share) 2025 update: @Doomslug682 did it below! copying for redundancy
24 (3*2^3)
25 (5*5, not pierpoint, if someone can approximate this, congrats, please share) 2025 update: also by Doomslug682 above, backup
26 (13*2, please share 13)
27 (9*3, should be approx. const., please share)
28 (7*2^2)
29 (not pierpoint, please share)
30 (5*2*3, please share)
31 (not pierpoint, please share)
32 (2^5)
33 (11*3, approx, please share)
34 (17*2)
35 (7*5, approx const because one is pierpoint and other is fermat)
36 (2*2*3*3, approx)
37 (pierpoint, approx)
38 (19*2, please share)
39(13*3)
40 (5*2^3) ...
41 (not pierpoint, please share)
42 (7*2*3, please share)
Italic involves trisecting an angle and Bold can't be made either by bisecting nor trisecting

@mrflip
Copy link
Author

mrflip commented May 10, 2020

Thanks Eddy! I'll batch these up at some point. I found a new (for me) trick when stellating a polygon to fill out the edges: a diameter of the circle goes through the points of the star, so if your construction can naturally have two diameters with enough of an angle spread you can avoid drawing a circle to reflect the vertices off. You can see that in the 20-gon solution I just put up, where it saves one move.

@Eddy119
Copy link

Eddy119 commented May 10, 2020

I'm not sure how floating point math works but I guess it results in some less approximate constructions being recognised and some more approximate constructions not being recognised.

@Ian-Zander
Copy link

Ian-Zander commented May 2, 2025

Could you use the spiral of Theodorus to create any-sided* shape?

@Ian-Zander
Copy link

@Doomslug682
Copy link

7-gon (made from 14-gon)
7-gon

23-gon (made by trigonometry [taking the tangent])
23-gon

25-gon (trig)
25-gon

@Doomslug682
Copy link

Doomslug682 commented Sep 10, 2025

26-gon (half of 13-gon)
26-gon

27-gon (trig)
27-gon

28-gon (from 14-gon)
28-gon

@Doomslug682
Copy link

30-gon (from 5-gon)
30-gon

32-gon (from 16-gon)
32-gon

33-gon (from 11-gon)
32-gon

@Eddy119
Copy link

Eddy119 commented Sep 10, 2025

nice!
seems like 27-gon isn't recognized tho?
(I'm alive, i don't even remember what i did 5 years ago fully)

@Eddy119
Copy link

Eddy119 commented Sep 10, 2025

Next challenge is 23-gon and 25-gon in origin 😈

@Eddy119
Copy link

Eddy119 commented Sep 10, 2025

33-gon (from 11-gon) 32-gon

Wrong link? link is also 32-gon

edit: 33-gon is interesting because it's not a constructible polygon; 11 is already an approximation and trisecting that is another approximation, so hopefully @Doomslug682 comes back and gives us his 33-gon

edit 2: i just realized once you trisect a side of a 11-gon (line trisection can be done exactly), that's a 33-gon

edit 3: no it does not, if trisecting a side of a triangle gives you a nonagon, a nonagon (9-gon) would be constructible but it isn't... Doomslug682, please give us your 33-gon, even better would be explanations...

edit 4: new hypothesis: if you can approximate a non-constructible n-gon closely, you can also approximate a non-constructible n⋅m-gon, where m itself is constructible. edit/hypothesis 4.2: the n⋅m-gon will have the same amount of error as the n-gon. edit 4.1: you can overlay 2 fermat prime polygons together to get F_1 * F_2 gon, e.g. 5 * 3 for 15-gon but not 3 * 3 or 5 * 5 tho. (edit 4.1 is proven knowledge, Gauss-Wantzel Theorem) edit 4.1.1: for distinct Fermat primes p,q one can subtract integer multiples of 2π/p from 2π/q and bisect suitably to obtain 2π/(pq), so the pq-gon is constructible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment