我正在绘制两个3D表面(s1和s2)。这两个是同心球的一部分。代码如下:
d=27*25.4;
f1=6;
f2=4;
r1=2*f1*d;
r2=2*f2*d;
i=1;
for rho=0:(d/2)/19:(d/2)
for theta=0:5:360
x(i)=rho*cosd(theta);
y(i)=rho*sind(theta);
l(i)=(d/2)-sqrt(x(i)^2+y(i)^2);
s1(i)=(r1-sqrt((r1^2)-(l(i)^2)));
s2(i)=(r2-sqrt((r2^2)-(l(i)^2)));
i=i+1;
end
end
figure(1)
tr=delaunay(x,y);
trisurf(tr,x,y,s1)
xlabel('x-axis');
ylabel('y-axis');
zlabel('z-axis');
figure(2)
tr=delaunay(x,y);
trisurf(tr,x,y,s2)
xlabel('x-axis');
ylabel('y-axis');
zlabel('z-axis');
我们能在两个表面之间找到音量吗?