File:Wave packet.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 5,478 × 3,964 pixels, file size: 29 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Illustration of a wave packet.
    Date
    Source Own work based on: Photon paquet onde.png: 
    Author Oleg Alexandrov
    SVG development
    InfoField
     The SVG code is valid.
     This diagram was created with MATLAB.
     and with Inkscpae.

    Licensing

    Public domain This work has been released into the public domain by its author, Oleg Alexandrov. This applies worldwide.
    In some countries this may not be legally possible; if so:
    Oleg Alexandrov grants anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

    Source code

    % Illustration of a wave packet
    
    L = 1.7; % 2*L=length of domain
    A = 1.2; % max amplitude
    
    K = 1.3; % gaussian param
    fast_wl = 52;
    slow_wl = 4;
    
    N = 500; % num of data points
    lw = 40; % linewidth of curves
    
    X = linspace(-L, L, N);
    %Y = cos(X*slow_wl)./(1 + (X/K).^2);
    q=1.5;
    Y = A*cos(abs(X).^q*slow_wl).*exp(-K*X.^2);
    
    num_P=1; % how many periods to keep
    Y( find (abs(X) > ((2*num_P+0.5)*pi/slow_wl)^(1/q)) )=0;
    Z = Y.*cos(fast_wl*X);
    
    % KSmrq's colors
    red    = [0.867 0.06 0.14];
    blue   = [0, 129, 205]/256;
    green  = [0, 200,  70]/256;
    yellow = [254, 194,   0]/256;
    white = 0.99*[1, 1, 1];
    black = [0, 0, 0];
    
    figure(1); clf; hold on; axis equal; axis off;
    lw2=0.7*lw;
    plot(X, Y, 'color', red, 'linewidth', lw2, 'linestyle', '--')
    plot(X, -Y, 'color', red, 'linewidth', lw2, 'linestyle', '--')
    plot(X, Z,  'color', blue, 'linewidth', lw)
    
    saveas(gcf, 'Wave_packet.eps', 'psc2') % save as eps
    %plot2svg(Wave_packet.svg')             % save as svg  (need the svg package for that)
    

    Captions

    Graphical representation of a basic wave packet

    Items portrayed in this file

    depicts

    2 December 2007

    29,973 byte

    image/svg+xml

    92c5cdd0e2ab25f59c32ad892fff703a3c191b83

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current07:40, 2 December 2007Thumbnail for version as of 07:40, 2 December 20075,478 × 3,964 (29 KB)wikimediacommons>Oleg AlexandrovTweak

    There are no pages that use this file.