示例#1
0
    def construct(self):
        europe = ImageMobject("Europe", use_cache = False)
        self.add(europe)
        self.freeze_background()

        mathematicians = [
            ("Newton", [-1.75, -0.75, 0]),
            ("Jacob_Bernoulli",[-0.75, -1.75, 0]),
            ("Ehrenfried_von_Tschirnhaus",[0.5, -0.5, 0]),
            ("Gottfried_Wilhelm_von_Leibniz",[0.2, -1.75, 0]),
            ("Guillaume_de_L'Hopital", [-1.75, -1.25, 0]),
        ]

        for name, point in mathematicians:
            man = ImageMobject(name, invert = False)
            if name == "Newton":
                name = "Isaac_Newton"
            name_mob = TextMobject(name.replace("_", " "))
            name_mob.to_corner(UP+LEFT, buff=0.75)
            self.add(name_mob)
            man.scale_to_fit_height(4)
            mobject = Point(man.get_corner(UP+LEFT))
            self.play(Transform(mobject, man))
            man.scale(0.2)
            man.shift(point)
            self.play(Transform(mobject, man))
            self.remove(name_mob)
    def construct(self):
        europe = ImageMobject("Europe", use_cache = False)
        self.add(europe)
        self.freeze_background()

        mathematicians = [
            ("Newton", [-1.75, -0.75, 0]),
            ("Jacob_Bernoulli",[-0.75, -1.75, 0]),
            ("Ehrenfried_von_Tschirnhaus",[0.5, -0.5, 0]),
            ("Gottfried_Wilhelm_von_Leibniz",[0.2, -1.75, 0]),
            ("Guillaume_de_L'Hopital", [-1.75, -1.25, 0]),
        ]

        for name, point in mathematicians:
            man = ImageMobject(name, invert = False)
            if name == "Newton":
                name = "Isaac_Newton"
            name_mob = TextMobject(name.replace("_", " "))
            name_mob.to_corner(UP+LEFT, buff=0.75)
            self.add(name_mob)
            man.scale_to_fit_height(4)
            mobject = Point(man.get_corner(UP+LEFT))
            self.play(Transform(mobject, man))
            man.scale(0.2)
            man.shift(point)
            self.play(Transform(mobject, man))
            self.remove(name_mob)
示例#3
0
    def construct(self):
        words = TextMobject(["Which path ", "would \\emph{light} take", "?"])
        words.split()[1].highlight(YELLOW)
        words.to_corner(UP + RIGHT)
        self.add_cycloid_end_points()

        anims = [
            self.photon_run_along_path(path, rate_func=smooth)
            for path in self.get_paths()
        ]
        self.play(anims[0], ShimmerIn(words))
        for anim in anims[1:]:
            self.play(anim)
示例#4
0
    def construct(self):
        old_newton = ImageMobject("Old_Newton", invert=False)
        old_newton.scale(0.8)
        self.add(old_newton)
        self.freeze_background()

        words = TextMobject("Note the displeasure")
        words.to_corner(UP + RIGHT)
        face_point = 1.8 * UP + 0.5 * LEFT
        arrow = Arrow(words.get_bottom(), face_point)

        self.play(ShimmerIn(words))
        self.play(ShowCreation(arrow))
        self.wait()
示例#5
0
    def construct(self):
        old_newton = ImageMobject("Old_Newton", invert = False)
        old_newton.scale(0.8)
        self.add(old_newton)
        self.freeze_background()

        words = TextMobject("Note the displeasure")
        words.to_corner(UP+RIGHT)
        face_point = 1.8*UP+0.5*LEFT
        arrow = Arrow(words.get_bottom(), face_point)


        self.play(ShimmerIn(words))
        self.play(ShowCreation(arrow))
        self.dither()
示例#6
0
 def add_force_definitions(self):
     top_force = TexMobject("F_1 = \\dfrac{1}{v_{\\text{air}}}")
     bottom_force = TexMobject("F_2 = \\dfrac{1}{v_{\\text{water}}}")
     top_spring, bottom_spring = self.start_springs.split()
     top_force.next_to(top_spring)
     bottom_force.next_to(bottom_spring, DOWN, buff = -0.5)
     words = TextMobject("""
         The force in a real spring is 
         proportional to that spring's length
     """)
     words.to_corner(UP+RIGHT)
     for force in top_force, bottom_force:
         self.play(GrowFromCenter(force))
         self.wait()
     self.play(ShimmerIn(words))
     self.wait(3)
     self.remove(top_force, bottom_force, words)
示例#7
0
文件: light.py 项目: PythonJedi/manim
 def add_force_definitions(self):
     top_force = TexMobject("F_1 = \\dfrac{1}{v_{\\text{air}}}")
     bottom_force = TexMobject("F_2 = \\dfrac{1}{v_{\\text{water}}}")
     top_spring, bottom_spring = self.start_springs.split()
     top_force.next_to(top_spring)
     bottom_force.next_to(bottom_spring, DOWN, buff = -0.5)
     words = TextMobject("""
         The force in a real spring is 
         proportional to that spring's length
     """)
     words.to_corner(UP+RIGHT)
     for force in top_force, bottom_force:
         self.play(GrowFromCenter(force))
         self.dither()
     self.play(ShimmerIn(words))
     self.dither(3)
     self.remove(top_force, bottom_force, words)
示例#8
0
文件: light.py 项目: PythonJedi/manim
    def construct(self):
        words = TextMobject(
            ["Which path ", "would \\emph{light} take", "?"]
        )
        words.split()[1].highlight(YELLOW)
        words.to_corner(UP+RIGHT)
        self.add_cycloid_end_points()

        anims = [
            self.photon_run_along_path(
                path, 
                rate_func = smooth
            )
            for path in  self.get_paths()
        ]
        self.play(anims[0], ShimmerIn(words))
        for anim in anims[1:]:
            self.play(anim)