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