Inspiration

Many math concepts are taught through static images or dense text, often making it difficult to truly grasp the underlying intuition. We wanted a way to bring abstract concepts to life — not through static pictures, but through dynamic animations that clearly show how mathematical objects interact. We realized that if we could build a tool that seamlessly connected LaTeX code and animations inside a student's or researcher's workflow, it would make understanding and teaching math much more intuitive.

What it does

Manim Extension is a Visual Studio Code extension that allows users to highlight LaTeX theorems, right-click, and generate an animated visualization of the theorem's intuition. It automatically:

  • Parses the selected LaTeX code
  • Explains the geometric intuition behind it
  • Generates robust, executable Python code using the Manim package
  • Renders the animation directly inside a new VSCode tab. This allows users to move beyond static diagrams and instead see the math unfold visually.

How we built it

  • VSCode API: Built a frontend extension that detects LaTeX environments and handles user interactions.
  • Gemini API: Used Gemini 2.5 to parse and deeply understand the selected LaTeX code, then generate an intuitive explanation and corresponding Manim animation code.
  • Python backend: Interacts with the Manim Python library to generate and render the animations.
  • JavaScript frontend: Handles tab creation and visualization inside the VSCode editor itself.

Challenges we ran into

  • Translating abstract intuition into code: It was difficult to make sure the generated animation actually followed the intended intuition behind the theorem rather than creating unrelated shapes.
  • Manim syntax errors: Since Manim has a large API, we had to implement introspection and verification steps to minimize broken scripts.
  • Model steering: It took a lot of prompt engineering to get the AI to output high-quality, relevant animations without going off-track.
  • Rendering inside VSCode: Making animations display smoothly in a VSCode tab (without needing external windows) required careful integration.

Accomplishments that we're proud of

  • Building an end-to-end tool that takes LaTeX -> intuition -> animation without leaving VSCode.
  • Automatically fixing many Manim code errors through iterative generation and verification.
  • Keeping the user experience lightweight and seamless - just highlight, right-click, and animate.

What we learned

  • How powerful AI models can be when paired with the right prompting, chaining, and validation steps.
  • Technical knowledge about VSCode extension development, API integration, and Manim's animation system.
  • The importance of iteration, especially when trying to control large language models in technical applications.

What's next for Manim Extension

  • Further prompt tuning: ensure generated animations align more closely with the intuition behind the math concepts.
  • Fine-tune model: Train the model to understand and visualize various mathematical concepts to improve the model's ability and accuracy.
  • Explore other LLM models: Optimize the quality and accuracy of generated code.
  • Deploy to VSCode Marketplace: Allow users to easily install and integrate the extension into their workflow.

Built With

Share this project:

Updates

Submission history