Huh? A 2D space and a 3D space are separate things. You seem to be assuming the former is in the latter.

Maybe you mean this: You are given a point P, say on the x-y

*plane*, and a segment with known endpoints \(\displaystyle A(x_0, y_0, z_0)\) and \(\displaystyle B(x_1, y_1, z_1)\), and you want to project the point perpendicularly onto the line, and find the (x, y, z) coordinates of the projection.

It doesn't matter where the point is; it doesn't have to be on some particular plane in order to project it. Have you searched for information on projection onto a line?

I might do a

vector projection of

**AP** onto

**AB**, and add the resulting vector to the location vector

**OA**.