본문 바로가기

분류 전체보기

(284)
[05-1-C]Aligning methods: align_to, arrange, arrange_in_grid align_to manimlib.mobject.mobject.Mobject.align_to(self, mobject_or_point, direction=ORIGIN) Arrange objects based on target objects or points. For example, if mob1.align_to(mob2, UP), move mob1 so that the upper line of mob1 and mob2 are the same. At this time, the other axis values of mob1 do not change and only move in the same direction as the upper line of mob2. Parameters: mobject_or_point..
[05-1-B]Dimensional methods: get_width/height/top, set_width/height get_width manimlib.mobject.mobject.Mobject.get_width(self) Gets the object's width, that is, the length in the x-axis direction. In Manim, the x-axis direction is between [-7.1, 7.1]. Therefore, the value of get_width is between [0,14.2] Returns: object's width value # Usage w = obj.get_width() set_width manimlib.mobject.mobject.Mobject.set_width(self, width, stretch=False, **kwargs) Change the ..
[05-1-A]Moving methods For the methods related to the movement of coordinates, please refer to [04]Coordinate. Next: [05-1-B]Dimensional methods: get_width/height/top, set_width/height [05-1-B]Dimensional methods: get_width/height/top, set_width/height get_width manimlib.mobject.mobject.Mobject.get_width(self) Gets the object's width, that is, the length in the x-axis direction. In Manim, the x-axis direction is betwe..
[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 d..
[05]Mobject In Mimim, there are classes that handle characters, formulas, and shapes that appear on the screen. This means that you need to use these classes when you want to display characters, formulas, and shapes on the screen. For example, to display the character 'Hello', you need to create an object using the Text class, such as text = Text("Hello"). Class and Object Classes and objects may not be wel..
[04-7] Examples: Object moving animation Let's make a simple animation showing the movement of a shape using to_edge and to_corner. The first screen is a dot on the left side, and this dot flies up/center/bottom of the wall on the right side. It's a simple animation, but if you follow the whole process of how to make a coding strategy for how to write these programming needs, and how to do the actual coding and execution, it will be a ..
[04-6] Move to relative position(shift) In the previous page, we looked at next_to, a method to move left/right/up/down based on an target object or position. In this chapter, we will learn about shift, a method that moves left/right/up/down from the position of object itself. Since we've only talked left/right/up/down, the next_to or shift method can be mistaken for only moving in these four directions, but can be moved in any direct..
[04-5] Move to relative position(next_to) In the previous page, we looked at the 'to_move', 'to_edge' and 'to_corner' method to send an object to the promised position, or absolute position. From this page, we will look at the 'next_to' and 'shift' methods that move around the object based on an object. next_to manimlib.mobject.Mobject.next_to( mobject_or_point, direction=RIGHT, buff=DEFAULT_MOBJECT_TO_MOBJECT_BUFFER, aligned_edge=ORIGI..
[04-4] Move to absolute position(to_corner) In the previous chapter, we looked at the to_edge that moves to the left/right/up/down direction of the screen. A similar method is to_corner. Move the object to the corner of the screen. For example, if you want to place your own logo on the bottom right of the screen when creating a video, you can say logo.to_corner(DR, buff=0.3). Here, the value of DR=DOWN+RIGHT points to the right side of th..
[04-3] Move to absolute position(to_edge) In the previous page, we learned about 'move_to' method, and it was a method that moves object directly to a specified point or another object's position. The 'to_edge' method moves the object from the current position toward the end of the screen edge. For example, 'object.to_edge(LEFT)' moves the object from its current position to the left end edge. to_edge manimlib.mobject.Mobject.to_edge(ed..