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: 2/15/2020 Revision: 0


Latest Updated LinksValid XHTML 1.0 Transitional Valid CSS!Nu Html Checker Firefox53 Chromena IExplorerna
IMAGE

Home 5

Business

Management

HBR 3

Information

Recreation

Hobbies 8

Culture

Chinese 1097

English 339new

Travel 7new

Reference 79

Computer

Hardware 251

Software

Application 213

Digitization 32

Latex 52

Manim 205

KB 1

Numeric 19

Programming

Web 289

Unicode 504

HTML 66

CSS 65

SVG 46

ASP.NET 270

OS 431

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

Set 1

Logic 1

Algebra 84

Number Theory 206

Trigonometry 31

Geometry 34

Coordinate Geometry 2

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

Natural Sciences

Matter 1

Electric 27

Biology 1

Geography 1


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