matlab画三维心,matlab动态三维心形(最新整理)

《matlab动态三维心形(最新整理)》由会员分享,可在线阅读,更多相关《matlab动态三维心形(最新整理)(4页珍藏版)》请在人人文库网上搜索。

1、构造体积方程和坐标轴,画出图形; X,Y,Z = meshgrid(linspace(-3,3,101);%3D 心型图方程如下;F = -X.2.*Z.3-(9/80).*Y.2.*Z.3+(X.2+(9/4).*Y.2+Z.2-1).3;hFigure = figure;sz = get(hFigure, Position);set(hFigure, Position, sz(1)-0.15*sz(3) sz(2) 1.3*sz(3) sz(4); set(hFigure,color,w, menu,none)hAxes = axes(Parent,hFigure,NextPlot,add。

2、,. DataAspectRatio,1 1 1,.XLim,30 120,YLim,35 65,ZLim,30 75); view(-39 30);axis off% 制作出动态的隐形效果; hidden on% 画出网格,制作网格动态效果;% 快渲染心得背面:p = patch(isosurface(F,-0.001); set(p,FaceColor,w,EdgeColor,w);% 构造 Y-Z 平面,描完函数在该平面的点: for iX = 35 38 41 45 48 51 54 57 61 64 67plane = reshape(F(:,iX,:),101,101); cDat。

3、a = contourc(plane,0 0); xData = iX.*ones(1,cData(2,1);plot3(hAxes,xData,cData(2,2:end),cData(1,2:end),r); pause(.1), drawnowend% 构造 X-Z 平面,描完函数在该平面的点: for iY = 41 44 47 51 55 58 61plane = reshape(F(iY,:,:),101,101); cData = contourc(plane,0 0); yData = iY.*ones(1,cData(2,1);plot3(hAxes,cData(2,2:en。

4、d),yData,cData(1,2:end),r);pause(.1), drawnowend% 构造 X-Y 平面,描完函数在该平面的点:for iZ = 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 69 71plane = F(:,:,iZ);cData = contourc(plane,0 0); startIndex = 1;if size(cData,2) (cData(2,1)+1) startIndex = cData(2,1)+2; zData = iZ.*ones(1,cData(2,1);plot3(hAxes,cDat。

5、a(1,2:(startIndex-1),.cData(2,2:(startIndex-1),zData,r);endzData = iZ.*ones(1,cData(2,startIndex); plot3(hAxes,cData(1,(startIndex+1):end),.cData(2,(startIndex+1):end),zData,r); pause(.1), drawnowend%给三维心着色set(p,FaceColor,r,EdgeColor,w); pause(.2); set(p,FaceColor,w,EdgeColor,r);%函数已经画完,接下来为文字部分; pa。

6、use(.2)%设置字体大小,粗细,位置等,以下是打出 I (心型图) Wendy;text(7,50,70,I,fontWeight,bold,FontAngle,italic,FontName,Trebuchet MS,fontsize,60,Color,r)pause(.5)text(80,50,43,YOU,fontWeight,bold,FontAngle,italic,FontName,Trebuchet MS,fontsize,60,Color,r)pause(.2)line(20 80,50 50,52.5 52.5, color,r)line(50 50,20 80,52.5。

7、 52.5, color,r)line(50 50,50 50,30 80, color,r)%制作心的动态效果% for i =1:28%set(p,FaceColor,r,EdgeColor,w);%pause(.1);%set(p,FaceColor,r,EdgeColor,r);%pause(.2)% end“”“”At the end, Xiao Bian gives you a passage. Minand once said, people who learn to learn are very happy people. In every wonderful life, le。

8、arning is an eternal theme. As a professional clerical and teaching position, I understand the importance of continuous learning, life is diligent, nothing can be gained, only continuous learning can achieve better self. Only by constantly learning and mastering the latest relevant knowledge, can employees from all walks of life keep up with the pace of enterprise development and innovate to meet the needs of the market. This document is also edited by my studio professionals, there may be errors in the document, if there are errors, please correct, thank you。

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值