File:Ondes compression 2d 20.gif
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Ondes_compression_2d_20.gif (610 × 461 pixels, file size: 432 KB, MIME type: image/gif, looped, 89 frames, 8.9 s)
File information
Structured data
Captions
Summary[edit]
DescriptionOndes compression 2d 20.gif |
English: Compressional wave (longitudinal wave: seismic P-wave, sound etc.): 2d representation on a 20×20 grid, with an empirical shape (derivative from a gaussian profile, small attenuation with distance); made with Scilab
Français : Onde de compression (onde longitudinale : onde sismique P, son…) : représentation 2d sur une grille 20×20 grid, avec un profil empirique (derivée d'un profil gaussien, faible d'attenuation avec la distance) ; réalisé avec Scilab |
Date | |
Source | Own work |
Author | Christophe Dang Ngoc Chan (cdang) |
Permission (Reusing this file) |
GFDL |
Other versions | smaller size: Image:Ondes compression 2d 20 petit.gif; plane version: Image:Onde compression impulsion 1d 30.gif; other type of body wave: Image:Ondes cisaillement 2d 20.gif |
Source code (scilab)[edit]
clear;
N = 25; // taille de la grille (noeuds)
Naff = 20; // taille affichee
centre = N/2; // centre de la grille
L = 2; // largeur de la perturbation (loi empirique)
points_initiaux_x = zeros(N, N); // initialisation des
points_initiaux_y = zeros(N, N); // coordonnées
for i = 1:N
for j = 1:N
points_initiaux_x(i, j) = i - centre;
points_initiaux_y(i, j) = j - centre;
end
end
points_finaux_x = points_initiaux_x;
points_finaux_y = points_initiaux_y;
for i = 1:N
for j = 1:N
d = sqrt(points_initiaux_x(i, j)^2 + points_initiaux_y(i, j)^2);
distance(i, j) = d; // distance au centre
if d == 0 then
direction_x(i, j) = 0 ; direction_y(i, j) = 0 ;
else
direction_x(i,j) = points_initiaux_x(i, j)/d; // vecteur unitaire
direction_y(i,j) = points_initiaux_y(i, j)/d;
end
end
end
// fonction
deff('[e] = profil(r)','e = r*exp(-(r/L)^2)'); // profil empirique
// programme principal
unite = 0; dizaine = 0; // pour le nom de fichier
for r = 0.1:0.2:centre*1.42 // rayon du front d'onde
intensite = r^(-1/3); // variation avec la distance
for i = 1:N
for j = 1:N
// e = deplacement du point
e = intensite*profil(distance(i,j)-r);
points_finaux_x(i, j) = points_initiaux_x(i, j) + e*direction_x(i, j);
points_finaux_y(i, j) = points_initiaux_y(i, j) + e*direction_y(i, j);
end
end
// dessin
clf;
plot2d(0, 0 , -1, "010", " ", [-Naff/2, -Naff/2, Naff/2, Naff/2])
for i = 1:N
xpoly(points_finaux_x(i, :), points_finaux_y(i, :));
xpoly(points_finaux_x(:, i), points_finaux_y(:, i));
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[edit]
I, the copyright holder of this work, hereby publish it under the following license:
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 |
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. | ||
| ||
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 |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 15:02, 17 November 2006 | 610 × 461 (432 KB) | Cdang (talk | contribs) | more GIF compression, smaller file size | |
14:47, 17 November 2006 | 610 × 461 (496 KB) | Cdang (talk | contribs) | {{Information |Description={{en|Compressional wave (longitudinal wave: seismic P-wave, sound etc.): 2d representation on a 20×20 grid, with an empirical shape (derivative from a gaussian profile, no attenuation with distance); made with [http://www. |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on beta.wikiversity.org
- Usage on en.wikiversity.org
- Usage on fr.wikiversity.org