PMobject#
Qualified name: manim.mobject.types.point\_cloud\_mobject.PMobject
- class PMobject(stroke_width=4, **kwargs)[source]#
Bases:
Mobject
A disc made of a cloud of Dots
Examples
Example: PMobjectExample ¶
from manim import * class PMobjectExample(Scene): def construct(self): pG = PGroup() # This is just a collection of PMobject's # As the scale factor increases, the number of points # removed increases. for sf in range(1, 9 + 1): p = PointCloudDot(density=20, radius=1).thin_out(sf) # PointCloudDot is a type of PMobject # and can therefore be added to a PGroup pG.add(p) # This organizes all the shapes in a grid. pG.arrange_in_grid() self.add(pG)
Methods
Add points.
align_points_with_larger
fade_to
filter_out
get_all_rgbas
get_array_attrs
Returns the color of the
Mobject
Return the base class of this mobject type.
The simplest
Mobject
to be transformed to or from self.get_stroke_width
ingest_submobjects
interpolate_color
match_colors
point_from_proportion
pointwise_become_partial
Sets
points
to be an empty array.Condition is function which takes in one arguments, (x, y, z).
set_color_by_gradient
set_colors_by_radial_gradient
set_stroke_width
Function is any map from R^3 to R
Removes all but every nth point for n = factor
Attributes
animate
Used to animate the application of any method of
self
.animation_overrides
depth
The depth of the mobject.
height
The height of the mobject.
width
The width of the mobject.
- add_points(points, rgbas=None, color=None, alpha=1)[source]#
Add points.
Points must be a Nx3 numpy array. Rgbas must be a Nx4 numpy array if it is not None.
- get_point_mobject(center=None)[source]#
The simplest
Mobject
to be transformed to or from self. Should by a point of the appropriate type