# source("http://macosa.dima.unige.it/r.R")
BF=8; HF=2.2
F = 14*pi
Plane(0,F,-2,2)
a=0.5; b=1.5; h=1; k=2; N=14; w=F/N
f=function(x) a*sin(x*h); g=function(x) b*sin(x*k); fg=function(x) f(x)+g(x)
aboveX(bquote(pi),pi); for(i in 2:14) aboveX(bquote(.(i)*pi),pi*i)
for(i in 1:N) {GRAPH2(f,w*(i-1),w*i,"brown"); GRAPH2(g,w*(i-1),w*i,"red"); GRAPH(fg,w*(i-1),w*i,"blue"); wait(2)}
#
Plane(0,F,-2,2)
k=sqrt(2)
f=function(x) a*sin(x*h); g=function(x) b*sin(x*k); fg=function(x) f(x)+g(x)
aboveX(bquote(pi),pi); for(i in 2:14) aboveX(bquote(.(i)*pi),pi*i)
for(i in 1:N) {GRAPH2(f,w*(i-1),w*i,"brown"); GRAPH2(g,w*(i-1),w*i,"red"); GRAPH(fg,w*(i-1),w*i,"blue"); wait(2)}