Clone the repository to your machine using git
, or Download ZIP. With git
:
git clone git@github.com:andycasey/manim-line-example.git
cd manim-line-example/
I recommend using uv
for Python environments.
If you have an existing Python environment that you want to use, that's fine.
You will need to install the manim
library. If you don't have an environment already, you can create one with uv
:
uv venv
Then activate it:
source .venv/bin/activate
Now install the Mathematical Animation (manim
) library to this virtual environment:
uv pip install manim
You will need to make sure you have activated your Python environment that has manim
installed using source .venv/bin/activate
from the folder where your environment was created.
For a high quality version:
manim -qk line.py FitLine
For a low-quality version:
manim -ql line.py FitLine
Both of these commands will create a video in the media/videos/line/
folders.
This animation was created in low quality (with the -ql
flag) and exported to GIF.
Andy Casey (andrew.casey@monash.edu)