본문 바로가기

Programming/Manim Lectures

[05-1]Common methods of Mobject

반응형

The superclass of all objects in Manim is Mobject. By inheriting this Mobject, classes such as text, shapes, graphs, and images are created. We'll cover how to deal with these classes in Chapter 05.

 

Prior to this, in this chapter, we will first look at common methods that all objects have. It is a common method used in all objects, so it will be efficient to know here first.

 


Common methods are defined in the Mobject class. There are quite a few methods in the Mobject class, and only the most used methods are selected and explained. The rest methods will be explained when needed.

 

The Mobject class code is in the manimlib/mobject/mobject.py file. Refer to this file for a complete list of which methods are available.

Among the common methods in Mobject, I have categorized frequently used methods according to their usage.

 

Category Methods
A. Moving move_to, to_edge, to_corner, next_to, shift
B. Dimensional get_width/height, set_width/height, get_center/top/bottom/left/right
C. Aligning align_to, arrange, arrange_in_grid
D. Coloring set_color, set_color_by_gradient
E. Status changing scale, rotate
F. Status copy, save_state, restore

 

[05-1-A]Moving methods

[05-1-B]Dimensional methods: get_width/height/top, set_width/height

[05-1-C]Aligning methods: align_to, arrange, arrange_in_grid

[05-1-D]Coloring methods: set_color, set_color_by_gradient

[05-1-E]Shape changing methods: scale, rotate

 


Next: [05-1-A]Moving methods

 

[05-1-A]Moving methods

For the methods related to the movement of coordinates, please refer to [04]Coordinate.

infograph.tistory.com

Go To: [99] Table of Contents

반응형