@staticmethod<EOL><INDENT>def points(points, T_points_world=None, color=np.array([<NUM_LIT:0>,<NUM_LIT:1>,<NUM_LIT:0>]), scale=<NUM_LIT>, n_cuts=<NUM_LIT:20>, subsample=None, random=False, name=None):<DEDENT>
if isinstance(points, BagOfPoints):<EOL><INDENT>if points.dim != <NUM_LIT:3>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if type(points) is not np.ndarray:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if len(points.shape) == <NUM_LIT:1>:<EOL><INDENT>points = points[:,np.newaxis].T<EOL><DEDENT>if len(points.shape) != <NUM_LIT:2> or points.shape[<NUM_LIT:1>] != <NUM_LIT:3>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>frame = '<STR_LIT>'<EOL>if T_points_world:<EOL><INDENT>frame = T_points_world.from_frame<EOL><DEDENT>points = PointCloud(points.T, frame=frame)<EOL><DEDENT>color = np.array(color)<EOL>if subsample is not None:<EOL><INDENT>num_points = points.num_points<EOL>points, inds = points.subsample(subsample, random=random)<EOL>if color.shape[<NUM_LIT:0>] == num_points and color.shape[<NUM_LIT:1>] == <NUM_LIT:3>:<EOL><INDENT>color = color[inds,:]<EOL><DEDENT><DEDENT>if points.frame != '<STR_LIT>':<EOL><INDENT>if T_points_world is None:<EOL><INDENT>T_points_world = RigidTransform(from_frame=points.frame, to_frame='<STR_LIT>')<EOL><DEDENT>points_world = T_points_world * points<EOL><DEDENT>else:<EOL><INDENT>points_world = points<EOL><DEDENT>point_data = points_world.data<EOL>if len(point_data.shape) == <NUM_LIT:1>:<EOL><INDENT>point_data = point_data[:,np.newaxis]<EOL><DEDENT>point_data = point_data.T<EOL>mpcolor = color<EOL>if len(color.shape) > <NUM_LIT:1>:<EOL><INDENT>mpcolor = color[<NUM_LIT:0>]<EOL><DEDENT>mp = MaterialProperties(<EOL>color = np.array(mpcolor),<EOL>k_a = <NUM_LIT:0.5>,<EOL>k_d = <NUM_LIT>,<EOL>k_s = <NUM_LIT:0.0>,<EOL>alpha = <NUM_LIT>,<EOL>smooth=True<EOL>)<EOL>sphere = trimesh.creation.uv_sphere(scale, [n_cuts, n_cuts])<EOL>raw_pose_data = np.tile(np.eye(<NUM_LIT:4>), (points.num_points, <NUM_LIT:1>))<EOL>raw_pose_data[<NUM_LIT:3>::<NUM_LIT:4>, :<NUM_LIT:3>] = point_data<EOL>instcolor = None<EOL>if color.ndim == <NUM_LIT:2> and color.shape[<NUM_LIT:0>] == points.num_points and color.shape[<NUM_LIT:1>] == <NUM_LIT:3>:<EOL><INDENT>instcolor = color<EOL><DEDENT>obj = InstancedSceneObject(sphere, raw_pose_data=raw_pose_data, colors=instcolor, material=mp)<EOL>if name is None:<EOL><INDENT>name = str(uuid.uuid4())<EOL><DEDENT>Visualizer3D._scene.add_object(name, obj)<EOL>
Scatter a point cloud in pose T_points_world.

        Parameters
        ----------
        points : autolab_core.BagOfPoints or (n,3) float
            The point set to visualize.
        T_points_world : autolab_core.RigidTransform
            Pose of points, specified as a transformation from point frame to world frame.
        color : (3,) or (n,3) float
            Color of whole cloud or per-point colors
        scale : float
            Radius of each point.
        n_cuts : int
            Number of longitude/latitude lines on sphere points.
        subsample : int
            Parameter of subsampling to display fewer points.
        name : str
            A name for the object to be added.