Class structure, Rendering Settings, Shapes, and Basic Animation | Mastering Manim Chapter 1

Опубликовано: 25 Апрель 2026
на канале: AI with Alex
10,175
176

In this video we learn the structure behind our programs, different rendering settings, and some basic animation with shapes like Circles, Squares, Lines, and Triangles.

TIMESTAMPS:
1:08 - Using old 3B1B video files as a learning tool
2:12 - Hello World
2:30 - Class Structure
4:56 - Rendering Settings
5:40 - A Better Hello World
7:03 - How to Save your animation as a single image
8:37 - Circles, Squares, Lines, and Triangles (really any polygon)
11:20 - Animating Drawing the Shapes


Note for Improvement in this video I go pretty slow and explain everything, but in future videos, I'll be going faster and be more concise now that you know the basic commands.
*I also want to display the animations we create throughout the video at the very beginning so you wouldn't have to scroll to the end of the video


self.add() adds something statically
self.play(Write()) or self.play(ShowCreation()) animates the drawing of the shapes
self.wait() pauses the screen for 1 second by default, or use any number of seconds as a paramter
e.x. self.wait(5) to pause 5 seconds


Rendering Settings:
Use the flat -l for a faster rendering at a lower quality.
Use -s to skip to the end and just save the final frame
Use the -p to have the animation (or image, if -s was used) pop up once done.
Use -n (number)to skip ahead to the n'th animation of a scene.
Use -r (number) to specify a resolution (for example, -r 1080 for a 1920x1080 video)

Shapes:
circle = Circle()
square = Square()
line = Line(np.array([x,y,z]),np.array([x,y,z]))
triangle = Polygon(np.array([x,y,z]), np.array([x,y,z]), np.array([x,y,z]))


Tags:
#manim
#manimtutorial
#manim2020
#manimanimation
#manimpythontutorial