MATLAB画三维图Word文档格式.docx

上传人:b****4 文档编号:7943642 上传时间:2023-05-09 格式:DOCX 页数:18 大小:318.33KB
下载 相关 举报
MATLAB画三维图Word文档格式.docx_第1页
第1页 / 共18页
MATLAB画三维图Word文档格式.docx_第2页
第2页 / 共18页
MATLAB画三维图Word文档格式.docx_第3页
第3页 / 共18页
MATLAB画三维图Word文档格式.docx_第4页
第4页 / 共18页
MATLAB画三维图Word文档格式.docx_第5页
第5页 / 共18页
MATLAB画三维图Word文档格式.docx_第6页
第6页 / 共18页
MATLAB画三维图Word文档格式.docx_第7页
第7页 / 共18页
MATLAB画三维图Word文档格式.docx_第8页
第8页 / 共18页
MATLAB画三维图Word文档格式.docx_第9页
第9页 / 共18页
MATLAB画三维图Word文档格式.docx_第10页
第10页 / 共18页
MATLAB画三维图Word文档格式.docx_第11页
第11页 / 共18页
MATLAB画三维图Word文档格式.docx_第12页
第12页 / 共18页
MATLAB画三维图Word文档格式.docx_第13页
第13页 / 共18页
MATLAB画三维图Word文档格式.docx_第14页
第14页 / 共18页
MATLAB画三维图Word文档格式.docx_第15页
第15页 / 共18页
MATLAB画三维图Word文档格式.docx_第16页
第16页 / 共18页
MATLAB画三维图Word文档格式.docx_第17页
第17页 / 共18页
MATLAB画三维图Word文档格式.docx_第18页
第18页 / 共18页
亲,该文档总共18页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

MATLAB画三维图Word文档格式.docx

《MATLAB画三维图Word文档格式.docx》由会员分享,可在线阅读,更多相关《MATLAB画三维图Word文档格式.docx(18页珍藏版)》请在冰点文库上搜索。

MATLAB画三维图Word文档格式.docx

none'

markersize'

22);

xlabel('

x轴'

);

ylabel('

y轴'

zlabel('

z轴'

title('

静态螺旋线'

 

2.动态螺旋线

t=0:

10*pi;

i=1;

h=plot3(sin(t(i)),cos(t(i)),t(i),'

*'

axis([-22-22035])

fori=2:

length(t)

set(h,'

xdata'

sin(t(i)),'

ydata'

cos(t(i)),'

zdata'

t(i));

drawnow

pause(0.01)

end

动态螺旋线'

(图略)

3.圆柱螺旋线

x=r.*cos(t);

y=r.*sin(t);

z=t;

plot3(x,y,z,'

h'

axis('

square'

圆柱螺旋线'

二、旋转抛物面

b=0:

0.2:

2*pi;

[X,Y]=meshgrid(-6:

6);

Z=(X.^2+Y.^2)./4;

meshc(X,Y,Z);

旋转抛物面'

或直接用:

ezsurfc('

(X.^2+Y.^2)./4'

) 

三、椭圆柱面

loadclown

ezsurf('

(2*cos(u))'

4*sin(u)'

v'

[0,2*pi,0,2*pi])

view(-105,40) 

%视角处理

shadinginterp 

%灯光处理

colormap(map) 

%颜色处理

gridon 

%添加网格线

axisequal 

%使x,y轴比例一致

%添加坐标轴说明

椭圆柱面'

%添加标题

四、椭圆抛物面

Z=X.^2./9+Y.^2./4;

椭圆抛物面'

X.^2./9+Y.^2./4'

五、'

双叶双曲面

8*tan(u)*cos(v)'

8.*tan(u)*sin(v)'

2.*sec(u)'

[-pi./2,3*pi./2,0,2*pi])

axisequal

axissquare

双叶双曲面'

六、双曲柱面

2*sec(u)'

2*tan(u)'

[-pi/2,pi/2,-3*pi,3*pi])

holdon 

%在原来的图上继续作图

[pi/2,3*pi/2,-3*pi,3*pi])

colormap(map)

shadinginterp

view(-15,30)

双曲柱面'

七、双曲抛物面(马鞍面)

[X,Y]=meshgrid(-7:

7);

Z=X.^2./8-Y.^2./6;

view(85,20)

双曲抛物面'

X.^2./8-Y.^2./6'

八、抛物柱面

Z=Y.^2./8;

h=mesh(Z);

rotate(h,[101],180) 

%旋转处理

%axis([-8,8,-8,8,-2,6]);

抛物柱面'

Y.^2./8'

九、环面

ezmesh('

(5+2*cos(u))*cos(v)'

(5+2*cos(u))*sin(v)'

2*sin(u)'

环面'

十、椭球

(5*cos(u))*sin(v)'

(3*sin(u))*sin(v)'

4*cos(v)'

椭球'

十一、单叶双曲面

4*sec(u)*cos(v)'

2.*sec(u)*sin(v)'

3.*tan(u)'

[-pi./2,pi./2,0,2*pi])

单叶双曲面'

十二、旋转单叶双曲面

8*sec(u)*cos(v)'

8.*sec(u)*sin(v)'

2.*tan(u)'

view(-175,30)

%alpha(.2) 

%透明处理

旋转单叶双曲面'

十三、圆柱面

subplot(1,2,1)

圆柱面'

subplot(1,2,2)

cylinder(30)

调用cylinder函数所得圆柱面'

下面给出用colormap()改变图像颜色的例子:

(用了灯光效果"

shadinginterp"

colormap();

%hot/cool/copper/gray/hsv/spring/summer/winter...

colormap(hsv)

colormap(hot)

colormap(gray)

colormap(cool)

colormap(copper)

下面做了旋转("

view([])"

)、灯光(“shadinginterp”)、透明(“alpha()”)处理:

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 自然科学 > 物理

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2