显示递增子集

限定名称: manim.animation.creation.ShowIncreasingSubsets

class ShowIncreasingSubsets(mobject=None, *args, use_override=True, **kwargs)[来源]

基础类:Animation

一次显示一个子对象,将所有之前的子对象保留在屏幕上。

示例

示例:显示递增子集场景

from manim import *

class ShowIncreasingSubsetsScene(Scene):
    def construct(self):
        p = VGroup(Dot(), Square(), Triangle())
        self.add(p)
        self.play(ShowIncreasingSubsets(p))
        self.wait()
class ShowIncreasingSubsetsScene(Scene):
    def construct(self):
        p = VGroup(Dot(), Square(), Triangle())
        self.add(p)
        self.play(ShowIncreasingSubsets(p))
        self.wait()

方法

interpolate_mobject

根据alpha值对Animation的mobject进行插值。

update_submobject_list

Parameters:
  • group (Mobject)

  • suspend_mobject_updating (bool)

  • int_func (Callable[[np.ndarray], np.ndarray])

interpolate_mobject(alpha)[source]

根据alpha值对Animation的mobject进行插值。

Parameters:

alpha (float) – 一个介于0和1之间的浮点数,表示动画完成的比例。例如,alpha值为0、0.5和1分别对应动画完成0%、50%和100%。

Return type: