파일:Torus illustration.png

원본 파일(900 × 594 픽셀, 파일 크기: 147 KB, MIME 종류: image/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'));

설명

이 파일이 나타내는 바에 대한 한 줄 설명을 추가합니다

이 파일에 묘사된 항목

다음을 묘사함

파일 역사

날짜/시간 링크를 클릭하면 해당 시간의 파일을 볼 수 있습니다.

날짜/시간섬네일크기사용자설명
현재2008년 7월 13일 (일) 10:122008년 7월 13일 (일) 10: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

다음 문서 4개가 이 파일을 사용하고 있습니다:

이 파일을 사용하고 있는 모든 위키의 문서 목록

다음 위키에서 이 파일을 사용하고 있습니다:

이 파일의 더 많은 사용 내역을 봅니다.