Ahh, Irrational Art. One of my early web development projects. This project was inspired by a project from 2015 called The Art in Pi by Nadieh Bremer (link). Nadieh created a script that generated a PDF 'map' of the digits of Pi. I found myself inspired by this project, but I also wanted to have more interactivity rather than only having a static PDF available. To accomplish this, I decided to use vanilla JavaScript, and the HTML Canvas element. I also realized that there was no practical reason this project needed to be limited to Pi, so I added some of the other more famous irrational numbers (namely: E, Phi, Root Two). I also decided to integrate some additional functionality that would allow users to use any arbitrary sequence of digits, and to allow users to select how many digits should be displayed.

The original project by Nadieh utilized up to 1,000,000 digits of Pi, however I found that anything substantially above 20,000 digits would end up lagging so much as to be unuseable on my computers, so I limited the viewport to only display up to 20,000 digits. During development of this project, I needed to learn about the HTML canvas element and how to draw in it, how to process text files in JavaScript, and how to handle interactive controls in a canvas element - which is an entirely manual process!