לדלג לתוכן

קובץ:Mollifier movie.gif

תוכן הדף אינו נתמך בשפות אחרות.
מתוך ויקיפדיה, האנציקלופדיה החופשית

Mollifier_movie.gif(624 × 387 פיקסלים, גודל הקובץ: 372 ק"ב, סוג MIME‏: image/gif, בלולאה, 8 תמונות, 8.0 שניות)

ויקישיתוף זהו קובץ שמקורו במיזם ויקישיתוף. תיאורו בדף תיאור הקובץ המקורי (בעברית) מוצג למטה.
 
. MATLAB עם‎‎ נוצרה ה GIF תמונת מפת סיביות
תיאור Illustration of en:Mollifier
תאריך יצירה (UTC)
מקור self-made with MATLAB
יוצר Oleg Alexandrov
גרסאות אחרות File:Heat eqn.gif
Public domain ברצוני, בעלי זכויות היוצרים על יצירה זו, לשחרר יצירה זו לנחלת הכלל. זה תקף בכל העולם.
יש מדינות שבהן הדבר אינו אפשרי על פי חוק, אם כך:
אני מעניק לכל אחד את הזכות להשתמש בעבודה זו לכל מטרה שהיא, ללא תנאים כלשהם, אלא אם כן תנאים כאלה נדרשים על פי חוק.

Source code (MATLAB)

% illustration of mollification
function main()

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

   % a step function
   Z = get_step_function (N);

% Do a loop mollifying Z more and more

   K = [100 50 25 10  5.4  3.0  2.0  1.0];
   count = 1;
   for kernel = K

      % a smooth function with small support, that will serve as mollifier
      W = get_mollifier     (kernel, N);

      % get the convolution of the two, so a mollified step function
      S = conv2(Z, W);

      % truncate S at the edges, and scale it
      p=0.2;
      [m, n] = size(S);
      m1 = floor(p*m)+1; m2=floor((1-p)*m)-1;
      n1 = floor(p*n)+1; n2=floor((1-p)*n)-1;
      S = S(m1:m2, n1:n2);
      S = 0.25*(m2-m1)*S/max(max(S));
      
      % plot the surface
      figure(2); clf; hold on; axis equal; axis off;
      surf(S);
   
      % make the surface beautiful
      shading interp;
      colormap autumn;

      % add in a source of light
      camlight (-50, 54);
   
      % viewing angle
      view(-40, 38);

      frame_str = sprintf('Frame%d.png', 1000+count)
      count = count+1;

      [m, n] = size(S); mx=max(max(S));
      axis([1 m 1 n 0 mx]); 
      
      % save as png
      print('-dpng', '-r100', frame_str);
      
      pause(1);
   end
  
  % put into a gif with the following command on Unix
  % convert -antialias -loop 10000  -delay 100 -compress LZW Frame100* Mollifier_movie.gif
    
% get a function which is 1 on a set, and 0 outside of it
function Z = get_step_function(N)
   XX = linspace(-1.5, 4, N);
   YY = linspace(-4, 4, N);
   [X, Y] = meshgrid(XX, YY);
   
   c = 2;
   k=1.2;
   shift=10;
   Z = (c^2-X.^2-Y.^2).^2 + k*(c-X).^3-shift;
   
   Z =1-max(sign(Z), 0);

function W = get_mollifier(kernel, N)
% now try to get a function with compact support
% as a mollifier
% We will cheat by using a gaussian

   a = 4;
   XX = linspace(-a, a, N);
   YY = linspace(-a, a, N);
   [X, Y] = meshgrid(XX, YY);
   
   W = exp(-kernel*(X.^2+Y.^2));

   % truncate the Gaussian to make it with compact support
   trunc = 1e-2;
   W = max(W-trunc, 0);

כיתובים

נא להוסיף משפט שמסביר מה הקובץ מייצג

פריטים שמוצגים בקובץ הזה

מוצג

היסטוריית הקובץ

ניתן ללחוץ על תאריך/שעה כדי לראות את הקובץ כפי שנראה באותו זמן.

תאריך/שעהתמונה ממוזערתממדיםמשתמשהערה
נוכחית07:01, 1 בספטמבר 2007תמונה ממוזערת לגרסה מ־07:01, 1 בספטמבר 2007‪387 × 624‬ (372 ק"ב)Oleg Alexandrov{{Information |Description=Illustration of en:Mollifier |Source=self-made with MATLAB |Date=~~~~~ |Author= Oleg Alexandrov }} {{PD-self}}

אין בוויקיפדיה דפים המשתמשים בקובץ זה.