본문 바로가기

Programming/Manim Lectures

[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: focal_point
    The central location or object through which concentric circles will spread. 
    In the case of an object, the center of the object becomes the center position

Parameters: **kwargs
    CONFIG values of Broadcast and AnimationGroup

    Frequently used variables are,
    - small_radius=0.0: The radius of the smallest circle at the center
    - big_radius=5: The radius of the largest concentric circle
    - n_circles=5: The number of circles
    - color=WHITE: The color of circle
    - lag_ratio=0.2: Time difference between the starting time of circles
    - run_time=3: Running time of animation

 

 

The example below is an animation in which concentric circles spread out in the background as text is displayed.

 

    def broadcast(self):
        text = VGroup(
            TextMobject("Monday"),
            TextMobject("Tuesday"),
            TextMobject("Wednesday"),
            TextMobject("Thursday"),
            TextMobject("Friday"),
        ).arrange(DOWN)

        dot = Dot(color=RED).move_to(2 * RIGHT)
        self.add(dot)

        def get_broadcast():
            return Broadcast(dot, big_radius=5, color=RED, run_time=5)

        self.play(
            LaggedStartMap(FadeIn, text, run_time=4, lag_ratio=0.7),
            Succession(*[
                get_broadcast()
                for x in range(2)
            ])
        )
        self.play(get_broadcast())
        self.wait()

 

 

mp4 file :

BoradcaseTest.mp4
0.72MB


Next:  [06-2] Animation by Object's Method

 

[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 anima..

infograph.tistory.com

Go To: [99] Table of Contents

반응형