Math-To-Manim  by HarleyCoops

AI tool for generating mathematical animations from text using AI

created 6 months ago
1,031 stars

Top 37.0% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides Python scripts and Manim code to generate animations of complex mathematical and physics concepts, aimed at educators and researchers. It leverages large language models (LLMs) like DeepSeek, Gemini, and Grok3 to automatically create visualizations and accompanying LaTeX study notes from detailed text prompts, simplifying the creation of advanced educational content.

How It Works

The core approach involves using LLMs to translate intricate mathematical descriptions, often formatted in LaTeX, into executable Manim animation scripts. A key innovation is the "Dual-Stream Output," which simultaneously generates animation code and detailed, LaTeX-formatted study notes. This method bypasses the need for model fine-tuning, relying instead on sophisticated prompt engineering to achieve complex visualizations and explanations. The system also incorporates a feedback loop, allowing successful animations to inform future prompt generation.

Quick Start & Requirements

  • Install: Clone the repository, create a .env file with DEEPSEEK_API_KEY, and run pip install -r requirements.txt.
  • Prerequisites: Python >= 3.8, PyTorch >= 2.0, Transformers >= 4.34.0, Accelerate >= 0.24.0, bitsandbytes >= 0.39.0 (for quantization), and FFmpeg (install via package manager or download).
  • Setup: Requires API keys for LLMs. Rendering time varies from 5 minutes to 4 hours per animation.
  • Links: Project Repository

Highlighted Details

  • Utilizes multiple LLMs (DeepSeek, Gemini, Grok3) for diverse perspectives.
  • Generates both animation code and LaTeX-formatted study notes.
  • Supports complex topics from geometry to quantum mechanics.
  • Future integration with "smolagents" for automated prompt enhancement.

Maintenance & Community

The project is actively developed by HarleyCoops. Information on community channels like Discord/Slack or a roadmap is not explicitly provided in the README.

Licensing & Compatibility

License information is not specified in the README. Compatibility for commercial use or closed-source linking is therefore undetermined.

Limitations & Caveats

The repository contains output files and Manim code, not the AI model or the complete pipeline for generating animation scripts from mathematical concepts; the full pipeline is proprietary. Errors often stem from LaTeX interpretation within prompts. The project is described as a work in progress, with ongoing efforts to improve prompting and model fine-tuning.

Health Check
Last commit

3 weeks ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
0
Star History
90 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.