Animation engine for explanatory math videos
Find a file
2021-01-03 17:57:43 -08:00
.github Change a word 2018-12-04 17:24:02 -08:00
logo Logo (#537) 2019-05-15 20:03:51 -07:00
manimlib Make it so that FadeTransform returns moving mobject to its original state 2021-01-03 17:57:43 -08:00
.gitignore Added .gitignore from https://www.toptal.com/developers/gitignore/ 2021-01-02 09:37:28 -08:00
custom_defaults.yml Remove camera quality information from constants 2021-01-02 23:02:39 -08:00
environment.yml remove versions from requirements.txt and update environment.yml 2021-01-02 19:14:00 +08:00
example_scenes.py Small update to example_scenes.py description 2021-01-02 11:13:14 -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 Remove all configuration from constants.py, and clean up the many files affected by this move 2021-01-02 20:47:51 -08:00
requirements.txt Remove all configuration from constants.py, and clean up the many files affected by this move 2021-01-02 20:47:51 -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
python3 -m pip install -r requirements.txt

# Try it out
python3 ./manim.py example_scenes.py SquareToCircle

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
    pip3 install -r requirements.txt
    python3 manim.py example_scenes.py SquareToCircle
    

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
python3 -m manim example_scenes.py SquareToCircle

Using manim

Try running the following:

python3 -m manim example_scenes.py SquareToCircle

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.
  • -n <number> to skip ahead to the n'th animation of a scene.
  • -f to show the file in finder (for OSX).

Take a look at custom_defaults.yml for further configuration. For example, 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. If you have a file name "custom_defaults.yml" in the same directory where you are calling manim, it will look to the configuration of that file instead of the one in manim itself.

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.