B3 = igl.eigen.MatrixXd() igl.local_basis(V, F, B1, B2, B3) X2 = igl.rotate_vectors(X1, igl.eigen.MatrixXd.Constant(1, 1, pi / 2), B1, B2) gradient_size = 50 iterations = 0 stiffness = 5.0 direct_round = False # Always work on the bisectors, it is more general igl.compute_frame_field_bisectors(V, F, X1, X2, BIS1, BIS2) # Comb the field, implicitly defining the seams igl.comb_cross_field(V, F, BIS1, BIS2, BIS1_combed, BIS2_combed) # Find the integer mismatches igl.cross_field_missmatch(V, F, BIS1_combed, BIS2_combed, True, MMatch) # Find the singularities igl.find_cross_field_singularities(V, F, MMatch, isSingularity, singularityIndex) # Cut the mesh, duplicating all vertices on the seams igl.cut_mesh_from_singularities(V, F, MMatch, Seams) # Comb the frame-field accordingly igl.comb_frame_field(V, F, X1, X2, BIS1_combed, BIS2_combed, X1_combed, X2_combed) # Global parametrization igl.comiso.miq(V, F, X1_combed, X2_combed, MMatch, isSingularity, Seams, UV, FUV, gradient_size, stiffness,