3D 等高线之间的表面
Surface between contour lines in 3D
我有这样的代码:
load('something.mat');
[X,Y] = meshgrid(tx,ty);
tt1 = U_TV1(:,:,1);
tt2=U_TV1( :,:,2);
tt3=U_TV1( :,:,3);
figure(2);
% surf(X, Y, tt1, 'FaceAlpha', 0.3);
shading interp;
hold on;
e = [1 3]; % [ .001 .1 .3 1 3 10 ]; % epsilon
[c1, h1] = contour3(X, Y, tt1, e, 'r');
[c2, h2] = contour3(X, Y, tt2, e, 'b');
[c3, h3] = contour3(X, Y, tt3, e, 'g');
% legend('k=1', 'k=2', 'k=3');
clabel(c1, h1, e, 'fontsize', 10, 'fontweight', 'bold');
clabel(c2, h2, e, 'fontsize', 10, 'fontweight', 'bold');
clabel(c3, h3, e, 'fontsize', 10, 'fontweight', 'bold');
zlim([0 15]);
结果如下 3D 图:
如何在具有相同编号的等高线之间填充 space(绘制表面)?
我想要这样的东西(用 Paint 制作):
感谢您的帮助。
解决方案包括两个步骤:
- 提取要拟合绘图的 points/lines
- 使用
fit
通过这些点拟合曲面
我有这样的代码:
load('something.mat');
[X,Y] = meshgrid(tx,ty);
tt1 = U_TV1(:,:,1);
tt2=U_TV1( :,:,2);
tt3=U_TV1( :,:,3);
figure(2);
% surf(X, Y, tt1, 'FaceAlpha', 0.3);
shading interp;
hold on;
e = [1 3]; % [ .001 .1 .3 1 3 10 ]; % epsilon
[c1, h1] = contour3(X, Y, tt1, e, 'r');
[c2, h2] = contour3(X, Y, tt2, e, 'b');
[c3, h3] = contour3(X, Y, tt3, e, 'g');
% legend('k=1', 'k=2', 'k=3');
clabel(c1, h1, e, 'fontsize', 10, 'fontweight', 'bold');
clabel(c2, h2, e, 'fontsize', 10, 'fontweight', 'bold');
clabel(c3, h3, e, 'fontsize', 10, 'fontweight', 'bold');
zlim([0 15]);
结果如下 3D 图:
如何在具有相同编号的等高线之间填充 space(绘制表面)?
我想要这样的东西(用 Paint 制作):
感谢您的帮助。
解决方案包括两个步骤:
- 提取要拟合绘图的 points/lines
- 使用
fit
通过这些点拟合曲面