الملف الأصلي(900 × 594 بكسل حجم الملف: 147 كيلوبايت، نوع 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

تاريخ الملف

اضغط على زمن/تاريخ لرؤية الملف كما بدا في هذا الزمن.

زمن/تاريخصورة مصغرةالأبعادمستخدمتعليق
حالي01:12، 13 يوليو 2008تصغير للنسخة بتاريخ 01:12، 13 يوليو 2008900 × 594 (147 كيلوبايت)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

الصفحتان التاليتان تستخدمان هذا الملف:

الاستخدام العالمي للملف

الويكيات الأخرى التالية تستخدم هذا الملف:

اعرض المزيد من الاستخدام العام لهذا الملف.