Merge pull request #1 from scottopell/master

How to use
This commit is contained in:
Grant Sanderson 2016-05-25 20:31:03 -07:00
commit 585429e8ee
4 changed files with 49 additions and 2 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*.pyc
animation_files/

View file

@ -2,3 +2,41 @@
Animation engine for explanatory math videos
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)
```

View file

@ -53,7 +53,7 @@ LEFT_SIDE = SPACE_WIDTH*LEFT
RIGHT_SIDE = SPACE_WIDTH*RIGHT
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")
GIF_DIR = os.path.join(FILE_DIR, "gifs")
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")
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,
STAGED_SCENES_DIR]:
if not os.path.exists(folder):

7
requirements.txt Normal file
View 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