clear;
Nx=35; // taille de la grille
Ny=27;
// Ny=5; // test
Nxaff = 30; // taille affichee
Nyaff = 26;
// Nyaff=4; // test
L=2; // largeur (loi empirique)
points_initiaux_x = zeros(Nx,Ny); // initialisation
points_initiaux_y = zeros(Nx,Ny);
for i=1:Nx
for j=1:Ny
points_initiaux_x(i,j) = i;
points_initiaux_y(i,j) = j;
end
end
points_finaux_x = points_initiaux_x;
// fonction
deff('[e]=profil(r)','e=exp(-(r/L)^2)'); // profil empirique
// programme principal
xmin = (Nx-Nxaff)/2+1;
xmax = Nx-xmin;
ymin = (Ny-Nyaff)/2+1;
ymax = Ny-ymin;
unite=0;dizaine=0; // pour le nom de fichier
for r=-1:0.5:Nx+1 // position du front d'onde
intensite = 1.5; // variation avec la distance
for i=1:Nx
for j=1:Ny
// e = deplacement du point
e = intensite*profil(i-r);
points_finaux_x(i,j) = points_initiaux_x(i,j) + e;
end
end
// dessin
clf;
plot2d(0,0,-1,"010"," ",[xmin,ymin,xmax,ymax])
for i=1:Nx
for j=1:Ny
xpoly(points_finaux_x(i,:),points_initiaux_y(i,:));
xpoly(points_finaux_x(:,j),points_initiaux_y(:,j));
end
end
nom='test\test'+code2str(dizaine)+code2str(unite)+'.gif';
xs2gif(0,nom,1);
unite = unite+1;
if unite == 10 then
dizaine = dizaine + 1;
unite = 0 ;
end
end
Licensing
I, the copyright holder of this work, hereby publish it under the following licenses:
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
This licensing tag was added to this file as part of the GFDL licensing update.http://creativecommons.org/licenses/by-sa/3.0/CC BY-SA 3.0Creative Commons Attribution-Share Alike 3.0truetrue
You may select the license of your choice.
Captions
Add a one-line explanation of what this file represents
{{Information |Description={{en|Propagation of a plane compression wave (impulse); made with [http://www.scilab.org/ Scilab] and Jasc Animation Shop 2.02}} {{fr|Propagation d'une onde de compression plane (impulsion) ; créé avec [http://www.scilab.org/