File:Surface of revolution illustration.png

原始檔案(693 × 885 像素,檔案大小:130 KB,MIME 類型:image/png


摘要

描述 Illustration of a en:surface of revolution
日期 (UTC)
來源
Matlab Logo 
本PNG graphic使用MATLAB創作。

source code below
作者 Oleg Alexandrov
其他版本 Derivative works of this file:  Surface of revolution illustration violett.png
Public domain 我,此作品的版權所有人,釋出此作品至公共領域。此授權條款在全世界均適用。
這可能在某些國家不合法,如果是的話:
我授予任何人有權利使用此作品於任何用途,除受法律約束外,不受任何限制。

Source code (MATLAB)

% illustration of a surface of revolution
function main()

   % the number of data points. More points means prettier picture.
   N = 300;

   a=-3; b = 4.3;

   % polar coordinates
   ZZ = linspace(a, b, N);
   TTheta = linspace(0, 2*pi, N);

   % mesh grid
   [Z, Theta] = meshgrid(ZZ, TTheta);

   % the curve we will revolve
   R = cos(Z)+2; 
   
   X = R.*cos(Theta); Y = R.*sin(Theta);

   figure(2); clf; hold on; axis equal; axis off;
  
% plot the surface
   H=surf(X, Y, Z); shading faceted;

   % pick a color
   mycolor=[184, 77, 66]/256; % pink brick
   mycolor=[184, 224, 98]/256; % light green
%   mycolor=[225, 168, 48]/256; % golden brown
%   mycolor=[0, 66, 17]/256; % dark green
%   mycolor=[225, 0, 84]/256; % pink

   % set some propeties
   set(H, 'FaceColor', mycolor, 'EdgeColor','none', 'FaceAlpha', 1);
   set(H, 'SpecularColorReflectance', 0.1, 'DiffuseStrength', 0.8);
   set(H, 'FaceLighting', 'phong', 'AmbientStrength', 0.3);
   set(H, 'SpecularExponent', 108);
   
% viewing angle
   view(0, 12);

% add in a source of light
   camlight (-50, 54); lighting phong;
   
   % save as png
  print('-dpng', '-r200', 'Surface_of_revolution_illustration.png');

說明

添加單行說明來描述出檔案所代表的內容

在此檔案描寫的項目

描繪內容

檔案歷史

點選日期/時間以檢視該時間的檔案版本。

日期/時間縮⁠圖尺寸使用者備⁠註
目前2011年9月8日 (四) 20:15於 2011年9月8日 (四) 20:15 版本的縮圖693 × 885(130 KB)QuibikSmoothed the edges and added transparency.
2007年9月5日 (三) 04:04於 2007年9月5日 (三) 04:04 版本的縮圖693 × 885(114 KB)Oleg Alexandrov{{Information |Description=Illustration of a en:surface of revolution |Source=self-made with MATLAB, source code below |Date=04:00, 5 September 2007 (UTC) |Author= Oleg Alexandrov }} {{PD-self}} Category:Surfaces [[Cat

下列頁面有用到此檔案:

全域檔案使用狀況

以下其他 wiki 使用了這個檔案: