Mathematical Animation Generator
Matra is an AI-powered tool that generates animated math visualizations from natural language prompts using the Manim engine. It's like having your own personal animation studio for math content creators, educators, and learners.
-
✨ Natural Language to Manim Code: Just describe a concept like "Pythagorean theorem" or "visualize sine wave" and Matra generates the Manim code and animation.
-
▶️ In-browser Playback: Watch the animation immediately after generation. -
🔐 Clean, Minimal UI: Built with Gradio and custom CSS for a delightful experience.
-
🕹️ Predefined Suggestions: Clickable chips like:
- Einstein's E=mc²
- Sine wave animation
- Derivative visualization
- Electromagnetic wave
Try it now: https://matra.dev
- You Describe a concept in simple English
- Matra Prompts an LLM (LLaMA 4 Maverick) to generate Manim code
- Manim CLI Renders the animation on the backend
- Gradio Interface shows the code and plays the video
- Python 3.10+
- Manim CE
- FFmpeg
git clone https://github.com/vaishakh3/matra.git
cd matra
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txtCreate a .env file with:
GROQ_API_KEY=your_groq_api_key_here
python matra.py| Layer | Stack |
|---|---|
| UI | Gradio + TailwindCSS-style CSS |
| AI | Groq + LLaMA 4 (via groq Python SDK) |
| Rendering | Manim |
| Deployment | Render |
- Generated Manim code is not always perfect (LLM hallucination)
- No editing interface for tweaking animations yet
- GPU required for faster rendering
Pull requests welcome ❤️
- Fork the repo
- Create a branch
- Make your changes
- Submit a PR
Or file an issue for bugs/feature requests!
Built by Vaishakh Suresh
This project is licensed under the MIT License.
