本文解释boundary_conditions函数的输出
mesh_source = ‘C:\Users\0.obj’;
[V,F] = load_mesh(mesh_source);
cotmatrix(V,F)
V=V(:,1:2);
[bbb,bbc]=boundary_conditions(V,F,C);
% number of mesh vertices
n = size(V, 1);
% number of control vertices
c = size(C,1);
aa=repmat(C,[1,1,n]);
bb=repmat(V,[1,1,c]);
D = permute(sum((repmat(V,[1,1,c]) - permute(repmat(C,[1,1,n]),[3,2,1])).^2,2),[1,3,2]);
运行结果:
[bbb,bbc]=boundary_conditions(V,F,C)
bbb =
245 2336 3426 5280 5322
bbc =
0 1 0 0 0
1 0 0 0 0
0 0 0 1 0
0 0 0 0 1
0 0 1 0 0