A community-maintained Python framework for creating mathematical animations. https://www.manim.community
  • Python 98.2%
  • GLSL 1.6%
  • Dockerfile 0.1%
Find a file
Devin Neal 41f6f054e0
Add interface to JS renderer (#465)
* Add interface to JS renderer

* Update manim_directive.py

* Add simple flag to get_style()

* Change add_frames to add_frame

* Update changelog.rst
2020-10-04 18:49:01 -07:00
.github ci: fix publishing to pip (#500) 2020-10-03 15:50:10 +05:30
docs Add interface to JS renderer (#465) 2020-10-04 18:49:01 -07:00
example_scenes Running Black On Master (#419) 2020-09-08 07:47:55 -04:00
logo Deprecate TexMobject and TextMobject in favour of MathTex and Tex (#391) 2020-09-02 09:20:37 +05:30
manim Add interface to JS renderer (#465) 2020-10-04 18:49:01 -07:00
readme-assets Add Contribution guideline in Readme 2020-06-02 23:05:10 +05:30
scripts Add a way to pass a custom browser if wanted. (#343) 2020-08-25 11:03:09 -04:00
tests Add interface to JS renderer (#465) 2020-10-04 18:49:01 -07:00
.gitignore Change the folder of auto-generated reference from _autosummary to reference. This will change the URLs as well so they look prettier. I also moved the installation/examples/tutorials indices one folder up so the URLs look less messy and more straightforward as well. (#312) 2020-08-17 07:43:52 -04:00
.pylintrc Add pylint to requirements and docs, add .pylintrc (#478) 2020-09-25 22:47:45 -07:00
.readthedocs.yml Render videos while building documentation (#402) 2020-09-11 16:22:06 -04:00
LICENSE add community license as separate from 3b1b original license 2020-05-29 21:15:43 -04:00
LICENSE.community add community license as separate from 3b1b original license 2020-05-29 21:15:43 -04:00
poetry.lock Add interface to JS renderer (#465) 2020-10-04 18:49:01 -07:00
pyproject.toml Add interface to JS renderer (#465) 2020-10-04 18:49:01 -07:00
README.md Move to Poetry (#165) 2020-09-10 08:59:34 -04:00
requirements.txt Add interface to JS renderer (#465) 2020-10-04 18:49:01 -07:00

logo

CI Documentation Status 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.

NOTE: This repository is maintained by the Manim Community, and is not associated with Grant Sanderson or 3Blue1Brown in any way (though we are definitely indebted to him for providing his work to the world). If you want to study how Grant makes his videos, head over to his repository (3b1b/manim). This is a more frequently updated repository than that one, and is recommended if you want to use Manim for your own projects.

Table of Contents:

Installation

Manim has a few dependencies that need to be installed before it. Please visit the documentation and follow the instructions according to your operating system.

Usage

Here is an example manim script:

from manim import *

class SquareToCircle(Scene):
    def construct(self):
        circle = Circle()
        square = Square()
        square.flip(RIGHT)
        square.rotate(-3 * TAU / 8)
        circle.set_fill(PINK, opacity=0.5)

        self.play(ShowCreation(square))
        self.play(Transform(square, circle))
        self.play(FadeOut(square))

Save this code in a file called example.py. Now open your terminal in the folder where you saved the file and execute

manim example.py SquareToCircle -pl

You should see your video player pop up and play a simple scene where a square is transformed into a circle. You can find some more simple examples in the GitHub repository. Visit the official gallery for more advanced examples.

Command line arguments

The general usage of manim is as follows:

manim-illustration

The -p flag in the command above is for previewing, meaning the video file will automatically open when it is done rendering. The -l flag is for a faster rendering at a lower quality.

Some other useful flags include:

  • -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 show the file in the file browser.

For a thorough list of command line arguments, visit the documentation.

Documentation

Documentation is in progress at ReadTheDocs.

Help with Manim

If you need help installing or using Manim, please take a look at the Reddit Community or the Discord Community. For bug reports and feature requests, please open an issue.

Contributing

Is always welcome. In particular, there is a dire need for tests and documentation. For guidelines please see the documentation. This project uses Poetry for management. You need to have poetry installed and available in your environment. You can find more information about it in its Documentation

License

The software is double-licensed under the MIT license, with copyright by 3blue1brown LLC (see LICENSE), and copyright by Manim Community Developers (see LICENSE.community).