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


Python VMobject.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from mobject.vectorized_mobject import VMobject [as 别名]
# 或者: from mobject.vectorized_mobject.VMobject import __init__ [as 别名]
 def __init__(self, **kwargs):
     hand = SVGMobject("RightHandOutline")
     self.inlines = VMobject(*hand.split()[:-4])
     self.outline = VMobject(*hand.split()[-4:])
     self.outline.set_stroke(color = WHITE, width = 5)
     self.inlines.set_stroke(color = DARK_GREY, width = 3)
     VMobject.__init__(self, self.outline, self.inlines)
     self.center().scale_to_fit_height(3)
开发者ID:xhrwang,项目名称:manim,代码行数:10,代码来源:chapter5.py

示例2: __init__

# 需要导入模块: from mobject.vectorized_mobject import VMobject [as 别名]
# 或者: from mobject.vectorized_mobject.VMobject import __init__ [as 别名]
 def __init__(self, float_num, **kwargs):
     digest_config(self, kwargs)
     num_string = '%.*f' % (self.num_decimal_points, float_num)
     VMobject.__init__(self, *[
         TexMobject(char)
         for char in num_string
     ], **kwargs)
     self.arrange_submobjects(
         buff = self.digit_to_digit_buff,
         aligned_edge = DOWN
     )
     if float_num < 0:
         minus = self.submobjects[0]
         minus.next_to(
             self.submobjects[1], LEFT,
             buff = self.digit_to_digit_buff
         )
开发者ID:PythonJedi,项目名称:manim,代码行数:19,代码来源:numerals.py

示例3: __init__

# 需要导入模块: from mobject.vectorized_mobject import VMobject [as 别名]
# 或者: from mobject.vectorized_mobject.VMobject import __init__ [as 别名]
 def __init__(self, matrix, **kwargs):
     """
     Matrix can either either include numbres, tex_strings, 
     or mobjects
     """
     VMobject.__init__(self, **kwargs)
     matrix = np.array(matrix)
     if matrix.ndim == 1:
         matrix = matrix.reshape((matrix.size, 1))
     if not isinstance(matrix[0][0], Mobject):
         matrix = matrix.astype("string")
         matrix = self.string_matrix_to_mob_matrix(matrix)
     self.organize_mob_matrix(matrix)
     self.add(*matrix.flatten())
     self.add_brackets()
     self.center()
     self.mob_matrix = matrix
开发者ID:namkam5,项目名称:manim,代码行数:19,代码来源:matrix.py

示例4: __init__

# 需要导入模块: from mobject.vectorized_mobject import VMobject [as 别名]
# 或者: from mobject.vectorized_mobject.VMobject import __init__ [as 别名]
 def __init__(self, **kwargs):
     digest_config(self, kwargs)
     if self.leftmost_tick is None:
         self.leftmost_tick = np.ceil(self.x_min)
     VMobject.__init__(self, **kwargs)
开发者ID:PythonJedi,项目名称:manim,代码行数:7,代码来源:number_line.py

示例5: __init__

# 需要导入模块: from mobject.vectorized_mobject import VMobject [as 别名]
# 或者: from mobject.vectorized_mobject.VMobject import __init__ [as 别名]
 def __init__(self, function, **kwargs):
     self.function = function
     VMobject.__init__(self, **kwargs)
开发者ID:GodotMisogi,项目名称:manim,代码行数:5,代码来源:functions.py

示例6: __init__

# 需要导入模块: from mobject.vectorized_mobject import VMobject [as 别名]
# 或者: from mobject.vectorized_mobject.VMobject import __init__ [as 别名]
 def __init__(self, start, end, **kwargs):
     digest_config(self, kwargs)
     self.set_start_and_end(start, end)
     VMobject.__init__(self, **kwargs)
开发者ID:namkam5,项目名称:manim,代码行数:6,代码来源:geometry.py

示例7: __init__

# 需要导入模块: from mobject.vectorized_mobject import VMobject [as 别名]
# 或者: from mobject.vectorized_mobject.VMobject import __init__ [as 别名]
 def __init__(self, **kwargs):
     VMobject.__init__(self, **kwargs)
     for submobject in self.submobject_family():
         submobject.part_of_3d_mobject = True
开发者ID:crclayton,项目名称:manim,代码行数:6,代码来源:three_dimensions.py

示例8: __init__

# 需要导入模块: from mobject.vectorized_mobject import VMobject [as 别名]
# 或者: from mobject.vectorized_mobject.VMobject import __init__ [as 别名]
 def __init__(self, mobject, **kwargs):
     VMobject.__init__(self, **kwargs)
     self.mobject = mobject
     self.submobjects = self.get_eyes().submobjects
开发者ID:PythonJedi,项目名称:manim,代码行数:6,代码来源:characters.py


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