jllovet / opening-questions-manim

Custom Version of manim for Opening Questions Youtube animations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Opening Questions - Manim

About

Custom version of the animation library manim to run code for videos on the Opening Questions Youtube channel.

Opening Questions is here to make resources for people to learn and engage with computer science, programming, math and science (and how they have developed throughout history), and philosophy.

The code for Opening Questions' animations can be found in opening-questions-animations

The manim math animation engine, was originally made by Grant Sanderson for 3b1b. Many thanks to Grant for creating this powerful tool, sharing it with the world, and making videos that help us see what's wonderful about math.

I have included extensions of manim provided by the community in my scenes:

Thanks to Alexander Vázquez (Elteoremadebeethoven) for being so helpful with learning manim and supporting the community.

Usage

I recommend using docker-compose to run manim. This simplifies the otherwise difficult installation process, and it helps prevent potential conflicts between dependencies here and other applications on your workstation.


Install Docker

If it is not already installed, you'll need to install Docker.


Create .env for Environment Variables

Following this, create a file .env in the root of the project (i.e., manim/.env).

  • This will contain environment variables for your manim container.
cd manim
touch .env

In .env, specify the INPUT_PATH that contains the Scenes that you want to render.

Then specify the OUTPUT_PATH that will be the output directory for artifacts created by manim.

INPUT_PATH=/Users/me/manim/
OUTPUT_PATH=/Users/me/manim/outputAnimations/

The INPUT_PATH and OUTPUT_PATH environment variables that you specified in .env are used to create volumes between your host machine and the docker image, which will allow docker to read and write files to and from your host machine in the mapped directories. - See this page for more information about volumes in docker.


Building a Manim Docker Image

Following this, inside the manim directory, run the following:

docker-compose build

This will generate a docker image that you can render your scenes in.


Running Manim

Finally, you can render your scenes in manim. Try one of the example scenes or one from opening_questions:

WarpSquare Scene:

docker-compose run manim example_scenes.py WarpSquare -l

Custom Example Scene:

docker-compose run manim opening_questions/learning_manim/learning_manim_001.py Shape -l

Syntax:

docker-compose run manim <relative_path_to_scene>.py <classname> [flags]

Resources

Resources for Learning Manim

Community

Related Projects

Other Animation Tools

About

Custom Version of manim for Opening Questions Youtube animations

License:Other


Languages

Language:Python 100.0%Language:TeX 0.0%Language:Dockerfile 0.0%Language:Shell 0.0%