Playing around with manim - animation engine used by 3Blue1Brown
This project is maintained by sujay-mahadik
Playing around with manim - animation engine used by 3Blue1Brown
git clone https://github.com/3b1b/manim.git
Follow the Installation instructions from here
constants.py
and set MEDIA_DIR
to point to the directory in your system where image and animation files will be written
#Change this to your own directory
MEDIA_DIR = os.path.join(
os.path.expanduser('~'),
"Dropbox (3Blue1Brown)/3Blue1Brown Team Folder"
)
-p
is for previewing, meaning the the video file will automatically open when it is done rendering. Use -l
for a faster rendering at a lower quality. Use -s
to skip to the end and just show the final frame. Use -n (number)
to skip ahead to the n’th animation of a scene. Use -f
to show the file in directory.
python3 extract_scene.py example_scenes.py SquareToCircle -pl
Gif demos of the scripts I have experimented with
Run:
python3 extract_scene.py scripts/hello_world.py HelloWorld -pl
We are calling the Python3 interpreter with the python3
command. The first argument extract_scene.py
is the part of manim code that runs your script, imports necessary files and creates files. This argument will always be needed. The second argument scripts/hello_world.py
is the name of the file with custom scripts. The third argument HelloWorld
is the name of class for which you are creating the scene. A single file can contain multiple classes, you need to specify the class name for which you are creating the scene. The last arguments are well documented in installation section
Run:
python3 extract_scene.py scripts/shape_transformations.py ShapeTransformations -pl