Saturday, November 26, 2016

macOS Sierra: Installing 3Blue1Brown Animation Engine for Explanatory Math Videos

Command:

$ git clone https://github.com/3b1b/manim.git


Result:

Cloning into 'manim'...
remote: Counting objects: 2652, done.
remote: Compressing objects: 100% (71/71), done.
remote: Total 2652 (delta 33), reused 0 (delta 0), pack-reused 2581
Receiving objects: 100% (2652/2652), 1.46 MiB | 736.00 KiB/s, done.
Resolving deltas: 100% (1976/1976), done.


Command:

$ cd manim
$ sudo pip install -r requirements.txt
Password:


Result:

The directory '/Users/USERNAME/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/USERNAME/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied (use --upgrade to upgrade): colour==0.1.2 in /usr/local/lib/python2.7/site-packages (from -r requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): numpy==1.11.0 in /usr/local/lib/python2.7/site-packages (from -r requirements.txt (line 2))
Collecting Pillow==3.4.2 (from -r requirements.txt (line 3))
  Downloading Pillow-3.4.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.4MB)
    100% |████████████████████████████████| 3.5MB 408kB/s
Collecting progressbar==2.3 (from -r requirements.txt (line 4))
Collecting scipy==0.17.1 (from -r requirements.txt (line 5))
  Downloading scipy-0.17.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (21.1MB)
    100% |████████████████████████████████| 21.1MB 69kB/s
Collecting tqdm==4.7.1 (from -r requirements.txt (line 6))
  Downloading tqdm-4.7.1-py2.py3-none-any.whl
Installing collected packages: Pillow, progressbar, scipy, tqdm
Successfully installed Pillow-3.4.2 progressbar-2.3 scipy-0.17.1 tqdm-4.7.1
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


Command (After installing aggdraw):

$ python extract_scene.py -p example_scenes.py SquareToCircle


Result:

Animation 1: ShowCreationSquare: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:00<00:00, 240.61it/s]
Animation 2: TransformSquareToCircle: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 20/20 [00:00<00:00, 233.58it/s]


Graphical result:

3Blue1Brown Animation engine running in Python