본문 바로가기

분류 전체보기

(284)
[06-3-C] Use Updating Class In the previous page, we looked at an animation technique that updates objects every frame using add_updater or always_redraw. These methods, Create some update_func that transforms tgt_mob. Regist update_func in the list of updaters functions of tgt_mob object. --> 'tgt_mob.add_updater(update_func)' or 'tgt_mob = always_redraw(update_func)' Play base_mob or ValueTracker, which will be base obje..
[06-3-B] Use always_redraw What we covered on the previous page was to use add_updater to specify a function to be executed for each frame, and to change the state value (position, color, etc.) of the object in this function. This allowed animations such as digital clocks to increase in number or to move along an elliptic curve. This time, we will use the new method of drawing the object itself, not the state value of the..
[06-3-A] Use add_updater The Mobject class has an add_updater method, which allows you to specify a function that will be executed whenever the object changes the video frame. manilib.mobject.mobject.Mobject.add_updater(self, update_function, index=None, call_updater=True) The add_updater function adds 'update_function' to 'updaters', a list of functions in charge of each frame of an object. If the index number is speci..
[06-3] Animation by Object Updating One of the best features of Manim animation is to control and animate the changes of objects in each scene. It's all about applying this technique to keep the object's color changing, move its position, change the number continuously like a digital timer, and let the tangent move along the line of the graph. The basic principle is to create a function that changes the properties (color, position..
[06-2] Animation by Object's Method We can animate the methods of the Mobject as it is. self.play(mob.to_edge, RIGHT) Most of the animation methods we saw earlier were by animation classes. In this animation class, it creates an animation by making the image of a different shape for each frame for the target object. Therefore, because the method of Mobject changes the shape of an object for each frame, it is the same principle to ..
[06-1-I] Animation : Special Effect Broadcast class object > Animation > AnimationGroup > LaggedStart > Broadcast manimlib.animation.specialized.Broadcast(self, focal_point, **kwargs) At one point, concentric circles spread out in all directions. CONFIG = { "small_radius": 0.0, "big_radius": 5, "n_circles": 5, "start_stroke_width": 8, "color": WHITE, "remover": True, "lag_ratio": 0.2, "run_time": 3, "remover": True, } Parameters: ..
[06-1-H] Animation : Grouping Animations can be grouped and handled. When grouped, whether to run each animation together or one by one is determined by lag_ratio. lag_ratio = 0 : Run together (simultaneously) lag_ratio = 1: The previous animation is finished and the next animation is executed 0 < lag_ratio < 1: Wait amount of the ratio, then run the next animation The most basic class is AnimationGroup class, Succession is ..
[06-1-G] Animation : Transformation series (3/3) It is the transformation animations that are performed by some method or function. Class Parameters Explanation ApplyMethod mobject, *args, **kwargs Animation effect where a method of mobject is performed. The *args is the parameter for method, and *8kwargs is CONFIG parameter dictionary for the ApplyMethod. ApplyPointwiseFunction function, mobject, **kwargs Animate the transformation by applyin..
[06-1-F] Animation : Transformation series (2/3) CyclicReplace class object > Animation > Transform > CyclicReplace manimlib.animation.transform.CyclicReplace(self, *mobjects, **kwargs) Move the given mobjects one by one. The first one changes to the second, the second to the third, the last one to the first, and so on, as if on a circular cycle. self.play(CyclicReplace(tri, square, circle), run_time=3) CONFIG = { "path_arc": 90 * DEGREES, } P..
[06-1-E] Animation : Transformation series (1/3) When there are two objects A and B, we will learn about the animation effect that A gradually changes to B. Class Parameters Explanation MoveAlongPath mobject, target_mobject=None mobject is converted to the location/form of target_mobject. At this time, the name of the object that has changed and remains is mobject not target_mobject. ClockwiseTransform mobject, target_mobject=None mobject is c..