# What is the way to reconstruct a height map from a metric?

Say you have a 2D surface which asymptotically approaches a plane in all directions.

It has some coordinates on it, $x$ and $y$, (not necessarily Cartesian).

You can construct a height map $Z(x,y)$. To create a hilly terrain.

Assume the function $Z$ is analytic so that it is smooth.

Now you can calculate the 2D intrinsic metric of this surface $g_{ab}(x,y)$

(Let $X(x,y),Y(x,y)$ be a cartesian coordinate system written in terms of the coordinates $x$ and $y$ then $g_{ab}(x,y) = \partial_a X \partial_b X + \partial_a Y \partial_b Y +\partial_a Z \partial_b Z)$

If you gave someone just this metric how would they reconstruct the height map $Z$? i.e. reconstruct the function $Z$ from the metric? (Up to a reflection in the xy plane and translation in the z axis).

One case is easy, that is you could work out the Ricci curvature tensor and if it is zero then the height map is constant, it is a flat plane.

What about the general case? (Some cases might be degenerate but a simply hill should be able to be reconstructed from the metric?)

• I'm a little unclear on your setup: are $X,Y$ different to $x,y$? Is your surface just the graph $\{(x,y,Z(x,y)) : (x,y) \in \mathbb R^2\}?$ Jan 9 '18 at 6:27
• X and Y are Cartesian co-ordinates. x and y might be some other coordinates like polar coordinates for example. (Because the surface shouldn't depend on the coordinates you use.) This is probably not so important and one could set X=x, Y=y Jan 9 '18 at 15:47

If you know the metric of a graph in $X,Y$ coordinates then we can recover $Z$ up to vertical translation/reflection as you said, but it turns out to rely crucially on $Z$ being analytic. (Not just smooth!) Since $$g(v,v) = |v|^2 + (v \cdot \nabla Z)^2$$ for any vector $v$ in the $X,Y$ plane, we can find $\nabla Z|_p$ up to a sign by maximizing $\sqrt{g_p(v,v) - |v|^2}$ over unit vectors $v.$ Once we know the gradient of a function we know the function up to a constant (vertical translation); but there's a glitch here: we only know $\nabla Z$ up to a sign at each point, and this sign could change from point to point.

For example, if we weren't requiring $Z$ to be smooth, then the two graphs $Z(X,Y) = X^2$ and $Z(X,Y) = |X|X$ would provide a counterexample. You should be able to get a smooth but non-analytic counterexample by playing with $\exp(-1/X)$ instead of $X^2.$

To fix this up, start by noticing that on an open connected domain where $\nabla Z$ is non-zero and continuous, knowing $\nabla Z$ at one point and $\pm \nabla Z$ everywhere determines $\nabla Z$ everywhere. So either $\nabla Z$ is zero everywhere (in which case we know the surface is a horizontal plane), or there is some point $p$ at which $\nabla Z$ is non-zero. By continuity there must be some disc $\Omega$ about $p$ on which $\nabla Z$ is non-zero, so we know $\nabla Z|_{\Omega}$ up to a global sign and thus $Z|_\Omega$ up to a sign and an additive constant. Since we are assuming $Z$ is analytic, by the unique continuation principle its values on the open set $\Omega$ determine its values everywhere, so we are done.

If you know the metric in some other coordinates $x,y$ and you know how $x,y$ are related to $X,Y$, then you can first convert the metric to $X,Y$ coordinates and then follow the above. If you only know the metric in some arbitrary coordinates $x,y$ without knowing the dependence of $X,Y$ on $x,y,$ then you're pretty clearly out of luck: for example, any height function $Z(X)$ not depending on $Y$ produces a graph which is intrinsically flat, meaning you can choose coordinates $x(X), y(Y) = Y$ so that $g_{ab} = \delta_{ab}.$ (Note that this also shows your remark about vanishing Ricci curvature is false.)

• That looks like a perfect answer. I will have to read through it carefully. By maximising do you mean solve the Euler-Lagrange equations for Z? Jan 10 '18 at 16:19
• For the last part. As I said I assume the graph to be approach a flat plane in all directions so Z(X) not depending on Y would require Z(X)=constant. Would this be enough to remove the ambiguity? Jan 10 '18 at 16:20
• The problem I see is that if you are given a metric $g^{ab}(x,y)$ you don't necessarily know if $x$ and $y$ will correspond to Cartessian coordinates if the surface is projected onto a plane. Jan 10 '18 at 16:23
• @zooby: Euler-Lagrange shouldn't get involved, you just to maximize the function $\sqrt{g_{ab}v^av^b-1}$ over unit vectors $v$ at each point. Maybe a simple Lagrange multiplier will help in practice. The asymptotic flatness doesn't solve the problem if you don't know $x,y:$ for example, take $Z = 1/(1+X^2),$ $y=Y$ and $x(X)=\int_0^X \sqrt{1+1/(1+s^2)^2} ds$ and you will have an asymptotically flat (but not flat) surface with $g_{ab} = \delta_{ab}.$ Jan 10 '18 at 21:37
• Hi, yes, perhaps my wording was not clear. What I meant to say is not that the surface is intrinsically asymptotically flat, but that the surface is asymptotically the flat plane in all directions. i.e. it is like an infinite plane with a bump in in the middle. Jan 11 '18 at 0:00