Apply distortion to Bézier surface I am trying to simulate the image warp effect, that is used in Adobe Photoshop.

The rectangular image is warped according to a cubic Bézier surface (in 2D, all Z components are 0). Having any Bézier surface, vertical distortion $d \in[0,1]$ can be applied to it.

Left: input bézier surface, $d=0$, Right: output surface,  $d=0.8$




Do you have any idea, what is done to the Bézier surface (16 points), when converting from the version on the left to the output on the right?
Edit: changed the answer according to new images and clarification.

for every control point p(k, n)
   p'(k, n) = ( p(k, n) - p(k) ) * d * l(k) + p(k, n)


where k is the row index and n is the column index of control point. l is the elevation factor and is equal to {-1, -1/3, 1/3, 1}. p(k) is the center of the k'th row.

Rationale:

From the new images, red and blue lines are drawn from the center of the line (p(k) which is basically (k, 0)) to that point. On the first line, all control points, including the ones on the graph (red lines) are moved to the same point on that line. p(k, n) - p(k) gives the vector which moves a point from p(k) to p(k, n) which now should be applied to the other way, moving the point to the desired location. On your graphs, d = 1 so that all first line points would be moved to the center. You can easily solve the equation to verify this. d * l(0) is -1, so it would be -p(k, n) + p(k) + p(k, n) which would give p(k).

On the second line, your blue line is again from point to the center, but this time it stopped before reaching it. I cannot tell if it really is cut from 1/3 but that would be a good starting point. So the same formula still applies. l is -1/3 d is 1, so the point would be moved in 1/3 of the way. 3rd is the same as the second but it now moves outwards, thus l is 1/3.

On the final line, all control points are moved out from the center point of that line. This is quite clear since your lines meet up at that center.

The only problem this formula can have is assumption of 1/3, other than that I do not see the reason why it should fail. 

Note: I used row, column while indexing, thus if you are using x, y you should switch their locations.