point-cloud-utils icon indicating copy to clipboard operation
point-cloud-utils copied to clipboard

Return barycentric coordinates and face indices in sample_mesh_lloyd

Open X-Bruce-Y opened this issue 4 years ago • 3 comments

Dear developer, Your poisson disk sampling and random sampling return f_idx and barycentric coordinate (bc), while the facial weight center coordinates could be further calculated to be v[f[f_i]] * bc[:, np.newaxis] [though np.newaxis doesn't work in the way I expected and I modified the part to be np.expand_dims(bc, axis=2)]. However, in your sample_mesh_lloyd method, the returned value is directly a matrix composed of the facial weight center coordinates.

I wonder if you could modify the sample_mesh_lloyd method a little bit so that it returns f_idx and bc too? That would add to much flexibility in identifying chosen faces and indexing corresponding normal vector coordinates.

Thanks!

X-Bruce-Y avatar Apr 07 '21 13:04 X-Bruce-Y

The version of point-cloud-utils on conda-forge is out of date. Install the latest version from pip.

pip install git+git://github.com/fwilliams/point-cloud-utils

fwilliams avatar Apr 07 '21 13:04 fwilliams

Ah sorry you said lloyd sampling not poisson disk. Unfortunately, I'm not going to get around to that for a while. If you need it, a pull request would be helpful!

fwilliams avatar Apr 07 '21 13:04 fwilliams

Hi @fwilliams I'm very unfamiliar with C++ for now, but I'll see what I can do. Thank you.

X-Bruce-Y avatar Apr 08 '21 02:04 X-Bruce-Y