inverse function sin(x-pi/4)*sqrt(1/2)+1/2