示例#1
0
    def construct(self):
        words = TextMobject("Change we can believe in")
        change = VMobject(*words.split()[:6])
        top = TOP(radius=0.75)
        top.shift(change.get_right() - top.get_right())

        self.play(Write(words))
        self.play(FadeOut(change), GrowFromCenter(top))
        self.wait(3)
示例#2
0
文件: end.py 项目: PythonJedi/manim
    def construct(self):
        words = TextMobject("Change we can believe in")
        change = VMobject(*words.split()[:6])
        top = TOP(radius = 0.75)
        top.shift(change.get_right()-top.get_right())

        self.play(Write(words))
        self.play(
            FadeOut(change),
            GrowFromCenter(top)
        )
        self.dither(3)
示例#3
0
 def get_exp_anim(self, center):
     epii = TexMobject("e^{\\pi i} = -1")
     epii.shift(center)
     top = TOP("e", "\\pi i", "-1", radius=0.75)
     top.shift(center)
     e, pi, i, equals, minus, one = epii.split()
     ##hacky
     loop = e.submobjects[0]
     loop.is_subpath = False
     loop.set_fill(BLACK, 1.0)
     e.submobjects = []
     ##
     start = VMobject(equals, VMobject(e, loop), VMobject(pi, i),
                      VMobject(minus, one))
     return Transform(start, top)
示例#4
0
 def get_log_anim(self, center):
     O_log_n = TexMobject(["O(", "\\log(n)", ")"])
     O_log_n.shift(center)
     log_n = O_log_n.split()[1]
     #super hacky
     g = log_n.split()[2]
     for mob in g.submobjects:
         mob.is_subpath = False
         mob.set_fill(BLACK, 1.0)
         log_n.add(mob)
     g.submobjects = []
     #end hack
     top = TOP(2, None, "n", radius=0.75)
     top.scale_to_fit_width(log_n.get_width())
     top.shift(log_n.get_center())
     new_O_log_n = O_log_n.copy()
     new_O_log_n.submobjects[1] = top
     return Transform(O_log_n, new_O_log_n)
示例#5
0
文件: end.py 项目: PythonJedi/manim
 def get_log_anim(self, center):
     O_log_n = TexMobject(["O(", "\\log(n)", ")"])
     O_log_n.shift(center)
     log_n = O_log_n.split()[1]
     #super hacky
     g = log_n.split()[2]
     for mob in g.submobjects:
         mob.is_subpath = False 
         mob.set_fill(BLACK, 1.0)
         log_n.add(mob)
     g.submobjects = []
     #end hack
     top = TOP(2, None, "n", radius = 0.75)
     top.scale_to_fit_width(log_n.get_width())
     top.shift(log_n.get_center())
     new_O_log_n = O_log_n.copy()
     new_O_log_n.submobjects[1] = top
     return Transform(O_log_n, new_O_log_n)
示例#6
0
文件: end.py 项目: PythonJedi/manim
 def get_exp_anim(self, center):
     epii = TexMobject("e^{\\pi i} = -1")
     epii.shift(center)
     top = TOP("e", "\\pi i", "-1", radius = 0.75)
     top.shift(center)
     e, pi, i, equals, minus, one = epii.split()
     ##hacky
     loop = e.submobjects[0]
     loop.is_subpath = False
     loop.set_fill(BLACK, 1.0)
     e.submobjects = []
     ##
     start = VMobject(
         equals,
         VMobject(e, loop), 
         VMobject(pi, i),
         VMobject(minus, one)
     )
     return Transform(start, top)