This is a simple web app that I created after seeing Mathologer's video about Tesla's 'Vortex Mathematics', which he believed held the secret to the universe. In reality, these shapes just come from mathematical properties relating to modular arithmetic. I am (tangentially) learning about this in my introduction to cryptography class, so I figured it would be fun to implement the program that Mathologer mentioned in his video. It was a good excuse for me to learn some about Flask and NetworkX, two Python packages I used to generate the graph.
- Dynamic graph generation based on modulus and multiplier
- Edge coloring based on the 'distance' that it covers (e.g., from 1 to 5 is a distance of 4)
- Functional webapp
- Color each loop individually
- Faster image generation
- Cleaner webapp UI
I don't have a way to host this, since GitHub Pages won't serve dynamic pages. Instead, if you are interested in playing with this, you can run the Flask server on your own machine by following the instructions below:
$ git clone https://github.com/allys7/modular-cardioid-generator.git
$ cd modular-cardioid-generator/
$ python -m pip venv env/
$ source ./env/bin/activate
$ pip install -r ./requirements.txt
If that is too much work for you and you just want to make pretty pictures, check out these implementations by others:


