Skip to content

Plot Point Cloud

Plot colored points

def plot_points(self, Points, name):
    self.meshmanager.plot_glyph(points=Points,color='brg',lut_range='-:0:+',radius=2*self.meshmanager.r,name=name)   

Bezier

Colored point cloud

K-means cluster of point cloud as seen in the file ./geometrylab/fitting/cluster.py.

from geometrylab.vtkplot import Points, view
from geometrylab.fitting import kmeans
A = (np.random.random((500,3)) - np.random.random((500,3))) * 2
c = kmeans(A, 20)

pl = Points(A, vertex_data=c, color='Vega20', lut_range='-:+')
view([pl])

Bezier

Cluster of point cloud