Animation engine for explanatory math videos
Find a file
2021-01-24 09:49:29 +08:00
.github Change a word 2018-12-04 17:24:02 -08:00
docs set up docs 2021-01-24 09:49:29 +08:00
logo set up docs 2021-01-24 09:49:29 +08:00
manimlib Improved scrolling 2021-01-19 14:12:25 -08:00
.gitignore Add some more explanation to TexTransformExample 2021-01-06 16:14:55 -08:00
custom_defaults.yml make window_position changeable 2021-01-16 10:46:30 +08:00
environment.yml add PyOpenGL packages in requirements.txt and environment.yml 2021-01-16 11:22:34 +08:00
example_scenes.py Reorganize the interaction between CameraFrame and shader perspective transforms, along with some keyboard interactions for panning 2021-01-18 16:39:29 -08:00
LICENSE.md Update LICENSE.md 2020-12-31 13:49:32 -08:00
manim.py Small refactor of extract_scene et. al. 2020-02-11 19:52:14 -08:00
README.md Merge custom defaults recursively rather than overriding manim's with the local one 2021-01-18 10:58:33 -08:00
requirements.txt add PyOpenGL packages in requirements.txt and environment.yml 2021-01-16 11:22:34 +08:00
setup.cfg remove extraneous newline 2019-07-07 21:46:59 -07:00
setup.py Use pbr for setup.py 2019-05-05 22:08:07 +02:00

logo

MIT License Manim Subreddit Manim Discord

Manim is an animation engine for explanatory math videos. It's used to create precise animations programmatically, as seen in the videos at 3Blue1Brown.

This repository contains the version of manim used by 3Blue1Brown. There is also a community maintained version at https://github.com/ManimCommunity/manim/. To get help or to join the development effort, please join the discord.

Installation

Manim runs on Python 3.8.

System requirements are FFmpeg, OpenGL and latex (optional, if you want to use LaTeX).

For more options, take a look at the Using manim sections further below.

Directly

If you want to hack on manimlib itself, clone this repository and in that directory execute:

# Install python requirements
pip install -r requirements.txt

# Try it out
python -m manim example_scenes.py OpeningManimExample

Directly (Windows)

  1. Install FFmpeg.
  2. Install a LaTeX distribution. MiKTeX is recommended.
  3. Install the remaining Python packages.
    git clone https://github.com/3b1b/manim.git
    cd manim
    pip install -r requirements.txt
    python manim.py example_scenes.py OpeningManimExample
    

Anaconda Install

  • Install latex as above.
  • Create a conda environment using conda env create -f environment.yml

Using virtualenv and virtualenvwrapper

After installing virtualenv and virtualenvwrapper

git clone https://github.com/3b1b/manim.git
mkvirtualenv -a manim -r requirements.txt manim
python -m manim example_scenes.py OpeningManimExample

Using manim

Try running the following:

python -m manim example_scenes.py OpeningManimExample

This should pop up a window playing a simple scene.

Some useful flags include:

  • -w to write the scene to a file
  • -o to write the scene to a file and open the result
  • -s to skip to the end and just show the final frame.
    • -so will save the final frame to an image and show it
  • -n <number> to skip ahead to the n'th animation of a scene.
  • -f to make the playback window fullscreen

Take a look at custom_defaults.yml for further configuration. To add your customization, you can either edit this file, or add another file by the same name "custom_defaults.yml" to whatever directory you are running manim from. For example this is the one for 3blue1brown videos. There you can specify where videos should be output to, where manim should look for image files and sounds you want to read in, and other defaults regarding style and video quality.

Look through https://github.com/3b1b/videos to see the code for previous 3b1b videos. Note, however, that developments are often made to the library without considering backwards compatibility with those old projects. To run an old project with a guarantee that it will work, you will have to go back to the commit which completed that project.

Documentation

Documentation is in progress at eulertour.com/docs. And there is also an all-in-one documentation and tutorials maintained by @manim-kindergarten: manim.ml (in Chinese).

Walkthrough

Todd Zimmerman put together a tutorial on getting started with manim, which has been updated to run on Python 3.7.

manim-kindergarten wrote and collected some useful extra classes and some codes of videos in manim_sandbox repo.

Contributing

Is always welcome. In particular, there is a dire need for tests and documentation.

License

This project falls under the MIT license.