Hi,
To achieve a combined isometric and top view of the 3D plot, you can use “subplot” function to place both views in the same figure.
For the top view, the “boundary” and “patch” functions can be used to create 2D projections of the 3D data on the XY-plane. The ‘FaceAlpha’ property is used to set the transparency of the patches for the top view to match the transparency in the isometric view.
Please refer to the following code on how you can modify your code to include both the isometric and top views:
% Create a figure with two subplots
figure;
% First subplot for the isometric view
subplot(1, 2, 1);
kkk = boundary(x1, y1, z1);
V1 = trisurf(kkk, x1, y1, z1, 'Facecolor', 'r', 'Edgecolor', 'none');
hold on;
kkk = boundary(x2, y2, z2);
V2 = trisurf(kkk, x2, y2, z2, 'Facecolor', 'y', 'Edgecolor', 'none');
alpha(0.25);
legend([V1 V2], {'h=A', 'h=B'}, 'location', 'northwest', 'fontsize', 12);
xlabel('x(mm)');
ylabel('y(mm)');
zlabel('z(mm)');
view(3); % Isometric view
title('Isometric View');
% Second subplot for the top view
subplot(1, 2, 2);
hold on;
kk = boundary(x1, y1);
h11 = patch(x1(kk), y1(kk), 'r', 'FaceAlpha', 0.25, 'EdgeColor', 'none');
kk = boundary(x2, y2);
h22 = patch(x2(kk), y2(kk), 'y', 'FaceAlpha', 0.25, 'EdgeColor', 'none');
xlabel('x(mm)');
ylabel('y(mm)');
axis equal;
title('Top View');

Kindly refer to the following MathWorks documentation to know more about the functions discussed above:
- subplot: https://www.mathworks.com/help/matlab/ref/subplot.html
- boundary: https://www.mathworks.com/help/matlab/ref/boundary.html
- patch: https://www.mathworks.com/help/matlab/ref/patch.html
I hope the solution provided above is helpful.
