Theoretically, I know that to warp an image, each pixel $(x,y)$ in the source image is transformed to $(x', y')$ using a function f (i.e. $x'=f(x,y)$ & $y'=f(x,y)$ ). But what mathematical equations can I use instead of the function “f()” . For example, I found in a website the following for warping an image:
$X' = X + [\sin(aX) + \cos(cY)] \dot\ d$ where $a$,$b$,$c$ and $d$ random values.
$y'=$ the same above
My question: from where such this equation come? Is there any systematic technique to generate such equations and then get the similar warped image below?

My question is about how to build equations that represent mapping functions in complicated warping effects for example one that produces such above warping image, and then how to determine values of the coefficients “parameters” for these mathematical equations, definitely not by trial and error.