mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
adds dependencies in requirements.txt and moves output directory within the folder so its self contained
This commit is contained in:
parent
0e75c338af
commit
d7ed7b3196
3 changed files with 47 additions and 2 deletions
38
README.md
38
README.md
|
@ -2,3 +2,41 @@
|
||||||
Animation engine for explanatory math videos
|
Animation engine for explanatory math videos
|
||||||
|
|
||||||
updates coming...
|
updates coming...
|
||||||
|
|
||||||
|
## Install requirements
|
||||||
|
```sh
|
||||||
|
pip install -r requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
`aggdraw` has to be installed manually, pip can't do it for you.
|
||||||
|
|
||||||
|
Here are directions that should work on any 64 bit platform (tested on osx
|
||||||
|
10.11.4)
|
||||||
|
|
||||||
|
This doesn't install freetype, but I don't think its required for this project
|
||||||
|
|
||||||
|
```
|
||||||
|
cd $TMPDIR
|
||||||
|
# or hg clone https://stefanfoulis@bitbucket.org/2degrees/aggdraw-64bits
|
||||||
|
# instead of the next 2 commands
|
||||||
|
wget https://bitbucket.org/2degrees/aggdraw-64bits/get/a95a86958b68.zip
|
||||||
|
unzip a95a86958b68.zip -d aggdraw-64bits
|
||||||
|
cd aggdraw-64bits
|
||||||
|
/usr/local/bin/python setup.py build_ext -i
|
||||||
|
/usr/local/bin/python setup.py install
|
||||||
|
```
|
||||||
|
|
||||||
|
## How to Use
|
||||||
|
Not exactly sure. I think I'm supposed to run `python extract_scene.py
|
||||||
|
generate_logo.py`, but that fails with the following error.
|
||||||
|
|
||||||
|
```
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "extract_scene.py", line 205, in main
|
||||||
|
handle_scene(SceneClass(**scene_kwargs), **config)
|
||||||
|
File "/Users/scott/scratch/manim/scene/scene.py", line 32, in __init__
|
||||||
|
self.construct(*self.construct_args)
|
||||||
|
File "/Users/scott/scratch/manim/./generate_logo.py", line 50, in construct
|
||||||
|
self.interpolation_factor
|
||||||
|
TypeError: interpolate() takes exactly 5 arguments (4 given)
|
||||||
|
```
|
||||||
|
|
|
@ -53,7 +53,7 @@ LEFT_SIDE = SPACE_WIDTH*LEFT
|
||||||
RIGHT_SIDE = SPACE_WIDTH*RIGHT
|
RIGHT_SIDE = SPACE_WIDTH*RIGHT
|
||||||
|
|
||||||
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
|
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||||
FILE_DIR = os.path.join(THIS_DIR, os.pardir, "animation_files")
|
FILE_DIR = os.path.join(THIS_DIR, "animation_files")
|
||||||
IMAGE_DIR = os.path.join(FILE_DIR, "images")
|
IMAGE_DIR = os.path.join(FILE_DIR, "images")
|
||||||
GIF_DIR = os.path.join(FILE_DIR, "gifs")
|
GIF_DIR = os.path.join(FILE_DIR, "gifs")
|
||||||
MOVIE_DIR = os.path.join(FILE_DIR, "movies")
|
MOVIE_DIR = os.path.join(FILE_DIR, "movies")
|
||||||
|
@ -63,7 +63,7 @@ TEX_IMAGE_DIR = os.path.join(IMAGE_DIR, "Tex")
|
||||||
MOBJECT_DIR = os.path.join(FILE_DIR, "mobjects")
|
MOBJECT_DIR = os.path.join(FILE_DIR, "mobjects")
|
||||||
IMAGE_MOBJECT_DIR = os.path.join(MOBJECT_DIR, "image")
|
IMAGE_MOBJECT_DIR = os.path.join(MOBJECT_DIR, "image")
|
||||||
|
|
||||||
for folder in [IMAGE_DIR, GIF_DIR, MOVIE_DIR, TEX_DIR,
|
for folder in [FILE_DIR, IMAGE_DIR, GIF_DIR, MOVIE_DIR, TEX_DIR,
|
||||||
TEX_IMAGE_DIR, MOBJECT_DIR, IMAGE_MOBJECT_DIR,
|
TEX_IMAGE_DIR, MOBJECT_DIR, IMAGE_MOBJECT_DIR,
|
||||||
STAGED_SCENES_DIR]:
|
STAGED_SCENES_DIR]:
|
||||||
if not os.path.exists(folder):
|
if not os.path.exists(folder):
|
||||||
|
|
7
requirements.txt
Normal file
7
requirements.txt
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
aggdraw===1.1-64bits
|
||||||
|
colour==0.1.2
|
||||||
|
numpy==1.11.0
|
||||||
|
Pillow==3.2.0
|
||||||
|
progressbar==2.3
|
||||||
|
scipy==0.17.1
|
||||||
|
tqdm==4.7.1
|
Loading…
Add table
Reference in a new issue