t = linspace(0,2*pi,100); r = abs(sin(t)) + 0.5; subplot(1,3,1) [x1,y1,z1] = cylinder(r,20); surf(x1,y1,z1); title('sylinder(r,20)'); subplot(1,3,2) [x2,y2,z2] = cylinder(r,4); surf(x2,y2,z2); title('sylinder(r,4)') subplot(1,3,3) z3 = z1*2*pi; surf(x1,y1,z3); title('伸缩变换')
直接绘制由 个面组成的球。
返回由 个面组成的球的坐标。
figure subplot(1,2,1) sphere(6); title('sphere(6)') subplot(1,2,2) [x4,y4,z4] = sphere(20); surf(x4,y4,z4) title('sphere(20)')