Skip to content

This application allows you to generate mathematical animations using natural language descriptions. It uses OpenAI's GPT model to convert your descriptions into Manim code, which is then used to create beautiful mathematical animations.

License

Notifications You must be signed in to change notification settings

rohitg00/manim-video-generator

Repository files navigation

Manim Video Generator 🎬

A web-based tool for generating mathematical animations using Manim, Flask, and OpenAI. Create beautiful mathematical visualizations with simple text prompts.

manim video generator

🌟 Features

  • Generate mathematical animations from text descriptions
  • Modern, responsive web interface
  • Real-time code preview with syntax highlighting
  • Support for various mathematical concepts
  • Easy-to-use example prompts
  • Docker support for easy deployment

🚀 Quick Start

  1. Clone the repository:
git clone https://github.com/rohitg00/manim-video-generator.git
cd manim-video-generator
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your OpenAI API key
  1. Run the application:
python app.py
  1. Visit http://localhost:5000 in your browser

🐳 Docker Setup

  1. Build the Docker image:
docker build -t manim-generator .
  1. Run the container:
docker run -p 5000:5000 -v $(pwd)/media:/app/media manim-generator

📝 Usage Notes

  • Ensure your mathematical concepts are clearly described
  • Complex animations may take longer to generate
  • Supported topics include:
    • Basic geometry and algebra
    • Calculus concepts
    • 3D visualizations
    • Matrix operations
    • Complex numbers
    • Differential equations

🎥 Showcase

Here are some examples of complex mathematical animations generated using our tool:

Complex Analysis Visualization

Complex Number Transformations

This animation demonstrates complex number transformations, showing how functions map points in the complex plane. Watch as the visualization reveals the geometric interpretation of complex operations.

3D Calculus Concepts

3D Surface Integration

A sophisticated 3D visualization showing multivariable calculus concepts. The animation illustrates surface integrals and vector fields in three-dimensional space, making abstract concepts tangible.

Trigonometry

Differential Equations

This animation brings differential equations to life by visualizing solution curves and phase spaces. Watch how the system evolves over time, revealing the underlying mathematical patterns.

Linear Algebra Transformations

Linear Transformations

Experience linear transformations in action! This visualization demonstrates how matrices transform space, showing concepts like eigenvectors, rotations, and scaling in an intuitive way.

These examples showcase the power of our tool in creating complex mathematical visualizations. Each animation is generated from a simple text description, demonstrating the capability to:

  • Render sophisticated 3D scenes with proper lighting and perspective
  • Create smooth transitions between mathematical concepts
  • Visualize abstract mathematical relationships
  • Handle multiple mathematical objects with precise timing
  • Generate publication-quality animations for educational purposes

🔧 Requirements

  • Python 3.10+
  • FFmpeg
  • Cairo
  • LaTeX (for mathematical typesetting)
  • OpenAI API key

🤝 Credits

📄 License

This project is open source and available under the MIT License.

🔗 Links

🤔 Common Issues & Solutions

  1. LaTeX Errors

    • Ensure you have a complete LaTeX distribution installed
    • Check for syntax errors in mathematical expressions
  2. Rendering Issues

    • Verify FFmpeg installation
    • Check Cairo dependencies
    • Ensure sufficient system resources
  3. API Rate Limits

    • Monitor OpenAI API usage
    • Implement appropriate rate limiting
    • Consider using API key rotation for high traffic

🎯 Future Roadmap

  • User authentication system
  • Save and share animations
  • Custom animation templates
  • Batch processing
  • Advanced customization options
  • API endpoint for programmatic access

💡 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📞 Support

If you encounter any issues or have questions, please:

  1. Check the Common Issues section
  2. Search existing GitHub issues
  3. Create a new issue if needed

Made with ❤️ using Manim, Flask, and OpenAI

About

This application allows you to generate mathematical animations using natural language descriptions. It uses OpenAI's GPT model to convert your descriptions into Manim code, which is then used to create beautiful mathematical animations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published