posterize image of sin(2 x) - cos(x)