The quantification of 3D view analysis

Hi, everyone,
I am doing research on the quantification of 3D view analysis. I am a grasshopper beginner. One problem at present is how to extract the shape of the horizontal plane (such as the ground) and the shape of the vertical plane (such as the wall), and calculate the farthest distance from the viewpoint to the visible surface.
Thank you in advance for the consideration.