The True Megagon and The Thai Wizard
Sometimes I’ll get a great comment on one of my videos - a comment that really gets what I’m talking about and raises interesting points - and I’ll think “Oh awesome, a new cool person, I should try to bring them in and introduce them to people and so on”, and then I find it’s the alt account of someone I’ve known for years.
This is often the way when I find something great that’s relevant to my specific interests. When I go to see who’s responsible, I’m slightly disappointed to find that it was done by someone I already know.
The Megagon
A Megagon is a polygon with a million sides. They're sometimes used as an example in philosophical discussions, because it's basically a circle for any practical purpose, but it's importantly, mathematically, very much not a circle. It's an example of a well defined concept that nonetheless can't be visualised.
Wikipedia has a nice page about the megagon, from which you can learn, amongst other things, that if you made a megagon the size of the Earth, the edges would be about 40 metres long, and it would be very hard to notice the 0.00036 degree angle between adjacent sides.
The Treachery of Images
But, thanks to Chana Messinger (inventor of the term "Steel-man"), and Rob Bensinger, I came to learn a very disturbing fact about that wikipedia page.
The image used to represent the megagon, a shape whose main claim to noteworthiness is that it’s not just a circle, is just a fucking circle!
I was outraged. Certainly, a megagon will necessarily render on the screen as a circle, but Wikipedia images can be vector files. As an SVG, it can be a real megagon behind the scenes. It’s totally unacceptable to have the SVG internally represent the data as a simple circle.
I resolved that I would fix this. Probably there was some reason why the Wikipedians had taken this cowardly cop-out - perhaps normal vector editing software can’t do it - but I wasn’t going to let that stop me.
First, I checked that I couldn’t just do it the obvious easy way and make the shape with Inkscape.
It couldn’t do more than 1024 sides. That’s fine, SVG is a simple enough XML-based format, you can write Python code to generate the correct file directly. That’s quite easy to do, and I did it quite easily.
The problem is, the resulting file was huge (for an SVG), at 21MB.
Visualising it was a little tricky.
Inkscape was happy to open the file, but I suspect it was taking some shortcuts.
The GIMP can also open SVGs, but did not prove strong enough to contain the power of The True Megagon.
Firefox could display it correctly, but only very very slowly, and with much whirring of fans.
When I tried to upload the file to Wikipedia to be the image for the Megagon page, they threw me in Noob Jail. I don’t blame them for this; I expect the overwhelming majority of the time that a brand new user account tries to upload a weirdly large file, it’s correct to not let them do that.
I later learned that Wikipedia’s SVG renderer won’t even try to render any file bigger than 8MB.
I couldn’t think of any way to get the file down below that limit. I could zip it of course, but that wouldn’t help, as the renderer needs to operate on the uncompressed file. I could make the individual coordinate numbers shorter, by rounding them to fewer decimal places, but that wouldn’t work either: the vertices of the megagon are so close together that you really need all of the decimal places available. Round off too many, and adjacent vertices start to fall on exactly the same point, which makes it not a real megagon at all.
And even if I could get the file small enough somehow, Wikipedia’s renderer would almost certainly fail anyway, like Inkscape or The GIMP.
Hope was lost. My goal, my dream of bringing The True Megagon to The People, was truly beyond my reach. I was defeated.
At dawn, look to the East
More than a year later, I was revisiting the site of my defeat, as I often did, idly picking at an old wound that might eventually heal one day if I could just stop opening it up again.
Imagine my surprise when I found that the page had been updated. A new file had replaced the acursed circle, and this one claimed the Mantle of the Rightful King, the True Megagon, foretold in legend!
Furthermore, imagine my astonishment at seeing the file size! Less than 8 megabytes, yes, less than 8 kilobytes! A miniscule 4KB file!
This was a work of deeper wizardry than any I knew of.
And on the file listing, these words appear:
Source: https://neizod.dev/locales/2021-05-27-megagon-and-sum-of-product-upto-index.html
I followed the link of course, and found this:
After asking Google to decipher the moon runes, I started to comprehend what had happened.
Our hero, who goes by the name Neizod, has since uploaded an English translation, so I will commend you to his blog rather than duplicating his explanation here. I assure you, it is very clever.