我正在尝试显示一个背景中没有多余“白色”区域的图形。
即我有下图:
(多余的背景标有蓝色)
function plot_scalar_map(M, f, diffuse_strength)
if nargin==2
diffuse_strength=0.6;
end
trisurf(M.TRIV,M.VERT(:,1),M.VERT(:,2),M.VERT(:,3),double(f),...
'SpecularStrength',0.15,...
'DiffuseStrength',diffuse_strength);
axis equal
shading interp
rotate3d on
set(gca,'clipping','off')
xlabel('X')
ylabel('Y')
zlabel('Z')
end
mesh_0 = load('M0');
mesh_1 = load('M1');
matches = load('X.mat'));
colors = create_colormap(mesh_1,mesh_1);
figure;
subplot(1,2,1); colormap(colors);
plot_scalar_map(mesh_1,[1: size(mesh_1.VERT,1)]');freeze_colors;title('Target');
subplot(1,2,2); colormap(colors(matches,:));
plot_scalar_map(mesh_0,[1: size(mesh_0.VERT,1)]');freeze_colors;title('Source');