Sideway
output.to from Sideway
Draft for Information Only

Content

Getting Start with Manim on Windows 10
 Script manim.py
 Syntax of Manim
  Arguments
   positional arguments
   optional arguments
 Form of Manim Command
 Code Editor
 Project Folder
 Source and Reference

Getting Start with Manim on Windows 10

Manim is a Python library. The standard command to run a manim script is
python -m manim ⋯

Script manim.py

The arguments for Manim can be obtained by typing a python command on the command shell at the top-level manim directory.
python -m manim --help
The argument "-m" is the optional argument for python, while the argument "--help" is the optional argument for manim. Output of the command is image

Syntax of Manim

The syntax of using script manim.py is manim.py [-h] [-p] [-w] [-s] [-l] [-m] [--high_quality] [-g] [-i] [-f] [-t] [-q] [-a] [-o FILE_NAME] [-n START_AT_ANIMATION_NUMBER] [-r RESOLUTION] [-c COLOR] [--sound] [--leave_progress_bars] [--media_dir MEDIA_DIR] [--video_dir VIDEO_DIR | --video_output_dir VIDEO_OUTPUT_DIR] [--tex_dir TEX_DIR] [--livestream] [--to-twitch] [--with-key TWITCH_KEY] [file] [scene_names [scene_names ...]]

Arguments

positional arguments

filepath to file holding the python code for the scene scene_namesName of the Scene class you want to see

optional arguments

-h, --helpshow this help message and exit -p, --previewAutomatically open the saved file once its done -w, --write_to_movieRender the scene as a movie file -s, --save_last_frameSave the last frame -l, --low_qualityRender at a low quality (for faster rendering) -m, --medium_qualityRender at a medium quality --high_qualityRender at a high quality -g, --save_pngsSave each frame as a png -i, --save_as_gifSave the video as gif -f, --show_file_in_finderShow the output file in finder -t, --transparentRender to a movie file with an alpha channel -q, --quiet -a, --write_allWrite all the scenes from a file -o FILE_NAME, --file_name FILE_NAMESpecify the name of the output file, if it should be different from the scene class name -n START_AT_ANIMATION_NUMBER, --start_at_animation_number START_AT_ANIMATION_NUMBERStart rendering not from the first animation, butfrom another, specified by its index. If you passin two comma separated values, e.g. "3,6", it will endthe rendering at the second value -r RESOLUTION, --resolution RESOLUTIONResolution, passed as "height,width" without space -c COLOR, --color COLORBackground color --soundPlay a success/failure sound --leave_progress_barsLeave progress bars displayed in terminal --media_dir MEDIA_DIRdirectory to write media --video_dir VIDEO_DIRdirectory to write file tree for video --video_output_dir VIDEO_OUTPUT_DIRdirectory to write video --tex_dir TEX_DIRdirectory to write tex --livestreamRun in streaming mode --to-twitchStream to twitch --with-key TWITCH_KEYStream key for twitch

Form of Manim Command

A manim command is usually in form of a tree structure. For example,
python -m manim example_scenes.py SquareToCircle -pl
The python command is used to call the Python interpreter. The command line switch -m is used to allow following module to be located using the Python module namespace for execution as a script. manim is the module name passed to Python for running the manim.py script in the main manim directory. The file argument example_scenes.py is the name of the module in which the script of a task is stored. The scene argument SquareToCircle is the name of the class or scene defined in the script to complete a job. The -p switch is to specify opening the saved file automatically once its done. And the -l switch is to specify rendering at a low quality for faster rendering.

Code Editor

Any text editor can be used as the code editor for coding the manim script. The open source Visual Studio Code from Microsoft is one of the choices with usable usability. image

Project Folder

python -m manim tut/text001a.py -ps -c gray Project files can be stored in an individual project folder and the manim command used to call these project files can be revised by adding the folder namely accordingly. For example,
python -m manim tut/text001a.py -ps -c gray
Besides, in order to enable the Visual Studio Code interpreting the manim script collectly, a copy of the entire contents of the manimlib folder should be duplicated under the project folder, e.g. tut. Similarly, the Manim color constants can also be added to the tut/manimlib/imports.py such that Visual Studio Code can identify Manim color constants. image

Source and Reference

https://github.com/3b1b/manim19Dec2019

©sideway

ID: 200201502 Last Updated: 15/2/2020 Revision: 0

IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 337

Reference 67

Computer

Hardware 149

Software

Application 198

Digitization 25

Latex 7

Manim 115

Numeric 19

Programming

Web 283

Unicode 494

HTML 65

CSS 58

ASP.NET 149

OS 389

DeskTop 7

Python 19

Knowledge

Mathematics

Formulas 8

Algebra 25

Number Theory 206

Trigonometry 18

Geometry 21

Calculus 67

Complex Analysis 21

Engineering

Tables 8

Mechanical

Mechanics 1

Rigid Bodies

Statics 92

Dynamics 37

Fluid 5

Fluid Kinematics 5

Control

Process Control 1

Acoustics 19

FiniteElement 2

Physics

Electric 27

Biology 1

Geography 1


Copyright © 2000-2020 Sideway . All rights reserved Disclaimers last modified on 06 September 2019