Point Cloud Mobject¶
PMobject¶
- class manimlib.mobject.types.point_cloud_mobject.PMobject(**kwargs)¶
点物件
- add_points(points: npt.ArrayLike, rgbas: np.ndarray | None = None, color: ManimColor | None = None, opacity: float | None = None)¶
添加点,点必须是若干个三维坐标,即 Nx3 的数组
- point_from_proportion(alpha: float) ndarray ¶
获取点集上百分比为 alpha 的最接近的点
- resize_points(size: int, resize_func: Callable[[np.ndarray, int], np.ndarray] = <function resize_array>)¶
重置锚点数组大小
- set_color_by_gradient(*colors: ManimColor)¶
渐变染色
- set_points(points: npt.ArrayLike)¶
设置锚点
- sort_points(function: Callable[[np.ndarray]] = <function PMobject.<lambda>>)¶
按照传入的函数对点进行排序,函数接受一个 三维 坐标,返回一个数值
PGroup¶
Point¶
- class manimlib.mobject.types.point_cloud_mobject.Point(location: ndarray = array([0., 0., 0.]), **kwargs)¶
单个点(似乎和 Mobject 中的 Point 类冲突了)