Generate short 3Blue1Brown style animations to visualize tricky math/cs concepts (matrix multiplication, gradient descent, derivatives, partial derivatives, CUDA GPU warps, etc.) leveraging LLMs and Manim CE.
demos.mov
- Teachers & Educators (like my dad) who want clear, visual tools to explain tough concepts.
- Students who struggle with abstract ideas in calculus, linear algebra, and other math-heavy courses.
- Developers trying to wrap their heads around GPU concepts like warping and memory coalescing.
(fun bit: i actually used this a couple times while making this to help my friends out with homework, and it worked lmao)
Anything related to Math and CS!
See the demos section for more concrete examples of how this project can be applied.
- Python 3.12+
- Anthropic API KEY
- Docker
git clone https://github.com/sidsurakanti/magin.git && cd magin# rename .env.example to .env and replace ANTHROPIC_API_KEY
ANTHROPIC_API_KEY=""# run everything
docker compose up OR
# for frontend
cd frontend && npm run dev # for backend
cd backend && docker compose upVisit http://localhost:3000 to access the app and test it out!
base user prompt {
-> scriptgen (essentially a step-by-step walkthrough for the animation)
-> codegen (the manim code for the animation)
} est ~30-60s depending on prompt size {
-> errorgen (on render error, happened maybe once out of my 300 test iterations)
-> RENDER COMPLETE
} est ~30-45s, 720p30 {
-> editgen (for user iteration, since we cannot rely on llm to one-shot a good animation 100% of the time from a simple prompt)
} est < 30sThis project was very much inspired by 3Blue1Brown and wouldn't be possible without him and his work (if you couldn't tell already). Shoutout to HackGT as well.