1

I'm trying to use the function of libigl uniformly_sample_two_manifold, but it does not work as described and there is no documentation whatsoever to help me understand why.

I have a 3D mesh represented as Eigen::MatrixXd V with vertices and Eigen::MatrixXi F with faces. I'm attempting to use the function as follows:

igl::uniformly_sample_two_manifold(V, F, 20, 1.0, Out);

... giving the function my vertices, faces, and asking for 20 uniform samples in the Out structure. I set the "push factor" to 1 since I don´t think I have any use for it now.

I noticed that the function specifically askes for "positions of mesh in weight space", which I presumed means the vertex positions. If I use it like this, however, the function returns the expected amount of vertices which are clustered very close to each other and are by no means uniformly distributed across the mesh.

Does anyone happen to know how to correctly use this function? Or would anyone know what does this "weight space" mean?

Thanks!

Michal Kučera
  • 223
  • 1
  • 11
  • The input is not expected to be a typical 3D triangle mesh (e.g., [V,F]), instead each vertex is embedded in a high dimensional unit-hypercude ("weight space") defined by W, with triangles given by F. This algorithm will first conduct furthest point sampling from the set of vertices and then attempt to relax the sampled points along the surface of the high-dimensional triangle mesh (i.e., the output points may be in the middle of triangles, not just at vertices). An additional "push" factor will repel samples away from the corners of the hypercube. – Alec Jacobson Apr 28 '19 at 15:06
  • You might want igl::random_points_on_mesh instead. Just a hunch – Alec Jacobson Apr 28 '19 at 15:06

0 Answers0