Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

adds dependencies in requirements.txt and moves output directory within the folder so its self contained

Scott Opelld7ed7b31962c
diff --git a/README.md b/README.md
index 1d21ad2ee..57bf5bc1c 100644
--- a/README.md
+++ b/README.md
@@ -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://[email protected]/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)
+```
diff --git a/constants.py b/constants.py
index 8d601c52f..31fb82e39 100644
--- a/constants.py
+++ b/constants.py
@@ -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):
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000000000..1437a6da0
--- /dev/null
+++ b/requirements.txt
@@ -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