abs(((x-1) mod 4)-2)-0.5, (sin(x*pi/2)*2/pi+0.5), plot from -4 to 4