manim.animation.indication.Flash

class Flash(mobject=None, *args, use_override=True, **kwargs)[source]

Bases: manim.animation.composition.AnimationGroup

Send out lines in all directions.

Parameters
  • point – The center of the flash lines. If it is a Mobject its center will be used.

  • line_length – The length of the flash lines.

  • num_lines – The number of flash lines.

  • flash_radius – The distance from point at which the flash lines start.

  • line_stroke_width – The stroke width of the flash lines.

  • color – The color of the flash lines.

  • time_width – The time width used for the flash lines. See ShowPassingFlash for more details.

  • run_time – The duration of the animation.

  • kwargs (Any) – Additional arguments to be passed to the Succession constructor

  • mobject (Optional[manim.mobject.mobject.Mobject]) –

  • use_override (bool) –

Examples

Example: UsingFlash

from manim import *

class UsingFlash(Scene):
    def construct(self):
        dot = Dot(color=YELLOW).shift(DOWN)
        self.add(Tex("Flash the dot below:"), dot)
        self.play(Flash(dot))
        self.wait()

Example: FlashOnCircle

from manim import *

class FlashOnCircle(Scene):
    def construct(self):
        radius = 2
        circle = Circle(radius)
        self.add(circle)
        self.play(Flash(
            circle, line_length=1,
            num_lines=30, color=RED,
            flash_radius=radius+SMALL_BUFF,
            time_width=0.3, run_time=2,
            rate_func = rush_from
        ))

Methods

create_line_anims

create_lines