From e737ace268591d900aca9ba6fd028b540aed9e15 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Thu, 31 Dec 2020 13:47:50 -0800 Subject: [PATCH] Updated README and LICENSE after moving 3b1b content to another project --- LICENSE => LICENSE.md | 4 --- README.md | 71 +++++++++++-------------------------------- 2 files changed, 17 insertions(+), 58 deletions(-) rename LICENSE => LICENSE.md (83%) diff --git a/LICENSE b/LICENSE.md similarity index 83% rename from LICENSE rename to LICENSE.md index be67c8db..774f5965 100644 --- a/LICENSE +++ b/LICENSE.md @@ -1,7 +1,3 @@ -All files of this project under the directory "from_3b1b" are copyright 3Blue1Brown LLC and used by permission for this project only. - -Any other file of this project is available under the MIT license as follow: - MIT License Copyright (c) 2018 3Blue1Brown LLC diff --git a/README.md b/README.md index 81d81395..f556df42 100644 --- a/README.md +++ b/README.md @@ -8,20 +8,12 @@ Manim is an animation engine for explanatory math videos. It's used to create precise animations programmatically, as seen in the videos at [3Blue1Brown](https://www.3blue1brown.com/). +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.7. You can install it from PyPI via pip: +Manim runs on Python 3.8. -```sh -pip3 install manimlib -``` - -System requirements are [cairo](https://www.cairographics.org), [ffmpeg](https://www.ffmpeg.org), [sox](http://sox.sourceforge.net), [latex](https://www.latex-project.org) (optional, if you want to use LaTeX). - -You can now use it via the `manim` command. For example: - -```sh -manim my_project.py MyScene -``` +System requirements are [FFmpeg](https://ffmpeg.org/), [OpenGL](https://www.opengl.org//) and [latex](https://www.latex-project.org) (optional, if you want to use LaTeX). For more options, take a look at the [Using manim](#using-manim) sections further below. @@ -34,31 +26,24 @@ If you want to hack on manimlib itself, clone this repository and in that direct python3 -m pip install -r requirements.txt # Try it out -python3 ./manim.py example_scenes.py SquareToCircle -pl +python3 ./manim.py example_scenes.py SquareToCircle ``` ### Directly (Windows) 1. [Install FFmpeg](https://www.wikihow.com/Install-FFmpeg-on-Windows). -2. [Install Cairo](https://www.lfd.uci.edu/~gohlke/pythonlibs/#pycairo). For most users, ``pycairo‑1.18.0‑cp37‑cp37m‑win32.whl`` will do fine. - ```sh - pip3 install C:\path\to\wheel\pycairo‑1.18.0‑cp37‑cp37m‑win32.whl - ``` -3. Install a LaTeX distribution. [MiKTeX](https://miktex.org/download) is recommended. - -4. [Install SoX](https://sourceforge.net/projects/sox/files/sox/). - -5. Install the remaining Python packages. Make sure that ``pycairo==1.17.1`` is changed to ``pycairo==1.18.0`` in requirements.txt. +2. Install a LaTeX distribution. [MiKTeX](https://miktex.org/download) is recommended. +3. Install the remaining Python packages. ```sh git clone https://github.com/3b1b/manim.git cd manim pip3 install -r requirements.txt - python3 manim.py example_scenes.py SquareToCircle -pl + python3 manim.py example_scenes.py SquareToCircle ``` ## Anaconda Install -* Install sox and latex as above. +* Install latex as above. * Create a conda environment using `conda env create -f environment.yml` * **WINDOWS ONLY** Install `pyreadline` via `pip install pyreadline`. @@ -68,7 +53,7 @@ After installing `virtualenv` and `virtualenvwrapper` ```sh git clone https://github.com/3b1b/manim.git mkvirtualenv -a manim -r requirements.txt manim -python3 -m manim example_scenes.py SquareToCircle -pl +python3 -m manim example_scenes.py SquareToCircle ``` ### Using Docker @@ -103,20 +88,20 @@ Note that the image doesn't have any development tools installed and can't previ ## Using manim Try running the following: ```sh -python3 -m manim example_scenes.py SquareToCircle -pl +python3 -m manim example_scenes.py SquareToCircle ``` -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. +This should pop up a window playing a simple scene. -Some other useful flags include: +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 ` to skip ahead to the `n`'th animation of a scene. * `-f` to show the file in finder (for OSX). Set `MEDIA_DIR` environment variable to specify where the image and animation files will be written. -Look through the `old_projects` folder 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. - -While developing a scene, the `-sp` flags are helpful to just see what things look like at the end without having to generate the full animation. It can also be helpful to use the `-n` flag to skip over some number of animations. +Look through [https://github.com/3b1b/videos](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/learn/manim](https://www.eulertour.com/learn/manim/). @@ -124,32 +109,10 @@ Documentation is in progress at [eulertour.com/learn/manim](https://www.eulertou ### Walkthrough Todd Zimmerman put together a [tutorial](https://talkingphysics.wordpress.com/2019/01/08/getting-started-animating-with-manim-and-python-3-7/) on getting started with manim, which has been updated to run on Python 3.7. -### Live Streaming -To live stream your animations, simply run manim with the `--livestream` option. - -```sh -> python -m manim --livestream -Writing to media/videos/scene/scene/1080p30/LiveStreamTemp.mp4 - -Manim is now running in streaming mode. Stream animations by passing -them to manim.play(), e.g. ->>> c = Circle() ->>> manim.play(ShowCreation(c)) - ->>> -``` - -It is also possible to stream directly to Twitch. To do that simply pass -`--livestream` and `--to-twitch to manim` and specify the stream key with -`--with-key`. Then when you follow the above example the stream will directly -start on your Twitch channel (with no audio support). - ## Contributing Is always welcome. In particular, there is a dire need for tests and documentation. ## License -All files in the directory `from_3b1b`, which by and large generate the visuals for 3b1b videos, are copyright 3Blue1Brown. - -The general purpose animation code found in the remainder of the repository, on the other hand, is under the MIT license. +This project falls under the MIT license.