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):

@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.

@mrflip
Copy link
Author

mrflip commented Sep 10, 2025

Good to see these still coming in.
Are any of these artifacts of floating point or are they all exact?

@Eddy119
Copy link

Eddy119 commented Sep 10, 2025

i think all non-constructible polygons should theoretically be floating point since mathematically it's not exact? I'm not sure what numbers the computer calculates and detects, but as in the main post and Wiki, constructible polygons are mathematically defined (by the "the Gauss–Wantzel theorem").

So, from the number list in the main post, I think 30-gon and 32-gon could be exact if Doomslug682 did it right (could also be approximations though, need to check actual construction to verify, at a glance I'm guessing they're exact), the rest has to be approximations

32-gon should be hard to fake, it's just bisecting an octagon repeatedly

Haven't done this in a long time...

P.S. (don't want to email ping) 23 and 25-gon might be impressive because according to past me (I forgot) trisecting angles can be very closely approximated, but 23 and 25 can't be done that way, so Doomslug682 did it some other way, I forgot everything though!

P.P.S. ugh this link is dead for me... http://web.archive.org/web/20151219180208/http://apollonius.math.nthu.edu.tw/d1/ne01/jyt/linkjstor/regular/7.pdf
P.P.P.S. it's back, seems like Internet Archive was down momentarily

@Eddy119
Copy link

Eddy119 commented Sep 10, 2025

If you look at Doomslug682's constructions of the 23-gon and 25-gon, the polygon is huge compared to the origin line, probably has to do with floating point trick, not sure

@Eddy119
Copy link

Eddy119 commented Sep 11, 2025

28-gon in 64 moves

Edit:
Also 28-gon in 64 moves,
Literally the same thing, just used circles instead of lines for the last few sides

@Eddy119
Copy link

Eddy119 commented Sep 11, 2025

26-gon in 104 moves
just got rid of the inscribed 13-gon before bisecting

@Doomslug682
Copy link

Okay, here's the 33-gon
33-gon

@Doomslug682
Copy link

I created the 23- and 25-gon by calculating the tangent of the internal angle of one side of the polygon, and then constructing two lines at right angles that had that ratio to each other to, like, 5 decimal points, than connected the loose edges and used the angle I got to construct the polygon.
As far as I know, the link for the 27-gon will not work, because it always ends up scrambled when I try to use the link. It may just be that my device (a Chromebook) is having trouble copying the link, so if you want to try to finish it yourself, the angle of the polygon is intact.
This is the link to the pattern before it went crazy. Hope this helps!

@Doomslug682
Copy link

More polygons!

38-gon
38-gon

42-gon
42-gon

60-gon
60-gon

64-gon
64-gon

96-gon
96-gon

114-gon
114-gon

@Eddy119
Copy link

Eddy119 commented Sep 11, 2025

Amazing! Based on what I see, you've discovered that there is already a 33-gon side length in that 11-gon approximation!
33-gon in 87 moves, I just did some simple optimizing of Doomslug682's 33-gon by removing the already done 11-gon etc

Floating point is weird, if there are >=2 very close points together you can only build with one of them and that might decide whether the shape is recognized or not

Maybe someone can figure out optimizing by doing mrflip's star technique;
Also next challenge is 29-gon :D
Regarding spiral of Theodorus, I have no idea.

Edit: Posted this before seeing the 23- and 25-gon explanations, and 38- more polygons, will check

@Eddy119
Copy link

Eddy119 commented Sep 11, 2025

114-gon... 251 moves... crazy...

3,4,5,6,8,12-gons are visible built-in challenges, 1-gon cannot exist (2-gon can for some reason), we made all polygons up from 2 till 28; and Doomslug682 made 30, 32, 33, 38, 42, 60, 64, 96, 114; 40 challenges are built-in, counter says 70/40 challenges completed; 70 challenges -minus 40 built-in challenges = 28 (made all up till 28-gon) + 9 (Doomslug extras) - 6 (polygons built-in) -1 (nonexistent 1-gon) = 30 extra invisible challenges done so far, nice
EDIT: ah, didn't think about 27-gon, seems like it's not registered when I open link but it still says 70/40 so my maths might be incorrect

Re: tangent technique for 23- and 25-gon, I wonder if/how we can get the polygon in-origin? Also again, next challenge is 29-gon

Also I wonder the technical and mathematical background and meaning behind our floating-point abuse;

and how the beaten challenge methods are stored locally (I can't find it in cookies)

@Eddy119
Copy link

Eddy119 commented Sep 12, 2025

Would be cool if the game had code for detecting all n numbers of packed circles and other things (what could they be)? Maybe it can also refer to Euclid's Elements as a tutorial book
(Good version of Euclid's Elements)

@Eddy119
Copy link

Eddy119 commented Sep 12, 2025

Think I should post this separately rather than edit my existing posts:

Made-up hunch hypothesis 1 from 2020: Neusis-constructible polygons (including pierpont primes) are easier to approximate with compass and straightedge than the one's that aren't (e.g. 23-gon).

If that is true, the below hypotheses become relevant...
Hypothesis 2: 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. Hypothesis 2.1: the n⋅m-gon will have the same amount of error as the n-gon.

Already proved and known Theorem:
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. e.g. 5 * 3 for 15-gon but not 3 * 3 or 5 * 5 tho. I think this forms part of the Gauss-Wantzel Theorem.

Fun facts: Benjamin and Snyder showed in 2014 that the regular 11-gon is neusis-constructible, meaning a compass and marked ruler can construct it. Seems like there's no methods yet though. The 23-gon (icositrigon) is the smallest polygon that is not neusis constructible, meaning even a compass and marked ruler can't construct it.

Are there any software that automatically shows these geometric constructions in algebraic formulae? Maybe GeoGebra, idk...

@Eddy119
Copy link

Eddy119 commented Sep 14, 2025

Well, I'm trying to make a logger for the game, idea is we can get algebraic/symbolic forms of the lengths/ coords/ angles:
https://github.com/Eddy119/Ancient-Greek-Geometry-Logger

I just emailed Nico (the creator of this game) to ask how to make this thing (because my programming knowledge is basic so I'm asking ChatGPT a lot) and if we can have his code on GitHub so we can add features together.

Also other ideas: n number of packed circles (with detection), and neusis construction option in game.

@Eddy119
Copy link

Eddy119 commented Sep 14, 2025

P.S. also, if we have an official GitHub we can have an official leaderboard i.e. solutions board, and documentation there.

@Ian-Zander
Copy link

@Ian-Zander
Copy link

Ian-Zander commented Sep 17, 2025

57-gon in 194 moves using Doomslugs 114-gon
https://sciencevsmagic.net/geo/#1A0.0L1.1L2.2A1.2L5.5A2.5L8.8A5.8L11.11A8.11L14.14A11.14L17.17A14.17L20.20A17.21L22.15L16.0A1.0L28.27A0.1L27.27L32.32L0.33A0.32L41.38L27.41A33.38L52.41L51.51A33.33A34.41L67.41L68.79A41.85L84.95A78.24A25.21A17.17L21.21L139.139L20.139L144.0A144.20L151.151L117.151A117.117A151.235L234.8A255.277A255.255A277.283L8.283L293.25L290.290A25.0L393.393A25.25A393.N.290A25.393A25.25A393.388A393.462A25.556A462.388L598.556L508.508A388.598A556.393L720.676L462.676A508.25L817.393A720.889A393.388A598.915A388.508A556.941A508.676A462.971A676.817A25.N.915A290.924A290.556A290.508A290.941A290.953A290.462A290.676A290.971A290.981A290.25A290.817A290.1007A290.720A290.393A290.889A290.904A290.598A290.388A290.1214A915.2436A1214.2440A2436.1155A388.2448A1155.2456A2448.1101A598.2466A1101.2472A2466.1041A904.2482A1041.2486A2482.2381A889.2492A2381.2496A2492.2311A393.2506A2311.2518A2506.2238A720.2532A2238.2540A2532.2158A1007.2552A2158.2556A2552.2081A817.2564A2081.2571A2564.1993A25.2588A1993.2604A2588.1904A981.2627A1904.389A2627.1813A971.2643A1813.2649A2643.1734A676.2659A1734.2665A2659.1665A462.2677A1665.2686A2677.1587A953.2696A1587.392A2696.1501A941.2712A1501.2716A2712.1413A508.2724A1413.2731A2724.1342A556.2741A1342.2748A2741.1277A924.2762A1277.406A2762.N.953L2696.2696L2706.2706L941.953L2690.941L2712.2712L2718.2718L508.508L2724.2724L2735.2735L556.556L2741.2741L2754.2754L924.924L2762.2762L2772.2772L915.915L2436.2436L2442.2442L388.388L2448.2448L2460.2460L598.598L2466.2466L2476.2476L904.904L2482.2482L2488.2488L889.889L2492.2492L2498.2498L393.393L2506.2506L2526.2526L720.720L2532.2532L2546.2546L1007.1007L2552.2552L2558.2558L817.817L2564.2564L2579.2579L25.25L2588.2588L2617.2617L981.981L2627.2627L2637.2637L971.971L2643.2643L2653.2653L676.676L2659.2659L2669.2669L462.462L2677.2677L2690
I can figure out the link compression (I'll work on it)

@Eddy119
Copy link

Eddy119 commented Sep 27, 2025

Ok, I just got the nonagon (9-gon) down from 34 to 31 moves OLD NEW² UPDATE: nonagon aka 9-gon in 27 moves

Since I'm posting, gonna post the other things I've been up to:

  1. As for my symbolic logger attempt, I can't find a algebra library that can rationalize the denominator, so the logger freezes when it outputs and works with $\frac{7985/4 + (3571/4)\sqrt{5}}{(2+\sqrt{5})^6}$ instead of $\frac{5-\sqrt{5}}{4}$ for $\cos\left(\frac{3\pi}{5}\right)+1$, for point 14 here on a pentagon with top point at (0,0) centered in a unit circle centered at the right origin point (1,0).
    If any of you guys have a clue on how to fix this, please help me... I gave up for now. I wrote up about this issue here.
  2. The 11-gon is neusis constructible (this game doesn't have neusis) according to this paper, but I found only one claimed construction method, which is on Reddit, and it involves fitting a circle, which is a bit more than neusis, which you fit a line of a specific length between two lines or circles or a circle and a line. If you guys can find a way to do an exact neusis construction, please tell me here...
  3. I tried emailing Nico (twice) if I can fork his game etc, but he still hasn't replied. Should I worry about copyright, if I want to modify and add more features, to the game, maybe make a v2...
  4. There's a similar (copyrighted) game to this called Euclidea.
  5. Edit: I/we should figure out the star trick for Doomslug682's polygons... later...

@Eddy119
Copy link

Eddy119 commented Oct 2, 2025

Here's a 17-gon done with Carlyle circles in 58 moves
Update: 57 moves
Update 2: 55 moves
Update 3: I figured the star trick out, now it's 49 moves, same as the Richmond method; Update 4: identical but prettier version

Sources: https://commons.wikimedia.org/wiki/File:01-Heptadecagon-Carlyle_circles.svg https://commons.wikimedia.org/wiki/File:Regular_Heptadecagon_Using_Carlyle_Circle.gif

Not sure if this method can potentially beat our existing 45/49 in-origin record, I'll paste this in case someone wants to try doing the star trick or other move optimizations, I'll try later

Update: I think it's theoretically possible to use Carlyle circles to get the 5th vertex (cos(10pi/17)) of the 17-gon, and this method might take less than 49 moves to complete; I'll have to learn how to draw Carlyle circles though.

Update 5: https://web.archive.org/web/20151221113614id_/http://apollonius.math.nthu.edu.tw/d1/ne01/jyt/linkjstor/regular/1.pdf the paper that contains this method also mentions the method can be simplified so if we do that and directly find the 5th vertex (or really any vertex on the "left" side), we might be able to save a lot of moves

Also, regarding the neusis of 11-gon paper (not this game): if we found out a way to solve cubics like we can solve quadratics with Carlyle circles, it's a matter of constructing u, then solving/constructing/doing neusis for "the rest" (easier said than done).

@Eddy119
Copy link

Eddy119 commented Oct 2, 2025

Right, I followed the simplifications in this paper and managed to reduce the move count for the 17-gon in origin to 44 moves.
https://sciencevsmagic.net/geo/#1A0.0A1.0L1.3L2.1A6.6A0.11L10.14A0.0L12.12L25.25L1.1L28.1L9.9L4.10L24.24A12.0L41.N.41A25.42A25.4A55.55A4.97L98.104A1.1A126.1L146.146A1.N.170L169.4L72.72L146.198A25.N.225A1.1A225.271L270.290L4.4L291.291A4.357L291.291L384.4L384.1A384.290L436.357L439.291L438.438L357.357L468.439L450.450L493.468L480.480L521.493L506.4L437.437L290.290L571.506L547.521L534.534L598.547L587.587L420.598L614.614L655.420L638.638L687.655L673.673L716.687L705.705L749.716L734.734L786.749L769.769L571.436L786

I suspect if we solve for the 5th vertex instead and do a version which is not in origin we can reduce the move count even further.

Update: Gonna try to solve for vertices 10,11,7,6 3,5,14,12 since they're next to each other so it's easiest to star...

Update 2: Another 44 move in-origin 17-gon using 3rd and 5th vertices UPDATE 3: 43 moves:
https://sciencevsmagic.net/geo/#1A0.0A1.0L1.3L2.1A6.6A0.11L10.14A0.0L12.12L25.25L1.1L28.1L9.9L4.10L24.24A12.0L41.N.41A25.42A25.6A71.1A78.96A1.112L113.55L96.144A25.N.174A1.1A174.220L219.220L238.219L239.1A0.239A4.238A254.254L288.254L314.1A314.288L348.348L4.4L364.356A4.356L365.365L238.356L393.365L412.238L411.365L394.393L288.288L436.412L424.424L459.459L394.436L364.314L493.493L520.520L4.4L545.545L254.254L568.568L513.513L597.597L535.535L625.625L560.560L653.653L238.238L682.682L614.614L710.643L471

Trying to figure out 6th and 7th vertices right now... Update 3: Seems like using the 3rd vertex is the simplest

@Eddy119
Copy link

Eddy119 commented Oct 3, 2025

If you double the circle that the 17-gon will be inscribed in instead of quartering the origin circle in the beginning, you can get 39 moves.

Not sure about other simplifications that can be done if 17-gon not drawn in origin circle, please share any progress.

@Eddy119
Copy link

Eddy119 commented Oct 3, 2025

Star trick optimizations:
9-gon, in-origin, approx, in 27 moves
11-gon, in-origin, approx, in 38 moves
Others here, please feel free to simplify the other ones through the star trick or other methods.

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