mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
update README.md
This commit is contained in:
parent
8b2785fdc9
commit
d221073360
2 changed files with 3 additions and 32 deletions
35
README.md
35
README.md
|
@ -1,7 +1,5 @@
|
||||||

|

|
||||||
|
|
||||||
[](https://travis-ci.org/3b1b/manim)
|
|
||||||
[](https://www.eulertour.com/learn/manim/)
|
|
||||||
[](http://choosealicense.com/licenses/mit/)
|
[](http://choosealicense.com/licenses/mit/)
|
||||||
[](https://www.reddit.com/r/manim/)
|
[](https://www.reddit.com/r/manim/)
|
||||||
[](https://discord.gg/mMRrZQW)
|
[](https://discord.gg/mMRrZQW)
|
||||||
|
@ -45,7 +43,6 @@ python3 ./manim.py example_scenes.py SquareToCircle
|
||||||
|
|
||||||
* Install latex as above.
|
* Install latex as above.
|
||||||
* Create a conda environment using `conda env create -f environment.yml`
|
* Create a conda environment using `conda env create -f environment.yml`
|
||||||
* **WINDOWS ONLY** Install `pyreadline` via `pip install pyreadline`.
|
|
||||||
|
|
||||||
|
|
||||||
### Using `virtualenv` and `virtualenvwrapper`
|
### Using `virtualenv` and `virtualenvwrapper`
|
||||||
|
@ -56,34 +53,6 @@ mkvirtualenv -a manim -r requirements.txt manim
|
||||||
python3 -m manim example_scenes.py SquareToCircle
|
python3 -m manim example_scenes.py SquareToCircle
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using Docker
|
|
||||||
Since it's a bit tricky to get all the dependencies set up just right, there is a Dockerfile and Compose file provided in this repo as well as [a premade image on Docker Hub](https://hub.docker.com/r/eulertour/manim/tags/). The Dockerfile contains instructions on how to build a manim image, while the Compose file contains instructions on how to run the image.
|
|
||||||
|
|
||||||
The prebuilt container image has manim repository included.
|
|
||||||
`INPUT_PATH` is where the container looks for scene files. You must set the `INPUT_PATH`
|
|
||||||
environment variable to the absolute path containing your scene file and the
|
|
||||||
`OUTPUT_PATH` environment variable to the directory where you want media to be written.
|
|
||||||
|
|
||||||
1. [Install Docker](https://docs.docker.com)
|
|
||||||
2. [Install Docker Compose](https://docs.docker.com/compose/install/)
|
|
||||||
3. Render an animation:
|
|
||||||
```sh
|
|
||||||
INPUT_PATH=/path/to/dir/containing/source/code \
|
|
||||||
OUTPUT_PATH=/path/to/output/ \
|
|
||||||
docker-compose run manim example_scenes.py SquareToCircle -l
|
|
||||||
```
|
|
||||||
The command needs to be run as root if your username is not in the docker group.
|
|
||||||
|
|
||||||
You can replace `example.scenes.py` with any relative path from your `INPUT_PATH`.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
After running the output will say files ready at `/tmp/output/`, which refers to path inside the container. Your `OUTPUT_PATH` is bind mounted to this `/tmp/output` so any changes made by the container to `/tmp/output` will be mirrored on your `OUTPUT_PATH`. `/media/` will be created in `OUTPUT_PATH`.
|
|
||||||
|
|
||||||
`-p` won't work as manim would look for video player in the container system, which it does not have.
|
|
||||||
|
|
||||||
The first time you execute the above command, Docker will pull the image from Docker Hub and cache it. Any subsequent runs until the image is evicted will use the cached image.
|
|
||||||
Note that the image doesn't have any development tools installed and can't preview animations. Its purpose is building and testing only.
|
|
||||||
|
|
||||||
## Using manim
|
## Using manim
|
||||||
Try running the following:
|
Try running the following:
|
||||||
|
@ -104,11 +73,13 @@ Set `MEDIA_DIR` environment variable to specify where the image and animation fi
|
||||||
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.
|
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
|
||||||
Documentation is in progress at [eulertour.com/learn/manim](https://www.eulertour.com/learn/manim/).
|
Documentation is in progress at [eulertour.com/docs](https://www.eulertour.com/docs/). And there is also an all-in-one documentation and tutorials maintained by **@manim-kindergarten**: [manim.ml](https://manim.ml/) (in Chinese).
|
||||||
|
|
||||||
### Walkthrough
|
### 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.
|
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.
|
||||||
|
|
||||||
|
[manim-kindergarten](https://github.com/manim-kindergarten/) wrote and collected some useful extra classes and some codes of videos in [manim_sandbox repo](https://github.com/manim-kindergarten/manim_sandbox).
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
Is always welcome. In particular, there is a dire need for tests and documentation.
|
Is always welcome. In particular, there is a dire need for tests and documentation.
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
Loading…
Add table
Reference in a new issue