0

I have gone through the related solutions to "Visualizing a toroidal surface in Matlab" but my problem is a little different.I want to be able to visualize segmented toroidal surfaces arranged with vertices attached to each other.Just like a stuck of semi circles with axis along the y-axis in the x-y plane.

         `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`
4

0 回答 0