Point clouds in vedo#

from vedo import *
settings.default_backend = "vtk"  # or k3d, ipyvtk, or 2d
points = np.random.rand(2000, 3)

pts = Points(points)
pln = Plane(pos=(0.5, 0.5, 0.6), normal=(1, 0, 0), s=(1.5, 1.5))
pln.alpha(0.5)
pts

vedo.pointcloud.Points
bounds
(x/y/z)
2.902e-4 ... 0.9993
5.838e-6 ... 0.9999
3.116e-4 ... 0.9995
center of mass (0.507, 0.497, 0.501)
average size 0.483
nr. points 2000
show(pts, pln, axes=1).close()
pts = Points(points)
pts.cut_with_plane((0.5, 0.5, 0.6))

vedo.pointcloud.Points
bounds
(x/y/z)
0.5004 ... 0.9993
2.823e-3 ... 0.9999
3.116e-4 ... 0.9995
center of mass (0.751, 0.488, 0.503)
average size 0.411
nr. points 1025
show(pts, pln, axes=1).close()