function x=i2x(i)
    global N h
    x=(i-1)/(N-1)*(3+h)+(i-N)/(1-N)*(-3-h);