code

This is one of my favorite projects I’ve made. I wanted an animated profile picture for a social media service I use called Discord. A friend drew this cute astronaut for me so I decided it would be fun to make a quick script so that I could use any text I want. The code itself for this project was not particularly difficult. I manually edited the original drawing into multiple layers that I could manage with python.



Python puts it all together and adds text to the image. Adding the text and making it move was also pretty simple. The challenge with this was making the text look seamless and smooth in a loop. The math itself is not very complicated but unlike in high school there was no guide telling me how to approach the problem, I had all the information I just needed to figure out what to do with it. I ended up just getting a piece of paper and drawing some shapes and numbers to try to get an idea of what I needed to do. After sketching everything out I was able to do some calculations and put everything together.



It works as a pretty simple command line tool where you can just type in the text you want to use and it’ll generate a gif. I later added a feature with a tool called inspiro bot which is an ai that will generate random mindfulness phrases. I just used their python library so that you can generate random gifs from the command line.

Here's what a finished gif looks like, it looks a bit wonky at this size but is fine when scaled down to the size of a proflie picture