|<<>>|10 of 293 Show listMobile Mode

Manim: a bespoke animation editor and engine

Published by marco on

 Manim − linear transformation in 3dThis is a fun video that demonstrates an API, runtime, and IDE called Manim that lets you interactively build 3-D animations. It’s like a game-engine editor[1] in which you build your scenes by calling APIs in Python. There’s an interactive Python terminal, a rendering area, and a text editor.

It’s quite nicely done and he’s put it to good use over the years, building hundreds, if not thousands, of videos with it.

How I animate 3Blue1Brown | A Manim demo with Ben Sparks by 3Blue1Brown (YouTube)

The API is quite high-level and robust but it’s so clear how limited the Python syntax is. He’s very quick with it, but he also knows the whole API by heart. He barely ever used code-completion, so I thought there wasn’t any. But then I saw him hover a few APIs to show the expected parameters. I wonder how much time a novice would spend with interpreter errors. Still, once you’ve gotten used to it, it seems to be pretty efficient. Python’s interpreter speed will never be a problem. In particular, the API for integrating formulae via embedded TeX is pretty neat. It even supports identifying manipulable elements from the rendered version for further animation.

His style of mixing functions and code and variable definitions makes sense for the types of projects he makes. There is going to be very little re-use between these projects. Anything that needs to be reused would eventually be added to Manim itself. He doesn’t seem to see the need for shared libraries. The code is basically throwaway. It takes more time to define common, well-generalized functions than it would to just quickly rewrite it, ready for specialization within that project.

As when watching Kevin Powell ask an LLM about CSS without any idea about how LLMs work, watching Grant Sanderson discuss workarounds for “bugs” without any decent background in languages, scopes, functions, and closures. It’s kind of exasperating watching people “reinvent” computer science without even thinking that there might be prior art—especially clever people.

Good for Grant for making this video, though, because I think he realized that there’s a lot of room to grow in programming skills. He’s already noticed that LLMs aren’t going to help him code in Manim—because he’s an expert and the LLM is definitely not; there is no way it will be able to help him.


[1] It kind of reminds me of the good old days when I was working with the Quake III level editor. The API and tools are very bespoke and very powerful.