Manim scenes for illustrations for my seminar thesis about Pascal's triangle.
This project is licensed under the MIT License – see the licence file for details.
- Make sure you have Python installed.
- Optional: Create virtual environment for Manim:
py -m venv .venv
- Install requirements:
pip install -r requirements.txt
- Optional: Create config file for Manim:
You can set the resolution in
manim cfg export
manim.cfg
to 4k to render more detailed images:pixel_height = 2160 pixel_width = 3840
Default renderer for Manim. To render an image with Cairo run command:
manim [-t] -s <file> <scene>
The -t
flag makes the background transparent.
OpenGl renderer is required for 3D scenes and it does not support transparent background.
IMPORTANT: Make sure to set renderer = opengl
in the config file, otherwise the render will be VERY slow and the rendered image will be rendered incorrectly! This setting does not do anything when you render with Cairo.
To render an image with OpenGl run command:
manim --renderer=opengl <file> <scene>
OpenGL supports interactive mode. For that you need to have IPython installed. (You should already have it installed if you installed the requirements.)
To run Manim in interactive mode add -p
flag to the command above. You also need to include the interactive mode in the code:
self.interactive_embed()
You can set the position and other properties in the config file.
You can leave <scene>
empty to show all scenes in the <file>
.
To render all scenes in <file>
put -a
flag instead of the <scene>
.