当前位置: 首页>>代码示例>>Python>>正文


Python TexMobject.get_left方法代码示例

本文整理汇总了Python中mobject.tex_mobject.TexMobject.get_left方法的典型用法代码示例。如果您正苦于以下问题:Python TexMobject.get_left方法的具体用法?Python TexMobject.get_left怎么用?Python TexMobject.get_left使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mobject.tex_mobject.TexMobject的用法示例。


在下文中一共展示了TexMobject.get_left方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: show_equation

# 需要导入模块: from mobject.tex_mobject import TexMobject [as 别名]
# 或者: from mobject.tex_mobject.TexMobject import get_left [as 别名]
    def show_equation(self, chopped_cycloid, ref_mob):
        point2, point1 = chopped_cycloid.points[-2:]
        arc, theta, vert_line, tangent_line = self.get_marks(
            point1, point2
        )
        equation = TexMobject([
            "\\sin(\\theta)",
            "\\over \\sqrt{y}",            
        ])
        sin, sqrt_y = equation.split()
        equation.next_to(ref_mob)
        const = TexMobject(" = \\text{constant}")
        const.next_to(equation)
        ceil_point = np.array(point1)
        ceil_point[1] = self.top[1]
        brace = Brace(
            Mobject(Point(point1), Point(ceil_point)),
            RIGHT
        )
        y_mob = TexMobject("y").next_to(brace)

        self.play(
            GrowFromCenter(sin),
            ShowCreation(arc), 
            GrowFromCenter(theta)
        )
        self.play(ShowCreation(vert_line))
        self.play(ShowCreation(tangent_line))
        self.dither()
        self.play(
            GrowFromCenter(sqrt_y),
            GrowFromCenter(brace),
            GrowFromCenter(y_mob)
        )
        self.dither()
        self.play(Transform(
            Point(const.get_left()), const
        ))
        self.dither()
开发者ID:GodotMisogi,项目名称:manim,代码行数:41,代码来源:multilayered.py


注:本文中的mobject.tex_mobject.TexMobject.get_left方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。