nmwsharp / potpourri3d

An invigorating blend of 3D geometry tools in Python.
MIT License
414 stars 31 forks source link

Can the position coordinates of the contour line be obtained? #4

Open cheng-c210 opened 2 years ago

cheng-c210 commented 2 years ago

image image At present, the isoline distance field generated by potpourri3d and polyscope cannot achieve the same effect as in the paper, and the isoline coordinates cannot be obtained. Can this problem be fixed or suggestions for the algorithm of the isoline?

fstwn commented 2 years ago

I would recommend using igl for this step: https://github.com/libigl/libigl-python-bindings/

you can then call: isoV, isoE = igl.isolines(V, F, z, n)

where V #V by dim list of mesh vertex positions F #F by 3 list of mesh faces (must be triangles) z #V by 1 list of function values evaluated at vertices n the number of desired isolines

also look here for reference: https://libigl.github.io/libigl-python-bindings/igl_docs/#isolines