Aller au contenu

Fichier:Trace operator illustration.png

Le contenu de la page n’est pas pris en charge dans d’autres langues.
Une page de Wikipédia, l'encyclopédie libre.

Fichier d’origine(660 × 1 842 pixels, taille du fichier : 43 kio, type MIME : image/png)

Ce fichier et sa description proviennent de Wikimedia Commons.

Description
English: A function defined on a rectangle (top figure, in red), and its trace (bottom figure, in red).
Source self-made, with Matlab
Auteur Oleg Alexandrov
 
Ce diagramme a été créé avec MATLAB.
Public domain Moi, propriétaire des droits d’auteur sur cette œuvre, la place dans le domaine public. Ceci s'applique dans le monde entier.
Dans certains pays, ceci peut ne pas être possible ; dans ce cas :
J’accorde à toute personne le droit d’utiliser cette œuvre dans n’importe quel but, sans aucune condition, sauf celles requises par la loi.


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
Cette image (de type math) devrait être recréée dans un format vectoriel, en tant que fichier SVG. Cela offrirait plusieurs avantages : voir Commons:Media for cleanup pour plus d'informations. Si une version SVG de cette image est déjà disponible, merci de bien vouloir l'envoyer. Après cela, remplacez ce modèle par {{vector version available|nouveau nom d'image.svg}}.

Légendes

Ajoutez en une ligne la description de ce que représente ce fichier

Éléments décrits dans ce fichier

dépeint

Historique du fichier

Cliquer sur une date et heure pour voir le fichier tel qu'il était à ce moment-là.

Date et heureVignetteDimensionsUtilisateurCommentaire
actuel18 mai 2007 à 06:04Vignette pour la version du 18 mai 2007 à 06:04660 × 1 842 (43 kio)Oleg Alexandrov{{Information |Description= |Source=self-made, with Matlab |Date= |Author= User:Oleg Alexandrov }} {{PD-self}}

La page suivante utilise ce fichier :

Usage global du fichier

Les autres wikis suivants utilisent ce fichier :