用matlab绘制x = (1+cos(u))*cos(v), y = (1+cos(u))*sin(v), z = sin(u), (0<=u<=2*pi),(0<=v<=2*pi)
时间: 2024-05-29 16:10:35 浏览: 92
代码如下:
u = linspace(0, 2*pi, 100);
v = linspace(0, 2*pi, 100);
[u, v] = meshgrid(u, v);
x = (1 + cos(u)) .* cos(v);
y = (1 + cos(u)) .* sin(v);
z = sin(u);
surf(x, y, z);
axis equal;
xlabel('x');
ylabel('y');
zlabel('z');
title('Parametric Surface');
阅读全文