This functions is made to be used in decimate_points . It implements an algorithm that creates a 3D grid with a given resolution and filters the point cloud by randomly selecting n points within each voxel
random_per_voxel(res =1, n =1)
Arguments
res: numeric. The resolution of the voxel grid used to filter the point cloud