def backproject(S, T, depth): # Convert to Cartesian for modified depth input. # depth = sqrt(x^2 + z^2). x = depth * tf.sin(S) y = depth * tf.tan(T) z = depth * tf.cos(S) return x, y, z