I think this article might be helpful (see section 3, http://arxiv.org/pdf/1402.4751v2.pdf), also see this one (http://arxiv.org/abs/1205.7018). Let me explain you very briefly what is happening there. Let us use the following notations: $g(x,y)=B(x,y)$ and $B$ satisfies $B_{11}B_{22}-B_{12}^{2}=0$. Take some suitable space curve $\gamma(t) = (f_{1}(t),f_{2}(t),f_{3}(t)) :I\to \mathbb{R}^{3}$ and lets require that $B(f_{1}(t),f_{2}(t))=f_{3}(t)$ (this is boundary condition for your function $B(x,y)$ --- this means that we are assuming that there is a domain $\Omega \subset \mathbb{R}^{2}$ where the function $B$ is given and $B$ has prescribed boundary data on $\partial \Omega$. By the way, in this case $(f_{1}(t),f_{2}(t))$ parametrizes $\partial \Omega$ and $f_{3}$ is your boundary data for $B$). Then this already gives you one equation after differentiating $B(f_{1}(t),f_{2}(t))=f_{3}(t)$ in variable $t$: $$ B_{1}f'_{1}+B_{2}f'_{2}=f'_{3} $$ where $f'_{j}=\frac{df_{j}}{dt}$. This information is nothing unless you use the fact that $B$ satisfies homogeneous Monge--Ampere equation (i.e., the fact that it has zero Gaussian curvature). It means (thanks to Pogorelov) that you can draw some family of line segments *close* to the boundary $\Omega$ which start from the curve $(f_{1}(t),f_{2}(t))$ and go inside the $\Omega$. Moreover the function $B$ is linear along these segments and the gradient of $B$ is constant along these segments. The typical picture of these family of segments is given here (see the picture below) ![Family of segments][1] This picture *close to the boundary* of $\Omega$ is true if the things are not degenerate (i.e., torsion of $\gamma$ does not vanish on any subinterval $I$) then the domains, where $B$ is linear, cannot touch $\partial\Omega$ on a thick interval. however they can touch $\partial \Omega$ at some finite number of points (or countable number of points if the torsion of $\gamma$ changes sign infinitely many times). In other words this means that the gradient of $B$ in $\Omega$ you can parametrize by one parameter $s$ i.e., $\nabla B = (t_{1}(s),t_{2}(s))$ where $s \in I$ So our equation $B_{1}f'_{1}+B_{2}f'_{2}=f'_{3}$ can be rewritten as follows $$ t_{1}(s)f'_{1}(s)+t_{2}(s)f'_{2}(s)=f'_{3}(s). $$ Of course this information is not enough to find $(t_{1}(s),t_{2}(s))$. But there is one more equation which you can also obtain, namely: $$ t_{1}'(s)\cos(\alpha(s))+t'_{2}(s)\sin(\alpha(s))=0, $$ where $(\cos(\alpha(s)),\sin(\alpha(s)))$ is the direction of the line segment starting at point $(f_{1}(s),f_{2}(s))$ i.e., unit vector, starting at point $(f_{1}(s),f_{2}(s))$ and going inside $\Omega$ along the line segment, along which $B$ is linear. These two equations $$ t_{1}(s)f'_{1}(s)+t_{2}(s)f'_{2}(s)=f'_{3}(s);\\ t_{1}'(s)\cos(\alpha(s))+t'_{2}(s)\sin(\alpha(s))=0, $$ allow you to find $(t_{1}(s),t_{2}(s))$ up to a constant $C$ which you still have to choose later in order to glue these local pieces and to get some global picture for $B$. Thus you find $B$ $$ B(x,y)=f_{3}(s)+t_{1}(s)(x-f_{1}(s))+t_{2}(s)(y-f_{2}(s)) \quad(*), $$ where $(x,y)$ belongs to the line segment starting at point $(f_{1}(s),f_{2}(s))$. For example if $\gamma(t)=(t,g(t),f(t))$ then $$ t_{2}(s)=C\exp\left(-\int_{s_{1}}^{s}\frac{g''(r)}{K(r)}\cos(\alpha(r))dr \right)+\frac{f''(r)}{g''(r)}-\int_{s_{1}}^{s}\left[ \frac{f''(y)}{g''(y)}\right]'\exp\left(-\int_{y}^{s}\frac{g''(r)}{K(r)}\cos(\alpha(r))dr \right)dy $$ where $K(s)=g'(s)\cos(\alpha(s))-\sin \alpha(s)$, and you can also notice that the expression $\left[ \frac{f''(y)}{g''(y)}\right]'$ coincides up to a curvature factor of $\gamma$ with the torsion of $\gamma$ which further plays a crucial role. By the way the equation $t_{1}'(s)\cos(\alpha(s))+t'_{2}(s)\sin(\alpha(s))$ also can be obtained by differentiating (*) with respect to $x$ and treating $s$ as a function of $s(x,y)$. Now there are lot of questions left: 1. How do you find these family of segments (or it is the same as to ask how do you find directions $(\cos(\alpha(s)),\sin(\alpha(s)))$). 2. How do you glue a global picture? 3. Under what conditions this ``roughly speaking'' is justified? Some partial answers are given in the articles that I mentioned above. [1]: https://i.sstatic.net/9k0h3.png