PointCloudDot

完全限定名: manim.mobject.types.point\_cloud\_mobject.PointCloudDot

PointCloudDot(center=array([0., 0., 0.]), radius=2.0, stroke_width=2, density=10, color=ManimColor('#FFFF00'), **kwargs)[source]

基类: Mobject1D

由点云组成的圆盘。

示例

示例: PointCloudDotExample

../_images/PointCloudDotExample-1.png
from manim import *

class PointCloudDotExample(Scene):
    def construct(self):
        cloud_1 = PointCloudDot(color=RED)
        cloud_2 = PointCloudDot(stroke_width=4, radius=1)
        cloud_3 = PointCloudDot(density=15)

        group = Group(cloud_1, cloud_2, cloud_3).arrange()
        self.add(group)
class PointCloudDotExample(Scene):
    def construct(self):
        cloud_1 = PointCloudDot(color=RED)
        cloud_2 = PointCloudDot(stroke_width=4, radius=1)
        cloud_3 = PointCloudDot(density=15)

        group = Group(cloud_1, cloud_2, cloud_3).arrange()
        self.add(group)

示例: PointCloudDotExample2

from manim import *

class PointCloudDotExample2(Scene):
    def construct(self):
        plane = ComplexPlane()
        cloud = PointCloudDot(color=RED)
        self.add(
            plane, cloud
        )
        self.wait()
        self.play(
            cloud.animate.apply_complex_function(lambda z: np.exp(z))
        )
class PointCloudDotExample2(Scene):
    def construct(self):
        plane = ComplexPlane()
        cloud = PointCloudDot(color=RED)
        self.add(
            plane, cloud
        )
        self.wait()
        self.play(
            cloud.animate.apply_complex_function(lambda z: np.exp(z))
        )

方法

generate_points (生成点)

初始化 points,从而确定形状。

init_points (初始化点)

属性

animate (动画)

用于动画化 self 的任何方法的应用。

animation_overrides (动画覆盖)

depth (深度)

mobject 的深度。

height (高度)

mobject 的高度。

width (宽度)

mobject 的宽度。

参数:
  • center (Vector3D)

  • radius (float)

  • stroke_width (int)

  • density (int)

  • color (ManimColor)

  • kwargs (Any)

_original__init__(center=array([0., 0., 0.]), radius=2.0, stroke_width=2, density=10, color=ManimColor('#FFFF00'), **kwargs)

初始化自身。有关准确签名,请参阅 help(type(self))。

参数:
  • center (Vector3D)

  • radius (float)

  • stroke_width (int)

  • density (int)

  • color (ManimColor)

  • kwargs (Any)

返回类型:

generate_points()[source]

初始化 points,从而确定形状。

在创建时调用。这是一个空方法,可由子类实现。

返回类型: