{"action":"opened","issue":{"url":"https://api.github.com/repos/libigl/libigl/issues/556","repository_url":"https://api.github.com/repos/libigl/libigl","labels_url":"https://api.github.com/repos/libigl/libigl/issues/556/labels{/name}","comments_url":"https://api.github.com/repos/libigl/libigl/issues/556/comments","events_url":"https://api.github.com/repos/libigl/libigl/issues/556/events","html_url":"https://github.com/libigl/libigl/issues/556","id":239451349,"number":556,"title":"Could \"Biharmonic Coordinates\" be used for \"Deformation Transfer\" ?","user":{"login":"Sjoerdie","id":9658562,"avatar_url":"https://avatars2.githubusercontent.com/u/9658562?v=3","gravatar_id":"","url":"https://api.github.com/users/Sjoerdie","html_url":"https://github.com/Sjoerdie","followers_url":"https://api.github.com/users/Sjoerdie/followers","following_url":"https://api.github.com/users/Sjoerdie/following{/other_user}","gists_url":"https://api.github.com/users/Sjoerdie/gists{/gist_id}","starred_url":"https://api.github.com/users/Sjoerdie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sjoerdie/subscriptions","organizations_url":"https://api.github.com/users/Sjoerdie/orgs","repos_url":"https://api.github.com/users/Sjoerdie/repos","events_url":"https://api.github.com/users/Sjoerdie/events{/privacy}","received_events_url":"https://api.github.com/users/Sjoerdie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-29T11:41:56Z","updated_at":"2017-06-29T11:41:56Z","closed_at":null,"body":"Hi!\r\n\r\nIn tutorial 407 the high resolution mesh is controlled by the low resolution mesh through the pointhandles/weights computed by `igl::biharmonic_coordinates()`.\r\n\r\nI was wondering of this approach could be used to achieve similar results as \"Deformation Transfer\" as described by Sumner et al. (http://people.csail.mit.edu/sumner/research/deftransfer/Sumner2004DTF.pdf).\r\n\r\nWhat i have is two meshes (A & B) of the same shape (registered surfaces with a non-rigid icp), but with a different vertex topology. For the one mesh A, i have a blendshape that i would like to transfer to the mesh B. So far the approach:\r\n\r\n```cpp\r\n// mesh classes with vertices (V) and faces (F)\r\nA, A_deformed, B; // known\r\nB_deformed;     // unknow\r\n\r\n// point handles\r\nEigen::VectorXi b;\r\n\r\n//weights\r\nEigen::MatrixXd W;\r\n\r\n// find close point as point handles A->B\r\nEigen::VectorXi J = Eigen::VectorXi::LinSpaced(B.V.rows(),0,B.V.rows()-1);\r\nigl::point_mesh_squared_distance(A.V, B.V, J, _, b, _);\r\n\r\n// calculate biharmonic coordinates\r\nigl::slice(B.V, indices, 1, A.V);\r\nstd::vector<std::vector<int> > S;\r\nigl::matrix_to_list(b, S);\r\nigl::biharmonic_coordinates(B.V, B.F, S, 3, W);   // here it breaks\r\n\r\n// transfer deformation\r\nB_deformed.V = W * (A_deformed.V.rowwise() + RowVector3d(1,0,0)));\r\nB_deformed.F = B.F;\r\n```\r\n\r\nIf possible, it seems the meshes in the tutorial use tetrahedra  rather than triangles, is this necessary? My meshes both have vertices with dim=3 and faces also with dim=3 (triangles).\r\n\r\nThanks!\r\nSjoerd"}}
{"actor":{"display_login":"Sjoerdie"}}