|
试着编了一下其它图的代码,如下,有不对的地方还望楼主指点!
- %%% 圆环面
- clc
- clear
- u=linspace(0,2*pi,100);
- v=linspace(0,2*pi,100);
- [U,V]=meshgrid(u,v);
- X=(4+sin(U)).*cos(V);
- Y=(4+sin(U)).*sin(V);
- Z=cos(U);
- mesh(X,Y,Z)
- axis equal
- axis off
复制代码- %%% 螺旋管,俗称“弹簧”
- clc
- clear
- u=linspace(0,2*pi,100);
- v=linspace(0,6*pi,100);
- [U,V]=meshgrid(u,v);
- X=(4+sin(U)).*cos(V);
- Y=(4+sin(U)).*sin(V);
- Z=cos(U)+V;
- mesh(X,Y,Z)
- axis equal
- axis off
复制代码- %%% 圆柱上的缎带
- clc
- clear
- u=linspace(0,2);
- v=linspace(0,6*pi);
- [U,V]=meshgrid(u,v);
- X=2*cos(V);
- Y=2*sin(V);
- Z=U+V;
- mesh(X,Y,Z)
- axis equal
- axis off
复制代码- %%% 纽带
- clc
- clear
- u=linspace(0,2);
- v=linspace(0,6*pi);
- [U,V]=meshgrid(u,v);
- X=U.*cos(V);
- Y=U.*sin(V);
- Z=5*V;
- mesh(X,Y,Z)
- axis equal
- axis off
复制代码 |
评分
-
2
查看全部评分
-
|