coordinates of the vectors that made up shadow

I have a problem and would like to know if you could help me with that.

I need to project a arbitrary 2d plane (z is fixed) orthographically onto an arbitrary 3d object (varying Z values) and find the surface shadows heights (Z values of shadow line for any given point (x,y).