在Matlab中可视化分段的环形表面

时间:2013-09-07 11:41:10

标签: matlab 3d plot

我已经完成了“在Matlab中可视化环形表面”的相关解决方案,但我的问题有点不同。我希望能够可视化分段环形表面,每个环形表面都附有顶点其他。就像在xy平面中沿着y轴轴线的半圆形卡住。

         `th = linspace( pi/2, -pi/2, 100);
         R = 1;  %or whatever radius you want
         x = -R*cos(th) + 4;
         y = -R*sin(th) + 7;
         plot(x,y); axis equal;
         hold on
         x = -R*cos(th) + 4;
         y = -R*sin(th) + 9;
         plot(x,y); axis equal;
         hold on
         x = -R*cos(th) + 4;
         y = -R*sin(th) + 11;
         plot(x,y); axis equal;
         hold on
         x = -R*cos(th) + 4;
         y = -R*sin(th) + 5;
         plot(x,y); axis equal
         hold on
         x = -R*cos(th) + 4;
         y = -R*sin(th) + 3;
         plot(x,y); axis equal
         hold on
         x = -R*cos(th) + 4;
         y = -R*sin(th) + 1;
         plot(x,y); axis equal
         hold on
         x = -R*cos(th) + 4;
         y = -R*sin(th)  -1;
         plot(x,y); axis equal
         hold on
         x = -R*cos(th) + 4;
         y = -R*sin(th)  -3;
         plot(x,y); axis equal
         hold on
         x = -R*cos(th) + 4;
         y = -R*sin(th)  -5;
         plot(x,y); axis equal
         hold on
         x = -R*cos(th) + 4;
         y = -R*sin(th) -11;
         plot(x,y); axis equal
         hold on
         x = -R*cos(th) + 4;
         y = -R*sin(th) -9;
         plot(x,y); axis equal
         hold on
         x = -R*cos(th) + 4;
         y = -R*sin(th) -7;`
         plot(x,y); axis equal`

0 个答案:

没有答案