ʕ•ᴥ•ʔ Insights into Tech, Data, and Life ʕᵔᴥᵔʔ

Learning manim Over the Weekend

👋, if you just want to see the animation I created, check it out here.


I used to ponder the following: "When can I finally say that I've mastered a programming language?". When I was learning to program in python and JavaScript , I was astonished at the breadth and depth of what you could perform with them. Coders were crafting chatbots, writing eye catching animations, and modeling partial differential equations. Could I ever hope to learn it all?

I've learned over time, that no one can learn it all. The best one can do is to clarify the problem they're attempting to solve, and then select the tech stack and programming libraries that works best for that problem.

And sometimes, I feel like trying something different. An acquaintance of mine, Matt Cremins, challenged me to make a cool animation over the weekend. Now, I could have chosen the easy way out and used a few powerful libraries in JavaScript to accomplish the task, but I sought to challenge myself.


I find that challenging myself to attempt tasks in novel ways introduces me to new ways of thinking. It keeps my mind fresh so that when I encounter new, difficult problems, they're not so intimidating because I don't fear lurking in unfamiliar waters.

Before I generated a single line of code, I had to prepare my work environment for the task ahead. This includes downloading all the programs and dependencies that manim, the python library I decided to use, relies on. Now, python isn't particularly well known as a language used for animation, however I heard it could be done and was curious to try it out.



Image Credits - Fig.2 - 4K Mountains Wallpaper|

One nugget of wisdom I have gained with the passage of time is that setting up your environment for the specific programming task you need to complete can often be more difficult than the actual programming task itself. Depending on the library of the language your using, you might have to download dependencies, modify path variables, and dive into bad documentation to extract as much direction as you can. Over time I've become less intimidated with setting up difficult environments because I've done it repeatedly, and I know where to go for assistance when I'm absolutely stumped. I say all this because setting up my environment to run manim turned out to be an absolute nightmare.


After wading through documentation and unclear YouTube videos for a while, I was set to hop into the official community manim discord server and bug one of the mods to help me with the install on windows. Before doing that, I browsed YouTube for a little while longer and discovered this godsend of a video, which describes how to run the dockerized version of manim.

What is docker? In the simplest way I know how to explain, docker is a program/suite of tools which allows developers to easily run and manage the programs and tools they're creating. Furthermore, it packages the unique setup of a work environment, and allows that environment to be shared effortlessly between members of a team. Docker has been a game changer for the dev community.


After finally setting up my environment, I found it was simple to jump in and start coding. While the installation resources generally weren't great, I discovered an abundance of high quality resources with examples of what you can perform in manim. Also, while I'm no python master, I've written a enough cool programs, like an Airbnb clone, to say that I'm comfortable enough with the language to the point where I know what direction I need to take when starting a task.

Writing the text transitions and animations was quite simple. The animation I'm most proud of was the intro screen(check the code out, here), which required equal parts programming sophistication and math knowledge. I had to re-familiarize myself with trigonometric functions and cartesian coordinates to make a cool transformation. I was delighted that I was finally able to put my math degree to good use. See dad, I told you it would come in handy.

All in all, I enjoyed the project very much. I learned something new, re-familiarized myself with math concepts I haven't touched since college, and uncovered an engaging discord community.


Also, Matt liked the animation. Everybody wins! Check out the animation, here, and check out the code, here . The only thing I plan to do now, is to write more formalized documentation about the project and upload it to my GitHub.

#animation #math #programming #python