File:Torus illustration.png

頁面內容不支援其他語言。
這個檔案來自維基共享資源
維基百科,自由的百科全書

原始檔案(900 × 594 像素,檔案大小:147 KB,MIME 類型:image/png


 
本PNG 點陣圖使用MATLAB創作。
描述 Illustration of torus
日期 (UTC)
來源 self-made, with MATLAB
作者 Oleg Alexandrov
其他版本 此檔案衍生的作品:  Infobox torus.png
Public domain 我,此作品的版權所有人,釋出此作品至公共領域。此授權條款在全世界均適用。
這可能在某些國家不合法,如果是的話:
我授予任何人有權利使用此作品於任何用途,除受法律約束外,不受任何限制。

Source code

% illustration of a torus, obtained as an isosurface
function main()

   % big and small radii of the torus
   R = 3; r = 1; 

   Kb = R+r;
  
   h = 0.1; % h is the grid size. Smaller h means prettier picture.
   
   X = (-Kb-h):h:(Kb+h);   m = length(X);
   Y = (-Kb-h):h:(Kb+h);   n = length(Y);
   Z = (-r-h):h:(r+h);     k = length(Z);
 
   W = zeros(m, n, k); % the zero level set of this function will be the desired shape
 
   for i=1:m
      for j=1:n
         x = X(i);
         y = Y(j); 
         W(i, j, :) = (sqrt(x^2+y^2)-R)^2 + Z.^2-r^2; % torus eqn, vectorize in Z
      end
   end

   figure(4); clf; hold on; axis equal; axis off;

   H = patch(isosurface(W, 0));
   isonormals(W, H);
      
   light_green=[184, 224, 98]/256;

   % set some propeties
   set(H, 'FaceColor', light_green, 'EdgeColor','none', 'FaceAlpha', 1);
   set(H, 'SpecularColorReflectance', 0.1, 'DiffuseStrength', 0.8);
   set(H, 'FaceLighting', 'phong', 'AmbientStrength', 0.3);
   set(H, 'SpecularExponent', 108);

   daspect([1 1 1]);
   axis tight;
   colormap(prism(28))
      
  % viewing angle
   view(-146, 32);

  % add in a source of light
   camlight (-10, 54); lighting phong;

  %save as png
  print('-dpng', '-r400', sprintf('Torus_illustration.png'));

說明

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

在此檔案描寫的項目

描繪內容

環面 繁體中文 (已轉換拼寫)

創作作者 Chinese (Hong Kong) (已轉換拼寫)

沒有維基數據項目的某些值

作者姓名字串 繁體中文 (已轉換拼寫):​Oleg Alexandrov
維基媒體使用者名稱 繁體中文 (已轉換拼寫):​Oleg Alexandrov

著作權狀態 繁體中文 (已轉換拼寫)

有著作權 繁體中文 (已轉換拼寫)

多媒體型式 繁體中文 (已轉換拼寫)

image/png

檔案歷史

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

日期/時間縮⁠圖尺寸用戶備⁠註
目前2008年7月13日 (日) 01:12於 2008年7月13日 (日) 01:12 版本的縮圖900 × 594(147 KB)Oleg Alexandrov{{Information |Description=Illustration of torus |Source=self-made, with MATLAB |Date=~~~~~ |Author= Oleg Alexandrov }} {{PD-self}} ==Source code== <source lang="matlab"> % illustration of a torus, o

下列頁面有用到此檔案:

全域檔案使用狀況

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

檢視此檔案的更多全域使用狀況