manim.animation.indication.Flash

class Flash(point, line_length=0.2, num_lines=12, flash_radius=0.1, line_stroke_width=3, color='#FFFF00', time_width=1, run_time=1.0, **kwargs)[source]

Bases: manim.animation.composition.AnimationGroup

Send out lines in all directions.

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

  • line_length (float) – The length of the flash lines.

  • num_lines (int) – The number of flash lines.

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

  • line_stroke_width (int) – The stroke width of the flash lines.

  • color (str) – The color of the flash lines.

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

  • run_time (float) – The duration of the animation.

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

Return type

None

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