Python code based on the manim library, which allows you to create animations without using a description of each screen with LaTex code in a txt file
- Python3+
- Manim
- FFmpeg
- MikTex
- The convenience of creating animations
- LaTex formatting: added their own "LaTex" commands
- Flexibility
- Install all the dependencies
- Install MikTex from the official website.
- Install FFmpeg from the official website.
- Install Manim
pip install manim
- Clone the Git repository
git clone "https://github.com/Igorantivirus/Simple-Manip-Animation" - Create a file to describe the animation
Create a file where you will describe the animation and save the path to it to the
ANIMATION_FILEvariable inmain.pythe py file
To improve the animation, the following features of the LaTex syntax used in the txt file have been created:
| Comman | Description |
|---|---|
| '#' | (Separate line) Comments |
| '\\' | Line break. The difference from Base LaTex: it should be surrounded by spaces only if the construction "\begin(name)...\end{name}" is not used. |
| Space | Separates animation objects. It cannot be used in the construction of "\begin(name)...\end{name}". |
| Empty line | Empty lines are skipped. |
| \header{} | (Separate line) The title on the screen before the new title appears |
| \border | Creates an outline around the following code |
| \next | Glues the current and next lines together |
- Example: Solving a linear equation
\header{Line equation}
ax + b = 0
ax = - b
ax = - b |\cdot \frac{1}{a}
\frac{ax}{a} = -\frac{b}{a}
x = -\frac{b}{a}
ax + b = 0 \\ x = -\frac{b}{a}
- Run
Run file main.py:
./main.py
Or assemble the video with the command you need, for example:
manim -pql main.py LaTexProcessor
The MIT License