https://github.com/ManimCommunity/manim Skip to content Sign up * Why GitHub? Features - + Mobile - + Actions - + Codespaces - + Packages - + Security - + Code review - + Issues - + Integrations - + GitHub Sponsors - + Customer stories- * Team * Enterprise * Explore + Explore GitHub - Learn and contribute + Topics - + Collections - + Trending - + Learning Lab - + Open source guides - Connect with others + The ReadME Project - + Events - + Community forum - + GitHub Education - + GitHub Stars program - * Marketplace * Pricing Plans - + Compare plans - + Contact Sales - + Education - [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} ManimCommunity / manim * Notifications * Star 5.8k * Fork 506 A community-maintained Python framework for creating mathematical animations. www.manim.community MIT License 5.8k stars 506 forks Star Notifications * Code * Issues 192 * Pull requests 49 * Discussions * Actions * Projects 5 * Wiki * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Projects * Wiki * Security * Insights main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 10 tags Code * Clone HTTPS GitHub CLI [https://github.com/M] Use Git or checkout with SVN using the web URL. [gh repo clone ManimC] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Go back Launching Xcode If nothing happens, download Xcode and try again. Go back Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @sparshg sparshg Fixed :class:~.Rotate for angles that are multiples of :math: 2\pi (... ... ec081d1 Aug 21, 2021 Fixed :class:`~.Rotate` for angles that are multiples of :math:`2\pi` (... ...#1938) * custom path func for rotation anim * small fix * alt implementation * small fixes * tests ec081d1 Git stats * 5,169 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github drastically shorten and simplify PR template (#1864) Aug 6, 2021 docker Renamed instances of master to main (#1720) Jun 24, 2021 docs fix: substrings_to_isolate in doc (#1918) Aug 15, 2021 example_scenes Rewrite stroke and fill shaders (#1716) Jun 30, 2021 logo add monochromatic versions of logo (#826) Dec 4, 2020 manim Fixed :class:~.Rotate for angles that are multiples of :math:2\pi (... Aug 21, 2021 scripts Deprecation Decorators (#1404) May 11, 2021 tests Fixed :class:~.Rotate for angles that are multiples of :math:2\pi (... Aug 21, 2021 .codecov.yml added .codecov.yml (#1187) Mar 28, 2021 .codespell_ignorelines Adding spell checker as a pre-commit hook (#1544) May 21, 2021 .codespellrc Bump version number to v0.9.0 and generate changelog (#1850) Aug 2, 2021 .dockerignore Post-release update for docker readme (#815) Dec 3, 2020 .flake8 Adding spell checker as a pre-commit hook (#1544) May 21, 2021 .gitattributes Declare *.npz *.wav *.png as binary (#1560) May 23, 2021 .gitignore Build the docs - Logging (#1461) May 9, 2021 .pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate (#1857) Aug 3, 2021 .pylintrc Adding spell checker as a pre-commit hook (#1544) May 21, 2021 .readthedocs.yml Made RTD apt install FFMPEG instead of installing a Python binding (# ... Aug 12, 2021 CODE_OF_CONDUCT.md Updated Discord links in the docs to point towards a standardized red... May 13, 2021 CONTRIBUTING.md Create CONTRIBUTING.md (#1460) May 4, 2021 LICENSE add community license as separate from 3b1b original license May 30, 2020 LICENSE.community Update license year (#953) Jan 24, 2021 README.md Update README.md (#1906) Aug 13, 2021 conftest.py Fix tests (#1571) May 26, 2021 poetry.lock OpenGL renderer updates (#1808) Jul 27, 2021 pyproject.toml Bump version number to v0.9.0 and generate changelog (#1850) Aug 2, 2021 View code [ ] Table of Contents: Installation Usage Command line arguments Documentation Docker Instructions for running the docker image Quick Example Running the image in the background Jupyterlab Important notes Help with Manim Contributing How to Cite Manim Code of Conduct License README.md [cropped] PyPI Latest Release Docker image [6874747073] MIT License Reddit Twitter Discord Code style: black Documentation Status Downloads CI An animation engine for explanatory math videos --------------------------------------------------------------------- Manim is an animation engine for explanatory math videos. It's used to create precise animations programmatically, as demonstrated in the videos of 3Blue1Brown. NOTE: This repository is maintained by the Manim Community and is not associated with Grant Sanderson or 3Blue1Brown in any way (although we are definitely indebted to him for providing his work to the world). If you would like to study how Grant makes his videos, head over to his repository (3b1b/manim). This fork is updated more frequently than his, and it's recommended to use this fork if you'd like to use Manim for your own projects. Table of Contents: * Installation * Usage * Documentation * Docker * Help with Manim * Contributing * License Installation WARNING: These instructions are for the community version only. Trying to use these instructions to install 3b1b/manim or instructions there to install this version will cause problems. Read this and decide which version you wish to install, then only follow the instructions for your desired version. Manim requires a few dependencies that must be installed prior to using it. If you want to try it out first before installing it locally, you can do so in our online Jupyter environment. For local installation, please visit the Documentation and follow the appropriate instructions for your operating system. Usage Manim is an extremely versatile package. The following is an example Scene you can construct: 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(Create(square)) self.play(Transform(square, circle)) self.play(FadeOut(square)) In order to view the output of this scene, save the code in a file called example.py. Then, run the following in a terminal window: manim -p -ql example.py SquareToCircle You should see your native video player program pop up and play a simple scene in which a square is transformed into a circle. You may find some more simple examples within this GitHub repository. You can also visit the official gallery for more advanced examples. Manim also ships with a %%manim IPython magic which allows to use it conveniently in JupyterLab (as well as classic Jupyter) notebooks. See the corresponding documentation for some guidance and try it out online. 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 -ql 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 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. Docker The community also maintains a docker image (manimcommunity/manim), which can be found on DockerHub. The following tags are supported: * latest -- the most recent version corresponding to the main branch * stable -- the latest released version (according to the releases page) * vX.Y.Z -- any particular released version (according to the releases page) Instructions for running the docker image Quick Example To render a scene CircleToSquare in a file test_scenes.py contained in your current working directory while preserving your user and group ID, use docker run --rm -it --user="$(id -u):$(id -g)" -v "$(pwd)":/manim manimcommunity/manim manim test_scenes.py CircleToSquare -qm Running the image in the background Instead of using the "throwaway container" approach sketched above, you can also create a named container that you can also modify to your liking. First, run docker run -it --name my-manim-container -v "$(pwd):/manim" manimcommunity/manim /bin/bash to obtain an interactive shell inside your container allowing you to, e.g., install further dependencies (like texlive packages using tlmgr). Exit the container as soon as you are satisfied. Then, before using it, start the container by running docker start my-manim-container Then, to render a scene CircleToSquare in a file test_scenes.py, call docker exec -it --user="$(id -u):$(id -g)" my-manim-container manim test.py CircleToSquare -qm Jupyterlab Another alternative is to use the docker image to spin up a local webserver running JupyterLab in whose Python kernel manim is installed and can be accessed via the %%manim cell magic. To use JupyterLab, run docker run -it -p 8888:8888 manimcommunity/manim jupyter lab --ip=0.0.0.0 and then follow the instructions in the terminal. Important notes When executing manim within a Docker container, several command line flags (in particular -p (preview file) and -f (show output file in the file browser)) are not supported. Help with Manim If you need help installing or using Manim, feel free to reach out to our Discord Server or Reddit Community. If you would like to submit a bug report or feature request, please open an issue. Contributing Contributions to Manim are always welcome. In particular, there is a dire need for tests and documentation. For contribution guidelines, please see the documentation. Most developers on the project use Poetry for management. You'll want to have poetry installed and available in your environment. You can learn more about poetry and how to use it at its documentation. How to Cite Manim We acknowledge the importance of good software to support research, and we note that research becomes more valuable when it is communicated effectively. To demonstrate the value of Manim, we ask that you cite Manim in your work. Currently, the best way to cite Manim is to reference the Manim home page using this BibTeX entry (the entry is for release v0.9.0, but can be adapted easily): @Manual{Manim:v0.9.0, key = {Manim}, author = {{The Manim Community Developers}}, title = {{Manim} -- {M}athematical {A}nimation {F}ramework ({V}ersion v0.9.0)}, note = {\url{https://www.manim.community}}, year = 2021, } This should render a reference that looks more or less like this: 42. The Manim Community Developers, Manim - Mathematical Animation Framework (Version v0.9.0). 2021. Code of Conduct Our full code of conduct, and how we enforce it, can be read on our website. 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). About A community-maintained Python framework for creating mathematical animations. www.manim.community Topics python math animations manim Resources Readme License MIT License Releases 10 Manim v0.9.0 Latest Aug 2, 2021 + 9 releases Packages 0 No packages published Contributors 216 * @3b1b * @leotrs * @eulertour * @behackl * @naveen521kk * @kolibril13 * @bhbr * @pre-commit-ci[bot] * @jsonvillanueva * @Aathish04 * @huguesdevimeux + 205 contributors Languages * Python 96.7% * GLSL 3.1% * Other 0.2% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.