首頁 > 其他

如何畫matlab的logo圖片?

2019-12-25 16:51:41

    凡是知道matlab的肯定都知道matlab的logo,但肯定沒幾個人會去試著畫一下matlab的logo。下面我就向大家介紹一下如何畫matlab的logo圖形。


1

最簡單的方法:直接在命令窗輸入指令 logo ,然後巧enter鍵,就會自動生成matlab的logo圖片。如下圖所示:


2

此外還可以使用指令membrane來檢視matlab的logo網格圖,如下圖所示:


3

執行以下程式也可以得到matlab的logo圖形,程式如下面所示:L = 40*membrane(1,25);logoFig = figure('Color',[0 0 0]);logoax = axes('CameraPosition', [-193.4013-265.1546? 220.4819],...??? 'CameraTarget',[26 26 10], ...??? 'CameraUpVector',[0 0 1], ...??? 'CameraViewAngle',9.5, ...??? 'DataAspectRatio', [1 1 .9],...??? 'Position',[0 0 1 1],
...??? 'Visible','off', ...??? 'XLim',[1 51], ...??? 'YLim',[1 51], ...??? 'ZLim',[-13 40], ...??? 'parent',logoFig);s = surface(L, ...??? 'EdgeColor','none', ...??? 'FaceColor',[0.9 0.2 0.2], ...??? 'FaceLighting','phong', ...??? 'AmbientStrength',0.3, ...??? 'DiffuseStrength',0.6, ...??? 'Clipping','off',...??? 'BackFaceLighting','lit', ...??? 'SpecularStrength',1.1, ...??? 'SpecularColorReflectance',1, ...??? 'SpecularExponent',7, ...??? 'Tag','TheMathWorksLogo', ...??? 'parent',logoax);l1 = light('Position',[40 100 20], ...??? 'Style','local', ...??? 'Color',[0 0.8 0.8], ...??? 'parent',logoax);l2 = light('Position',[.5 -1 .4], ...??? 'Color',[0.8 0.8 0], ...??? 'parent',logoax);
ent',logoFig);s = surface(L, ...??? 'EdgeColor','none', ...??? 'FaceColor',[0.9 0.2 0.2], ...??? 'FaceLighting','phong', ...??? 'AmbientStrength',0.3, ...??? 'DiffuseStrength',0.6, ...??? 'Clipping','off',...??? 'BackFaceLighting','lit', ...??? 'SpecularStrength',1.1, ...??? 'SpecularColorReflectance',1, ...??? 'SpecularExponent',7, ...??? 'Tag','TheMathWorksLogo', ...??? 'parent',logoax);l1 = light('Position',[40 100 20], ...??? 'Style','local', ...??? 'Color',[0 0.8 0.8], ...??? 'parent',logoax);l2 = light('Position',[.5 -1 .4], ...??? 'Color',[0.8 0.8 0], ...??? 'parent',logoax);

4

執行第3步程式得到的結果如下圖所示,可以看出結果和第一步是一樣的。這主要是因為第三步的程式碼是logo指令的原始碼。o(∩_∩)o 哈哈!


5

如果你覺得本經驗有用,歡迎分享!!!



IT145.com E-mail:sddin#qq.com