PMobject

Qualified name: algan.mobs.point\_cloud.PMobject

class PMobject(stroke_width=4, *, points=None, rgbas=None, color=Color([1., 1., 0., 0., 1.]), point_radius=None, **kwargs)[source]

Bases: Group

Point-array Mobject rendered as a batched set of tiny spheres.

Methods

add_points

align_points_with_larger

fade_to

filter_out

get_all_rgbas

get_array_attrs

get_color

get_mobject_type_class

get_num_points

get_point_mobject

get_points

get_render_primitives

Build the native sphere primitives representing this point cloud.

get_stroke_width

ingest_submobjects

interpolate_color

match_colors

point_from_proportion

pointwise_become_partial

reset_points

set_color

set_color_by_gradient

set_colors_by_radial_gradient

set_points

set_stroke_width

sort_points

thin_out

Attributes

animation_manager

This mob's scene-owned animation manager.

basis

The Mob's orientation and scale, as a flattened 3x3 matrix of shape (*, 9).

casts_shadows

Whether this Mob's geometry blocks light on its way from a light source to another surface -- whether it casts a shadow.

children

The Mobs attached below this one, in attachment order.

closed_shell

Whether this Mob's triangles form a CLOSED shell -- every camera ray that enters the geometry crosses a second time on its way out.

draws_descendants

Whether get_render_primitives returns geometry belonging to this Mob's DESCENDANTS as well as its own.

forward

Get the direction the Mob is facing.

lifespan

This mob's [spawn, despawn) interval on its Scene timeline (a Lifespan).

location

The Mob's position in world space, shape (*, 3).

normalized_basis

The Mob's orientation with scale divided out, shape (*, 9).

parents

The Mobs this one is attached to, in attachment order.

receives_shadows

Whether this Mob's surfaces are darkened by shadows cast onto them.

right

Get the Mob's own rightward direction.

scale_coefficient

The Mob's scale along its own right, up and forward axes, shape (*, 3).

two_sided

Whether this Mob's geometry should be lit from whichever side the ray arrives on.

up

Get the Mob's own upward direction.

x

The Mob's x coordinate in world units, shape (*, 1).

xy

The Mob's x and y coordinates in world units, shape (*, 2).

y

The Mob's y coordinate in world units, shape (*, 1).

z

The Mob's z coordinate in world units, shape (*, 1).

Parameters:

stroke_width (int)

draws_descendants = True

Whether get_render_primitives returns geometry belonging to this Mob’s DESCENDANTS as well as its own. Almost nothing does: a BezierCircuitCubic or a Surface draws its own rows and leaves its children to draw themselves. Polyhedron is the exception – it gathers every face under one _mesh_key – and the difference decides two things for become(): whether the Mob is one morph unit or several, and whether a descendant may be published to the Scene in its own right (doing so under an aggregator draws it twice, and draws geometry the aggregator deliberately omits, such as a Polyhedron’s vertex-and-edge graph).

get_render_primitives()[source]

Build the native sphere primitives representing this point cloud.