Original Post
Suppose we have an area of land, with height of each grid point stored in an array. You can write a function which calculates height at any x,y by interpolating. When you choose a camera angle you can create a matrix which will convert x,y,h(x,y) into screen coordinates.
But is there a simple way to convert back the other way? Suppose you want to iterate through the whole screen and calculate the x,y,z using the matrix and the height function, so you can choose a colour for the pixel (based on a tilemap of x,y or height or slope or whatever). You can assume a continuous surface, although there may be steep slopes.
This is essentially a mathematical problem - find the (first) intersection between a line and a surface.
Point me to another thread or article if necessary, I imagine a lot of people have had to work this out before me.