点云点¶
限定名称: manim.mobject.types.point\_cloud\_mobject.PointCloudDot
- class PointCloudDot(center=array([0., 0., 0.]), radius=2.0, stroke_width=2, density=10, color=ManimColor('#FFFF00'), **kwargs)[来源]¶
基础类:
Mobject1D由点云组成的圆盘。
示例
示例:PointCloudDotExample ¶
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)) )方法
初始化
points并因此确定形状。init_points属性
animate用于动画化
self的任何方法的应用。animation_overridesdepthmobject的深度。
heightmobject的高度。
widthmobject的宽度。
- _original__init__(center=array([0., 0., 0.]), radius=2.0, stroke_width=2, density=10, color=ManimColor('#FFFF00'), **kwargs)¶
初始化自身。有关准确的签名,请参阅 help(type(self))。