Sideway
output.to from Sideway
Draft for Information Only

Content

Basic-Manim Get Started
 SidewayOutput Tube
  Basic-Manim Get Started Introduction
 Introduction
 Scene Subclass
 Scene
 Frame
 Animation Scene Object
 Mobject Object
  Mobject Type
  Mobject Form
 Animation Object
  Animation Type
  Animation Form
 Camera Object
 CamEngine Object
 Scene Object
 SceneEngine Object
 Windows Command Line Interface
  Using Basic-Manim:
  Syntax to run Basic-Manim scene
  Example

Basic-Manim Get Started

SidewayOutput Tube

Basic-Manim Get Started Introduction

Introduction

Basic-Manim is a Python project developed to test and update basic manim features based on 3b1b Manim @19Dec2019 (Cairo Version) for SidewayOutput Projects. 3b1b Manim is an animation engine designed for creating explanatory math videos by Grant Sanderson on Git hub. The animation scene object, is an instance of the subclass of the Scene class, constructed by the construct method.

Scene Subclass

Scene subclass is a Python script with a construct method, which returns an instance of the constructed animation scene. The animation scene object is created by running the Python script, for example: python -m manim project/basicmanim/002/basicmanim_23_scenesubclass_001a.py -pl

Scene

Mobjects are added to the virtual world space canvas. A scene is a shot of the display window frames, of the virtual world space canvas, with audio, at default shooting frame rate of 60 frames per second (fps). By default, the aspect ratio of display window is 16 to 9, and the window height is 9 unit, the window width is therefore, equal to 16 unit. The center of the window is the origin of x and y-axis.

Frame

A scene is a frame sequence. A frame is a 2D-display window with pixels. The corresponding pixel dimensions of the 2D-display window, by default, are 2560 pixels horizontally and 1440 pixels vertically. In other words, the pixel array of a frame, a single picture, is equal to 2560 by 1440. For a 16 unit by 9 unit display window, the pixel density is 160 pixels per unit, or with pixel resolution 0.00625 units per pixel. Besides, unlike display window, the origin of the pixel coordinate system is the top left frame corner.

Animation Scene Object

The frame sequence of an animation scene object, is constructed by specifying scene actions, in the construct method of the Scene subclass. In general, scene action methods can be divided into two categories, static, and dynamic methods. Static scene method is used to operate a scene action at a specific time, while dynamic scene method is used to operate a scene action over a period of time. For example: Static method:add, remove, clear, ... etc. Dynamic method:play, wait, ... etc.

Mobject Object

Mobject object is the fundamental element, used to represent some real world object in the virtual world space of the application environment. Mobject object itself is a dummy object, and, is used as an object container. For example. self.add(Mobject()).be(‘mobj6’), GeomMark(v.mobj6)) Therefore, Mobject objects are of different types and forms, according to the objects portrayed in the virtual world space. Some typical examples are. Types:Point, PointMobject, RasterGraphicMobject, VectorGraphicMobject, etc. Forms:DotPoint, ImageMobject, BezierCurve, etc.

Mobject Type

