制作动画

一个绘制粉色圆圈的动画

  1. 打开my-project 文件夹的main.py 文件,它看起来包含以下内容:

from manim import *


class CreateCircle(Scene):
    def construct(self):
        circle = Circle()  # create a circle
        circle.set_fill(PINK, opacity=0.5)  # set the color and transparency
        self.play(Create(circle))  # show the circle on screen
  1. 进入你的项目文件夹,在命令行执行如下命令

manim -pql main.py CreateCircle

Manim 将输出渲染信息,然后创建一个 MP4 文件。 默认影片播放器将播放 MP4 文件,并显示以下动画。

如果您看到绘制粉红色圆圈的动画,恭喜您! 你刚刚从头开始编写了你的第一个 Manim 场景

Last updated