Skip to content

Manim scenes for visualizing Pascal's triangle in my thesis.

License

Notifications You must be signed in to change notification settings

Zaop7/PascalsTriangle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pascals Triangle

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.

How to render

  1. Make sure you have Python installed.
  2. Optional: Create virtual environment for Manim:
    py -m venv .venv
    
  3. Install requirements:
    pip install -r requirements.txt
    
  4. Optional: Create config file for Manim:
    manim cfg export
    
    You can set the resolution in manim.cfg to 4k to render more detailed images:
    pixel_height = 2160
    pixel_width = 3840

Rendering with Cairo

Default renderer for Manim. To render an image with Cairo run command:

manim [-t] -s <file> <scene>

The -t flag makes the background transparent.

Rendering with OpenGL

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.

Tips

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>.

About

Manim scenes for visualizing Pascal's triangle in my thesis.

Topics

Resources

License

Stars

Watchers

Forks

Languages