点¶
限定名称: manim.mobject.types.point\_cloud\_mobject.Point
- class Point(location=array([0., 0., 0.]), color=ManimColor('#000000'), **kwargs)[源代码]¶
基类:
PMobject
表示一个点的 Mobject。
示例
示例: ExamplePoint ¶
from manim import * class ExamplePoint(Scene): def construct(self): colorList = [RED, GREEN, BLUE, YELLOW] for i in range(200): point = Point(location=[0.63 * np.random.randint(-4, 4), 0.37 * np.random.randint(-4, 4), 0], color=np.random.choice(colorList)) self.add(point) for i in range(200): point = Point(location=[0.37 * np.random.randint(-4, 4), 0.63 * np.random.randint(-4, 4), 0], color=np.random.choice(colorList)) self.add(point) self.add(point)
class ExamplePoint(Scene): def construct(self): colorList = [RED, GREEN, BLUE, YELLOW] for i in range(200): point = Point(location=[0.63 * np.random.randint(-4, 4), 0.37 * np.random.randint(-4, 4), 0], color=np.random.choice(colorList)) self.add(point) for i in range(200): point = Point(location=[0.37 * np.random.randint(-4, 4), 0.63 * np.random.randint(-4, 4), 0], color=np.random.choice(colorList)) self.add(point) self.add(point)
方法
初始化
points
,从而确定形状。init_points (初始化点)
属性
animate (动画)
用于动画化
self
的任何方法的应用。animation_overrides (动画覆盖)
depth (深度)
mobject 的深度。
height (高度)
mobject 的高度。
width (宽度)
mobject 的宽度。
- 参数:
location (Vector3D)
color (ManimColor)
kwargs (Any)
- _original__init__(location=array([0., 0., 0.]), color=ManimColor('#000000'), **kwargs)¶
初始化自身。有关准确签名,请参阅 help(type(self))。
- 参数:
location (Vector3D)
color (ManimColor)
kwargs (Any)
- 返回类型:
无