'use Poisson disk sampling in the Meshlab to sample the points from the meshes

I try to use Poisson disk sampling in the Meshlab to sample the points from the meshes.I need to get 8192 points from mesh,but i do not konw how to select parameters.As the figure show,when i set Number of samples to 8192,the points obtained are 8218 enter image description here



Solution 1:[1]

The main parameter of the Poisson Disk sampling is the radius of the disk, and guessing the exact radius that implies a precise number of samples is quite tricky.

By checking the parameter exact number of samples the filter will do a bisection search on possible radii to get a more precise approximation of the required number of samples.

If you are interested in just good sampling over a surface (and not to the empty disk property of a Poisson Disk sampling) you could also use the Voronoi Sampling filter, that, while it is slower, it generates even point sampling over a mesh surface: random sampling of the points over the surface followed by a Lloyd relaxation that distribute the points over in a very even way.

On the other hand if you just need a few random points over a surface you can just use montecarlo sampling, but you do not have any guarantees on the sampling (e.g. you can get gaps and concentrations).

Here is a sample colab that with a small python program showing the above filters in action: https://colab.research.google.com/drive/1sHz28IHw3VfO2s6uim4CwaSc05idraP_?usp=sharing

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1