Fil:Double torus illustration.png

Sideinnholdet støttes ikke på andre språk.
Fra Wikipedia, den frie encyklopedi

Opprinnelig fil(985 × 1 077 piksler, filstørrelse: 260 KB, MIME-type: image/png)


Wikimedia Commons' logo
 
Denne PNG rastergrafikken ble laget med MATLAB.
Beskrivelse Illustration of en:Double torus
Dato (UTC)
Kilde Eget verk
Opphavsperson Oleg Alexandrov
Public domain Jeg, opphavsrettensholderen til dette verket, frigir dette verket til allmennheten. Dette gjelder på verdensbasis.
I enkelte land kan dette være juridisk umulig. I så fall:
Jeg gir hvem som helst retten til å bruke dette verket for ethvert formål, uten noen vilkår, med mindre slike vilkår kreves ved lov.

Source code

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

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

   % c controls the transition from one ring to the other
   c = 1.3*pi/2;
   
   Kb = R+r;
  
   h = 0.1; % h is the grid size. Smaller h means prettier picture.
   
   X = (-Kb-h):h:(3*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); x = my_map(x, Kb, c);   % map from two torii to one torus
         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(-165, 42);

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

% save as png
  print('-dpng', '-r500', sprintf('Double_torus_illustration.png'));
   
% This function constructs the second ring in the double torus
% by mapping from the first one.
function y=my_map(x, K, c)

   if x > K
      x = 2*K - x;
   end
   
   if x < K-c
      y = x;
   else
      y = (K-c) + sin((x - (K-c))*(pi/2/c));
   end

Bildetekster

Legg til en kort forklaring på hva filen representerer
Illustration of a double torus

Elementer som er med i denne fila

motiv

Filhistorikk

Klikk på et tidspunkt for å vise filen slik den var på det tidspunktet.

Dato/klokkeslettMiniatyrbildeDimensjonerBrukerKommentar
nåværende12. jul. 2008 kl. 06:32Miniatyrbilde av versjonen fra 12. jul. 2008 kl. 06:32985 × 1 077 (260 KB)Oleg AlexandrovHigher quality version, using isosurface instead of patches. Same license and all that.
6. sep. 2007 kl. 07:49Miniatyrbilde av versjonen fra 6. sep. 2007 kl. 07:491 176 × 1 240 (350 KB)Oleg Alexandrov{{Information |Description= |Source=self-made |Date=Illustration of en:Double torus |Author= Oleg Alexandrov }} {{PD-self}} Category:Differential geometry Category:Files by User:Oleg Alexandrov from en.wikipedia

Den følgende siden bruker denne filen:

Global filbruk

Følgende andre wikier bruker denne filen:

Vis mer global bruk av denne filen.