
Currently, we can displace upward, downward but not both simultaneously, which would produce the frontal view:

I've tried a lot of approaches to achieve this result in the last days. The approach that gives me a result that is nearly successful is transpose the mask with it's inverse version using a gradient:

The problem is that the result is not the one I expected (the red line is the expected curve, exactly as when displacing only the top or bottom areas):

I also tried to adjust the gradient area to fit only the image area (x = image height), but although the curve is ok, the image gets completely distorted:

Result:

Does anyone have any idea how can I achieve such result?