Domain: MathIsBeautiful.net

Inspiration

I once was told that the more confusing math becomes, the more elegant it is to the understood eye. It might seem like chaos and magic to one person, but to a well trained mind and eye, it becomes an intricate series of patterns. This is a playful utility that lets you experience the patterns for yourself.

What it does

There is no graph, no strict equations, no scary derivatives, or weird set theory, just a canvas and a few inputs where you can put whatever your heart and mind desires (within reason). Simply give it an equation for R, G, B with parameters of x and y, and see what gets draw onto the canvas in front of you. It might take a minute or two since this is quite a sizable number of calculations, but it'll come to fruition.

How I built it

This is built using symbolic calculations courteous of sympy and language processing courteous of antlr4. It takes a plain text input, turns it into latex and then turns that into symbolic computation that can be ran several hundred thousand times until you get an image you can be proud of and have a serene view to see.

Challenges I ran into

Language processing is hard. Especially when it has to be accurate or your calculations are wrong. Furthermore, there is a lot of things that simply don't exist such as a competent way of converting latex expressions into a function that can be ran hundreds of thousands of times. This was not an easy task and when I got it working, it took nearly half an hour. It was so gratifying to get this done to less than a minute for most equations.

Accomplishments that I'm proud of

I was able to drastically increase performance and make my model work. I was so nervous I was going to have to resort to a hard to understand way of entering data. I am so very pleased that this can be shared by anyone and anyone can see the beauty in the math that is transcribed on a canvas in front of you. It truly is beautiful and truly anyone can experience it.

What I learned

I learned so much about language processing and the thrills and challenges with turning text into math notation and then turning that into latex and then turning that into a function I can run so many times. It is amazing what can be done with a little effort and a collection of several terms and words. I never used antlr4 before this and I didn't even knew it existed. There was a lot of symbolic computation I had never done before either and the fact that it all meshed together to work is honestly impressing me still.

What's next for Math is Beautiful

I want to make it accessible

Built With

Share this project:

Updates