Animated.gif

An equivalent image is now available on File:Periodic identity function.gif. Summary This file was created by me using the following R source code: f=function(x) {return((x+pi)%%(2*pi)-pi)} x=c(-3000:3000)*pi/1000 y=f(x) b=function(n){return((-1)**(n+1)*2/n)} y_fourier=function(n) {return(sin(x%*%t((1:n)))%*%b(1:n))} for(i in 1:5) { jpeg(paste("animated_",i,".jpg",sep="")) plot(x,y,type="p",col="green", pch=".",main="Periodic version of the identity function", axes=FALSE,xlab="",ylab="") lines(rep(pi,201),(-100:100)*pi/100,lty="dotted") lines(rep(-pi,201),(-100:100)*pi/100,lty="dotted") axis(side=2, pos=0,at=c(-1,1)*pi,font.axis=5,labels=c("-p","p")) axis(side=1, pos=0,at=c(-3:3)*pi,font.axis=5,labels=c("-3p","-2p","-p","0","p","2p","3p")) lines(x,y_fourier(i)) dev.off() } Then using the following shell command: convert -delay 50 -loop 50 ani*.jpg animated.gif -- Deimos 28 18:39, 12 March 2006 (UTC) Licensing