Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sidsurakanti/magin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

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.

demo

demos.mov

Target Audience

  • 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)

Use Cases

Anything related to Math and CS!

See the demos section for more concrete examples of how this project can be applied.

Prerequisities

  • Python 3.12+
  • Anthropic API KEY
  • Docker

Usage

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 up

Visit http://localhost:3000 to access the app and test it out!

Tech Stack

Next.js TypeScript TailwindCSS FastAPI Redis Docker

Pipeline

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 < 30s

Acknowledgements

This 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.

About

bring abstract math and computer science ideas to life with short, intuitive animations

Topics

Resources

License

Stars

Watchers

Forks