声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 1243|回复: 0

[共享资源] MATLAB进入时显示的图标的程序实现,有动画效果

[复制链接]
发表于 2006-11-15 15:36 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
  1. %LOGO   Plot the L-shaped membrane logo with MATLAB 5 lighting.

  2. %   Copyright (c) 1984-98 by The MathWorks, Inc.
  3. %   $Revision: 5.12 $  $Date: 1998/09/29 16:15:48 $

  4. if exist('GalleryGUIFlag'), close(figNumber), end;

  5. infoStr = str2mat(' ', ...
  6.     ' This is the MathWorks logo, the fundamental mode', ...
  7.     ' for wave propogation on an L-shaped domain.', ...
  8.     ' ', ...
  9.     ' File name: logo.m');

  10. % gallinit(figNumber,infoStr)
  11. figure('Color',[0 0 0]);
  12. %for ik=[0 0.3125 0.625 1.25 2.5 5 10 20 40]
  13. for ik=(0:0.25:5).^2
  14. L = ik*membrane(1,25);
  15. cla
  16. axes('Color',[0 0 0]);
  17. axes('CameraPosition', [-193.4013 -265.1546  220.4819],...
  18.     'CameraTarget',[26 26 10], ...
  19.     'CameraUpVector',[0 0 1], ...
  20.     'CameraViewAngle',9.5, ...
  21.     'DataAspectRatio', [1 1 .9],...
  22.     'Position',[0 0 1 1], ...
  23.     'Visible','off', ...
  24.     'XLim',[1 51], ...
  25.     'YLim',[1 51], ...
  26.     'ZLim',[-13 40]);
  27. s = surface(L, ...
  28.     'EdgeColor','none', ...
  29.     'FaceColor',[0.8 0.2 0.2], ...
  30.     'FaceLighting','phong', ...
  31.     'AmbientStrength',0.3, ...
  32.     'DiffuseStrength',0.6, ...
  33.     'Clipping','off',...
  34.     'BackFaceLighting','lit', ...
  35.     'SpecularStrength',1.1, ...
  36.     'SpecularColorReflectance',1, ...
  37.     'SpecularExponent',7);
  38. l1 = light('Position',[40 100 20], ...
  39.     'Style','local', ...
  40.     'Color',[0 0.7 0.7]);
  41. l2 = light('Position',[.5 -1 .4], ...
  42.    'Color',[1 1 0]);
  43. pause(0.02)
  44. end
复制代码
回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-9-25 01:15 , Processed in 0.058941 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表