Файл:Trace operator illustration.png

Матеріал з Вікіпедії — вільної енциклопедії.
Перейти до навігації Перейти до пошуку

Повна роздільність(660 × 1842 пікселів, розмір файлу: 43 КБ, MIME-тип: image/png)

Wikimedia Commons logo Відомості про цей файл містяться на Вікісховищі — централізованому сховищі вільних файлів мультимедіа для використання у проектах Фонду Вікімедіа.
Опис
English: A function defined on a rectangle (top figure, in red), and its trace (bottom figure, in red).
Джерело self-made, with Matlab
Автор Oleg Alexandrov
 
Це PNG графічне зображення було створено з допомогою MATLAB.
Public domain Я, власник авторських прав на цю роботу, передаю роботу в суспільне надбання. Застосовується по всьому світу.
У деяких країнах це не може бути юридично можливо, в такому випадку:
Я даю кожному право на використання цієї роботи для будь-яких цілей, без будь-яких умов, якщо такі умови не вимагаються за законом.


Source code (MATLAB)

 

% illustration of the trace operator

function main()
   L=5;  % box size
   N=10; % number of points in a lot of places
   lw=2; % width of lines
   alpha=0.23; % transparency
   blue=[0, 0, 1];
   red =[1, 0, 0];
   black=[0, 0, 0];

   % the function whose surface we will plot
   f=inline('10-(x.^2-y.^2)/8', 'x', 'y');
   XX=linspace(-L, L, N);
   YY=XX;
   [X, Y]=meshgrid(XX, YY);
   Z=f(X, Y);

   % the surface of the side
   XS = [XX, 0*XX+L invert_vector(XX), 0*XX-L];
   YS = [0*XX-L, YY, 0*XX+L, invert_vector(YY)];

   XS = [XS' XS']';
   YS = [YS' YS']';

   ZS = 0*XS;
   ZS(2, :) = f(XS(2, :), YS(2, :));

% the contour of the bottom
   XD=[-L, L, L, -L, -L];
   YD=[-L, -L, L, L, -L];
   ZD=XD*0;

%  prepare figure 1 for plotting
   figure(1); clf; hold on; axis equal; axis off;
   phi = -68; theta = 28;
   view (phi, theta);

%  plot the function u
   surf(X, Y, Z, 'FaceColor', red, 'EdgeColor','none', 'FaceAlpha', 0.95);
   surf(XS, YS, ZS, 'FaceColor', blue, 'EdgeColor','none', 'FaceAlpha', alpha);
   camlight headlight; lighting phong; % make nice lightning

   %  contour of the bottom and the sides
   plot3(XD, YD, ZD, 'color', black, 'linewidth', lw);
   for i=1:length(XD)
      plot3([XD(i) XD(i)], [YD(i), YD(i)], [0, f(XD(i), YD(i))], 'color', black, 'linewidth', lw);
   end

%  prepare figure 2 for plotting
   figure(2); clf; hold on; axis equal; axis off;
   view (phi, theta); 

%  plot the sides
   surf(XS, YS, ZS, 'FaceColor', blue, 'EdgeColor','none', 'FaceAlpha', alpha);

%  contour of the bottom and the sides
   plot3(XD, YD, ZD, 'color', black, 'linewidth', lw);
   for i=1:length(XD)
      plot3([XD(i) XD(i)], [YD(i), YD(i)], [0, f(XD(i), YD(i))], 'color', black, 'linewidth', lw);
   end
   
% plot the restriction of u
   plot3(XS(2, :), YS(2, :), ZS(2, :), 'linewidth', 2*lw, 'color', red);
   camlight headlight; lighting phong; % make nice lightning 

figure(1); print('-dpng',  '-r200', 'Trace1.png') % save to file.
figure(2); print('-dpng',  '-r200', 'Trace2.png') % save to file.

function Z = invert_vector(X)

   N=length(X);
   Z = X;
   for i=1:N
      Z(i)=X(N-i+1);
   end
Ця математична ілюстрація має бути конвертована у векторний формат SVG. Це дає декілька переваг, докладніше про які Ви можете прочитати на сторінці Commons:Media for cleanup. Якщо Вам вже зараз доступна векторна версія даного зображення, завантажте її, будь ласка. Після завантаження замініть цей шаблон на такий: {{vector version available|Назва_завантаженого_файлу.svg}}.

Підписи

Додайте однорядкове пояснення, що саме репрезентує цей файл

Об'єкти, показані на цьому файлі

зображує

Історія файлу

Клацніть на дату/час, щоб переглянути, як тоді виглядав файл.

Дата/часМініатюраРозмір об'єктаКористувачКоментар
поточний04:04, 18 травня 2007Мініатюра для версії від 04:04, 18 травня 2007660 × 1842 (43 КБ)Oleg Alexandrov{{Information |Description= |Source=self-made, with Matlab |Date= |Author= User:Oleg Alexandrov }} {{PD-self}}

Така сторінка використовує цей файл:

Глобальне використання файлу

Цей файл використовують такі інші вікі: