Animation of the two dimension Particle in a box

Movie

<<Graphics`Animation`
?Animate
[Graphics:Images/2D_SqrBox_gr_1.gif]

Lx=2;nnx=3;T=20;
Ly=2;nny=3;vel=(1/15);
w = N[(vel π) (Sqrt[(nnx/Lx)^2 + (nny/Ly)^2])]
T = N[2 π/w]
[Graphics:Images/2D_SqrBox_gr_2.gif]
[Graphics:Images/2D_SqrBox_gr_3.gif]

About 21 frames seem to work.


Animate[
        Plot3D[
              Sqrt[4/(Lx Ly)] Cos[(vel Pi)
              (Sqrt[(nnx/Lx)^2 + (nny/Ly)^2] n )]
              Sin[ Pi nnx x/Lx]
              Sin[ Pi nny y/Ly],
              {x,0,Lx},{y,0,Ly},PlotPoints->25,
               PlotRange->{-1,1},Boxed->False],
        {n,0,T},Frames->16
       ]

[Graphics:Images/2D_SqrBox_gr_20.gif]


Converted by Mathematica      February 13, 2002