[Math] Convert a 2D point to 3D on a plane

3dgeometry

I have a 2D point and a 3D infinite plane(defined by a 3D point and its normal), I want to convert 2D point to 3D point by projected 2D point onto 3D plane surface.

I'm weak in math, I need a method to find the z-coordinate.

example:

enter image description here

Best Answer

HINT: If the plane equation is given $ax+by+cz+d=0$ Normal vector of the plane $$\overrightarrow{N}=(a,b,c)$$

Assume that the projection point on plane $A(x_1,y_1,z_1)$ that it is unknown and your aim is to find it. The point must satisfy the plane equation $ax+by+cz+d=0$

Given 2D point $B(x_2,y_2,0)$, I assumed that the point is on xy plane. Thus, I took $z=0$

$\overrightarrow{AB}$ must be parallel to $\overrightarrow{N}=(a,b,c)$

Thus $$\frac{x_2-x_1}{a}=\frac{y_2-y_1}{b}=\frac{0-z_1}{c}=k$$ and also we know that $$ax_1+by_1+cz_1+d=0$$

You can solve the equations above and find the projection point $A(x_1,y_1,z_1)$ on the plane.