Point¶
Qualified name: manim.mobject.types.point\_cloud\_mobject.Point
- class Point(location=array([0., 0., 0.]), color=ManimColor('#000000'), **kwargs)[source]¶
Bases:
PMobjectA mobject representing a point.
Examples
Example: 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)Methods
Initializes
pointsand therefore the shape.init_pointsAttributes
alwaysCall a method on a mobject every frame.
animateUsed to animate the application of any method of
self.animation_overridesdepthThe depth of the mobject.
heightThe height of the mobject.
widthThe width of the mobject.
- Parameters:
location (Point3DLike)
color (ManimColor)
kwargs (Any)
- _original__init__(location=array([0., 0., 0.]), color=ManimColor('#000000'), **kwargs)¶
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
location (Point3DLike)
color (ManimColor)
kwargs (Any)
- Return type:
None