manim Basic elements

Time:2022-6-10

First, import the Library:

from manimlib.imports import *

Then define the class:

class NameOfScene(Scene):
    def construct(self):
        …

Then open Anaconda prompt, first switch the drive letter (directly enter d:), then use the CD command to jump to the folder where the PY file is saved in the virtual environment, and enter:

manim xxx.py -pql

Where -pql means preview quality low

 

example:

class FirstScene(Scene):
    def construct(self):
        text=TextMobject("text")
        self.add(text)