plot h*(atan(s*tan(pi*x/w))/pi + floor(x/w + 1/2)), where h=10, w=20, s=.1