Перейти к содержимому

I Talked to Claude and Got a Math Animation (Manim Tutorial)

Tiltwave Studios

0:00 / 0:00

I Talked to Claude and Got a Math Animation (Manim Tutorial)

64 просмотра · 4 дн. назад
Tiltwave Studios
11 подписчиков
64 просмотра · 4 дн. назад
Day 2 of making videos about Claude! Today I’m talking to Claude about Manim, the Python library behind 3Blue1Brown-style math and explainer animations, and how Claude Code can write and render the animations for you. Key takeaways: Manim is a free, open-source Python library for math and explainer animations You describe animations in code instead of dragging things around a timeline Great for math, physics, algorithms, and concept explainers Claude Code can write the scene, run the render, fix errors, and iterate with you Quick start: pip install manim manim -pql scene.py HelloManim If this helped, please like, subscribe, and share. It keeps me motivated to make more videos! #Manim #ClaudeCode #Python #MathAnimation #EducationalContent Step-by-Step Guide: Manim with Claude Code Step 1: Install the prerequisites Manim needs Python 3.9 or newer, plus FFmpeg. For math equations (MathTex), you also need a LaTeX distribution such as MiKTeX (Windows), MacTeX (Mac), or TeX Live (Linux). The Manim Community docs list the exact setup for each operating system. Step 2: Install Manim pip install manim Step 3: Write your first scene Create a file called scene.py: python from manim import * class HelloManim(Scene): def construct(self): circle = Circle() circle.set_fill(PINK, opacity=0.5) self.play(Create(circle)) self.play(circle.animate.shift(RIGHT * 2)) self.play(FadeOut(circle)) Step 4: Render it manim -pql scene.py HelloManim -p opens the video when it’s done, and -ql is low quality for fast previews. Use -qh for the final high-quality render. Step 5: Install Claude Code Follow the current install instructions in Anthropic’s Claude Code docs. Step 6: Create a project folder and start Claude Code mkdir manim-videos cd manim-videos claude Step 7: Describe your animation Try a prompt like: “Create a Manim scene that animates the Pythagorean theorem step by step. Use a right triangle, show the squares on each side, and display the equation a² + b² = c². Render it at low quality so I can preview it.” Step 8: Let Claude build and test Claude Code writes the Scene, runs the render, reads any errors, and fixes them. Step 9: Iterate in plain English Give feedback like: “Make the triangle blue and the squares orange.” “Slow down the equation reveal.” “Add a title at the top.” Step 10: Render the final version Ask Claude to render at high quality (-qh), or run it yourself. Your video is saved in the media/videos folder. Pro tip: Start every project with low-quality renders. They’re much faster, and you only need the high-quality render once you’re happy with the animation. In this video: 0:00 Intro 0:10 What is Manim? 0:25 What it does 0:35 When to use it 0:45 How to use it 0:55 Benefits 1:05 Using Manim with Claude Code 1:25 Outro