Prompt only Manimations
I love Grant Sanderson’s videos. For those who don’t know Grant, he’s the genius behind the popular YouTube channel 3Blue1Brown. He explains various Math, Physics and CS topics using amazing videos which helps the viewer visualize the core ideas of the topics easily.
Manim
Grant wrote his own Mathematical Animation Engine in Python giving him extremely precise control over the animations. He’s even shared the code for all his videos.
Since Grant developed Manim for his own use, the strong community interest in the engine led to the creation of ManimCommunity, an actively maintained fork.
Idea
Wanting to take Manim for a spin for an idea I had in my head, I started reading the documentation. It didn’t take long to recognize I’d have to invest more than a few hours to get the final video that I had in mind.
What if…
Not wanting to invest many hours learning the framework, and since I am just dipping my toes into AI assisted coding, I thought to my self “what if, I could prompt my way into a video?”
Coding with Claude
Here are the steps I took to create the final video. The full code is available here: https://github.com/jipatel/manimations-by-prompts/
Everything in the repo was 100% generated by Claude (even the README).
Step 1 - Claude Learns
I pointed Claude Code to the documentation and asked it to learn as much as it could about the framework. Then I asked it to dump what it learned into a file (I knew my Claude Code session might die, forget or re-start) MANIM.md.
Step 2 - Claude Designs
Having learnt about the framework, I prompted Claude to design an animation to showcase Manim’s capabilities that it just learned. Yes, Claude decided the whole animation! The design goes into DESIGN.md.
Step 3 - Claude Codes, debugs and tests
I then let Claude loose into the agentic loop of coding, testing, fixing until a version of the video was successfully generated.
Step 4 - Human feedback (and back to Step 3)
The original versions had 2 minor hiccups:
- Some shapes weren’t cleared between scenes
- There were no titles
These were easily fixed with prompting.
Summary
- I didn’t measure the exact time taken to create this video but it was definitely under 3 hours. That’s everything - from the moment I created an empty directory to checking it into github.
- Will I be able to create amazing videos like Grant just from prompts? Maybe not, but it was a fun project.
- There are a couple of things in the video that are wrong and out of place. The y=x2 line is wrong (when x=0) and a directed shape that seemed out of place.
- This wasn’t the video I originally had in mind (that’s for a separate post) but I wanted to see if I could get Claude to generate basic Manimations - and it can!
Why should you care?
Some folks fear AI and some have way too much confidence in its power. Regardless of where you stand on this spectrum I hope you can see that it is going to change the way we work. I didn’t need to learn the framework fully - I employed the LLM which is way faster and better than I will be. I could start (and finish) a project in a matter of hours. Had I wanted to build this from scratch, frankly, I’d have run out of motivation.
I understand that I might not be able to create amazing videos like 3Blue1Brown only using prompts - but it can get me further up the road really fast! I’d love to hear from you: if and where you struggle with adopting AI in your life.
Links
My repo: https://github.com/jipatel/manimations-by-prompts/
https://github.com/ManimCommunity/manim/
https://docs.manim.community/en/stable/index.html#