반응형
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 :
Next: [06-2] Animation by Object's Method
Go To: [99] Table of Contents
반응형
'Programming > Manim Lectures' 카테고리의 다른 글
[06-3] Animation by Object Updating (0) | 2020.06.09 |
---|---|
[06-2] Animation by Object's Method (0) | 2020.06.09 |
[06-1-H] Animation : Grouping (0) | 2020.06.09 |
[06-1-G] Animation : Transformation series (3/3) (0) | 2020.06.09 |
[06-1-F] Animation : Transformation series (2/3) (0) | 2020.06.09 |