I would like to plot an interpolated 3d Surface between two faces, i.e. the third face of a truncated cone. my plot isn’t working but I’m not sure what is wrong
r1=0.5;
% t1=[(0:0.1:2*pi),0];
t1=0:0.1:2*pi;
X1=r1*cos(t1);
Y1=r1*sin(t1);
n1=numel(X1);
Z1=zeros(1,n1);
DT=delaunay(X1,Y1);
trisurf(DT,X1,Y1,Z1);
hold;
r2=0.25;
% t2=[(0:0.1:2*pi),0];
t2=0:0.1:2*pi;
X2=r2*cos(t2);
Y2=r2*sin(t2);
n2=numel(X2);
Z2=200*ones(1,n2);
DT2=delaunay(X2,Y2);
trisurf(DT2,X2,Y2,Z2);
X= [X1,X2];
Y=[Y1,Y2];
Z=[Z1,Z2];
[xq,yq]=meshgrid(X,Y);
zq=ones(126).*Z;
surf(xq,yq,zq);r1=0.5;
% t1=[(0:0.1:2*pi),0];
t1=0:0.1:2*pi;
X1=r1*cos(t1);
Y1=r1*sin(t1);
n1=numel(X1);
Z1=zeros(1,n1);
DT=delaunay(X1,Y1);
trisurf(DT,X1,Y1,Z1);
hold;
r2=0.25;
% t2=[(0:0.1:2*pi),0];
t2=0:0.1:2*pi;
X2=r2*cos(t2);
Y2=r2*sin(t2);
n2=numel(X2);
Z2=200*ones(1,n2);
DT2=delaunay(X2,Y2);
trisurf(DT2,X2,Y2,Z2);
X= [X1,X2];
Y=[Y1,Y2];
Z=[Z1,Z2];
[xq,yq]=meshgrid(X,Y);
zq=ones(126).*Z;
surf(xq,yq,zq); r1=0.5;
% t1=[(0:0.1:2*pi),0];
t1=0:0.1:2*pi;
X1=r1*cos(t1);
Y1=r1*sin(t1);
n1=numel(X1);
Z1=zeros(1,n1);
DT=delaunay(X1,Y1);
trisurf(DT,X1,Y1,Z1);
hold;
r2=0.25;
% t2=[(0:0.1:2*pi),0];
t2=0:0.1:2*pi;
X2=r2*cos(t2);
Y2=r2*sin(t2);
n2=numel(X2);
Z2=200*ones(1,n2);
DT2=delaunay(X2,Y2);
trisurf(DT2,X2,Y2,Z2);
X= [X1,X2];
Y=[Y1,Y2];
Z=[Z1,Z2];
[xq,yq]=meshgrid(X,Y);
zq=ones(126).*Z;
surf(xq,yq,zq); meshgrid, interpolate, surface plots MATLAB Answers — New Questions