plot h*(1/2 coth(a/2) tanh(a((x/w-floor(x/w))-0.5)) + 1/2 + floor(x/w)) where h=500, w=500, a=10