A Mobject type is a dummy object with composite datatype, which is used as an abstract type template to encapsulate, and, to manipulate a specific type structure for some real-world object. The data structure of the Mobject type is formed by attributes, while, the behaviour of the Mobject type is characterized by methods. For example.
  • Point is a null Mobject with location only. For example.
    self.add(Point().be('pnt7'),GeomMark(v.pnt7)
  • PointMobject is a dummy point cloud Mobject, and is used as an object container for some dot point object. For example
    self.add(PointMobject().be('pmobj7'),GeomMark(v.pmobj7)
  • RasterGraphicMobject is a dummy regular pixel array Mobject, and is used as an object container for some raster graphic object. For example
    self.add(RasterGraphicMobject().be('gmobj7'),GeomMark(v.gmobj7)
  • VectorGraphicMobject is a dummy vectorized Mobject, and is used as an object container for some vector graphic object. For example
    self.add(VectorGraphicMobject().be('vmobj7'),GeomMark(v.vmobj7)

Mobject Form

A Mobject Form is an object with composite datatype, which is used as an abstract form template, along with the methods to encapsulate, and to manipulate, a specific form structure for a specific Mobject type. Besides, there is also a constructor method, which can be used to create, a new instance of the object form, by filling in its corresponding attributes accordingly. For example.
  • DotPoint is a dot point PointMobject, and is used to represent a pixel point. For example.
    self.add(DotPoint(stroke width=48).be('dpnt8'),GeomMark(v.dpnt8)
  • ImageMobject is a pixel cloud RasterGraphicMobject, and is used to represent a raster image. For example.
    self.add(ImageMobject().be('imobj8'),GeomMark(v.imobj8)
  • BezierCurve is a vertorized VectorGraphicMobject and is used to represent a Bezier curve. For example.
    self.add(BezierCurve().be('bcrv8'),GeomMark(v.bcrv8)

Animation Object

Animation object is a functional object with composite datatype, which is used as an abstract animation constructor along with the methods, to animate some Mobject action in the virtual world space of the application environment, by means of interpolation. Animation object itself is a dummy object, and is used as an animator container. For example.
self.add(Animation().mobject.be('anim9'),GeomMark(v.anim9))
Therefore, Animation objects are of different types and forms, and are designed according to the animations portrayed in the virtual world space. Some typical examples are: Types:Construction, Manipulation, Transformation, Composition, etc. Forms:ShowCreation, UpdateFromFunc, Transform, AnimationGroup, etc.

Animation Type

An Animation type is a dummy functional object with composite datatype, which is used as an abstract animator to encapsulate and to manipulate, a specific animation type for representing some real-world action type, in the virtual world space of the application environment. The data structure of the Animation type is formed by attributes, while the behavior of the Animation type is characterized by methods. For example
  • Construction is a dummy animator, and is used to animate the construction of the specified Mobject, according to the design characteristics. For example
    self.add(Construction().mobject.be('const10'),GeomMark(v.const10))
  • Manipulation is a dummy animator, and is used to animate the manipulation of the specified Mobject, according to the design characteristics. For example
    self.add(Manipulation().mobject.be('manip10'),GeomMark(v.manip10))
  • Transformation is a dummy animator, and is used to animate the transformation of the specified Mobject to another specified Mobject, according to the design characteristics. For example
    self.add(Transformation().mobject.be('trans10'),GeomMark(v.trans10))
  • Composition is a dummy animator, and is used to arrange a collection of Animation objects, according to the design characteristics. For example
    self.add(Composition().mobject.be('compo10'),GeomMark(v.compo10))

Animation Form

An Animation form is a functional object with composite datatype, which is used as an abstract animation template along with the methods, to encapsulate and to manipulate a specific animation form, for representing some real-world action form in the virtual world space of the application environment. Besides, there is also a constructor method, which can be used to create a new instance of the object form, by filling in its corresponding attributes accordingly. For example
  • ShowCreation is a Construction Animation, and is used to show the creation of an object. For example
    self.play(ShowCreation(Circle()))
  • UpdateFromFunc is a Manipulation Animation, and is used to manipulate the attributes of a Mobject, according to the specified arguments. For example
    self.play(UpdateFromFunc(Circle(),lambda m:m.scale(0.98)))
  • Transform is a Transformation Animation, and is used to transform a Mobject to another specified Mobject, according to the specified arguments. For example
    self.play(Transform(ImageMobject(np.uint8([[50]])),ImageMobject(np.uint8([[255]]))))
  • AnimationGroup is a Composition Animation, and is used to combine Animation objects together as one single compound Animation, according to the specified arguments. For example
    self.play(AnimationGroup(Transform(ImageMobject(np.uint8([[50]])),ImageMobject(np.uint8([[255]]))),UpdateFromFunc(Circle(),lambda m:m.scale(0.98))))

Camera Object

Camera object is a functional object, and is used to represent the graphic view of geometric real-world, in the virtual world space of the application environment. In other words, Camera object is an object with composite datatype, which is used as an abstract template, along with the methods to encapsulate and to manipulate, the specific data structure of, the virtual camera class, the virtual camera viewpoint, and the virtual camera viewport, etc., in the virtual world space of the application environment. Camera object itself is used to set up, the camera view, by defining the corresponding attributes accordingly.

CamEngine Object

CamEngine object is a functional object, and is used to represent the graphic computing engine, in the virtual world space of the application environment. In other words, CamEngine object is an object with composite datatype, which is used as an abstract template, along with the methods to encapsulate and to manipulate, the specific data structure of, vertex shader, object render, and pixel shader, etc., in the virtual world space of the application environment. CamEngine object itself is used to set up, the pixel array of camera frame, by defining the corresponding attributes accordingly.

Scene Object

Scene object is a functional object, and is used to represent the frame-based animation scene, in the virtual world space of the application environment. In other words, Scene object is an object with composite datatype, which is used as an abstract template along with the methods, to encapsulate and to manipulate the specific data structure of, scene story, scene viewport, and scene viewpoint, etc., in the virtual world space of the application environment. Scene object itself is used to set up the animation scene, by defining the corresponding attributes accordingly.

SceneEngine Object

SceneEngine object is a functional object, and is used to represent the animation creator, in the virtual world space of the application environment. In other words, SceneEngine object is an object with composite datatype, which is used as an abstract template along with the methods to encapsulate and to manipulate, the specific data structure of, the animation controller, time controller, effect controller, etc., in the virtual world space of the application environment. SceneEngine object itself is used to set up scene animator, by defining the corresponding attributes accordingly.

Windows Command Line Interface

Using Basic-Manim:

Change directory to the working directory containing the unzipped "Basic-Manim" files, for example:
Run.: cmd /c start /d "E:\GitHub\Basic-Manim"

Syntax to run Basic-Manim scene

python, -m, manim, file name, [scene name, [scene name ...]], [parameters]
file name:path to Basic-Manim scene code scene name:optional name of the Scene class to run parameters:optional command flags

Example

python -m manim project\basicmanim\helloworld.py -pl
file name:project\basicmanim\helloworld.py scene name:none Parameters:-p: preview the rendering result -l: render at a low quality for trial run

©sideway

ID: 230300018 Last Updated: 3/18/2023 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 339

Reference 79

Computer

Hardware 249

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 429

DeskTop 7

Python 72

Knowledge

Mathematics

Formulas 8

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