LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2I1EhRic=
restart:with(plots):A:=2:k:=1:omega:=1:NN:=30:Lx:=4.3*Pi:
g1:=(x,t)->A*sin(k*x-omega*t):
g2:=(x,t)->A*sin(k*x-omega*t):
p0:=animate(plot,[g1(x,t)+5,x=0..Lx,color=blue,linestyle=dash],t=0..4*Pi,frames=100):
p1:=animate(plot,[g2(x,-t)+2.5,x=0..Lx,color=red,linestyle=dash],t=0..4*Pi,frames=100):
p2:=animate(plot,[g2(x,-t)+g1(x,t),x=0..Lx,color=black,thickness=2],t=0..4*Pi,frames=100):
pp:=animate(pointplot,[{seq([n*Lx/NN,g1(n*Lx/NN,t)+g2(n*Lx/NN,-t)],n=0..NN)},symbol=circle,color=blue,symbolsize=20],t=0..4*Pi,frames=100);
pp2:=animate(pointplot,[{seq([n*Lx/NN,g1(n*Lx/NN,t)+g2(n*Lx/NN,-t)],n=5..5)},symbol=solidcircle,color=red,symbolsize=20],t=0..4*Pi,frames=100);
display([p0,p1],color=[green,blue,red]);
display([p0,p1,p2,pp,pp2],color=[green,blue,red]);
pm0:=animate(plot,[g1(x,t),x=0..Lx,color=blue,linestyle=dash],t=0..4*Pi,frames=100):
ppm2:=animate(pointplot,[{seq([n*Lx/NN,g2(n*Lx/NN,t)],n=5..5)},symbol=solidcircle,color=red,symbolsize=20],t=0..4*Pi,frames=100);
display([pm0,ppm2]);