Directional icon indicating copy to clipboard operation
Directional copied to clipboard

304_ConjugateFields not converging

Open jockyuiz opened this issue 4 years ago • 4 comments

The conjugacy solver in this tutorial is not converging for me. I don't know what's going wrong but it seems the non-conjugacy value gets even higher after each iteration...And the final result gets crazy. Do you know what may potentially go wrong here for me? For constraints and mesh, I think I use the original data in the shared path. And I think I do not change anything in the code. But I don't know if I somehow rewrite it when running other programs. Iteration data: https://pastebin.com/E3tdiWjr inspired_mesh_b.dmat: https://pastebin.com/nX8S7LWM inspired_mesh_bc.dmat: https://pastebin.com/VJ2Yzu6t

Also a more general question: for all the examples we tried to interpolate the field given some fixed constraints. But can we simply use a field that already exists on the mesh, i.e. the principal curvature, or take the gradient of some scalar function? For this example, a directional field that aligns with principal curvature should already be conjugate... So may we just use this directly instead of finding a deformation for an interpolated field?

jockyuiz avatar Jul 14 '21 14:07 jockyuiz

I will be looking now at your input. For your question: there is libigl gradient: https://github.com/libigl/libigl/blob/main/tutorial/204_Gradient/main.cpp and libigl principal directions: https://github.com/libigl/libigl/blob/main/tutorial/203_CurvatureDirections/main.cpp More general versions (for instance for N-fields) will be released in the next release (with some other exposed differential geometry operators that already exist in the internal implementation).

avaxman avatar Jul 19 '21 08:07 avaxman

hmmm it is the original data and consequently works well for me in both linux and windows... could you say which system you use exactly?

avaxman avatar Jul 19 '21 09:07 avaxman

hmmm it is the original data and consequently works well for me in both linux and windows... could you say which system you use exactly? I am using Windows 10, x64-based system. How can I debug here to see where might go wrong?

jockyuiz avatar Jul 19 '21 17:07 jockyuiz

I will be looking now at your input. For your question: there is libigl gradient: https://github.com/libigl/libigl/blob/main/tutorial/204_Gradient/main.cpp and libigl principal directions: https://github.com/libigl/libigl/blob/main/tutorial/203_CurvatureDirections/main.cpp More general versions (for instance for N-fields) will be released in the next release (with some other exposed differential geometry operators that already exist in the internal implementation).

Those examples in libigl seem to be vertex-based fields. When we transfer vertex-based directional fields to face-based, is there a good way to do that? Summing up the values at three vertices and simply take the average seems not working well for me

jockyuiz avatar Jul 19 '21 17:07 jockyuiz