# $2$-dimensional to $3$-dimensional projection

I have the coordinates of three vertices of a triangle on a $$2$$-dimensional image plane - $$(x_1,y_1), (x_2,y_2)$$ and $$(x_3,y_3)$$. Their $$3$$-dimensional real world projection points are also known - $$(x_1',y_1',z_1'), (x_2',y_2',z_2')$$ and $$(x_3',y_3',z_3')$$ respectively. Now I have to find the $$3$$-dimensional projection of another arbitrary point $$(x_c, y_c)$$, how can I find them, if it is a linear projection?

Note: I do not have the information about $$d$$, where $$d$$ is distance between COP(center of projection) and PP(Projection plane/monitor). Then I assume that, I could use perspective projection equation.

Where is the two-dimensional plane in the three-dimensional space and how do the coordinates of the plane and space relate to each other? In general, is the point $$(x,y)$$ in the plane simply at $$(x,y,0)$$ in space?

Once you have determined how to find the full spatial coordinates of each point in the plane (e.g., by setting $$z= 0,$$ or whatever is necessary), find the three-dimensional coordinates of the three points of the original triangle, $$A,$$ $$B,$$ and $$C.$$ If these are being projected to $$A',$$ $$B',$$ and $$C',$$ respectively, then the lines $$AA',$$ $$BB',$$ and $$CC'$$ all meet at a single point. Find that point.

If the three lines do not meet then perhaps the projection is not from $$A$$ to $$A'$$ but from $$A$$ to $$B'$$ instead. There are six ways the points could have been permuted; if none of them results in three concurrent lines of projection then the "projection" was not as it was supposed to be after all.

• Hi david, I didn't quite understand your question. Can you please give me some more hints? How can I know "Where is the two-dimensional plane in the three-dimensional space and how do the coordinates of the plane and space relate to each other?" - I couldn't figure out how to find these informations. – adnanobuntu Jan 17 '19 at 12:07
• And my input here is a 2 dimensional image of object on tabletop and I am assuming no distortions, therefore it is a linear projection, so the projections should be from $A$ to $A'$. Now, I need to reconstruct the $3$-dimensional scene from it, that's why I need to know the $3$-dimensional points of the corresponding $2$-dimensional points. – adnanobuntu Jan 17 '19 at 12:07
• Your question leaves out vital information. Suppose you knew the 3D coordinates of the central point $P$ and the 3D coordinates of three other points. Someone else has a table with a Cartesian coordinate grid inscribed on it, which they are going to place so that the points are projected onto it. Can you predict for me the coordinates on the inscribed grid where the shadow of each point will fall without knowing where the table will be? I don't think so. So my first question is, where is the table and which way is it oriented? I want the 3D coordinates of the point $(x_1,y_1)$. – David K Jan 17 '19 at 12:45
• The second question is, are you sure that $(x_1',y_1',z_1')$ is projected to $(x_1,y_1)$ and not $(x_2,y_2)$? If so, your question should say "and $(x_3',y_3',z_3'),$ respectively." If not, you could write "and $(x_3',y_3',z_3'),$ not necessarily in that order." As it is now, your question is ambiguous. – David K Jan 17 '19 at 12:50
• The question may not have the desired answer even with all that information, however. All you can find out from the three "real-world" coordinates and their three projections is the center of the projection $P.$ Now given a fourth set of coordinates in the projection plane, $C,$ you would know the "real-world" coordinates are on the line $CP$ but you would not know where they are on that line. Any point on that line between $C$ and $P$ would project to $C,$ so you could be looking at the projection of any of those points. – David K Jan 17 '19 at 12:54

Say the linear transformation is$$(x,y)\mapsto(ax+by,cx+dy,ex+fy)$$You can solve for the $$6$$ unknowns $$a,b,c,d,e,f$$ using any two points that give you $$6$$ independent equations. Say you chose $$(x_1,y_1),(x_2,y_2)$$, then$$\begin{matrix}ax_1+by_1=x_1'&ax_2+by_2=x_2'\\cx_1+dy_1=y_1'&cx_2+dy_2=y_2'\\ex_1+fy_1=z_1'&ex_2+fy_2=z_2'\end{matrix}$$Once you find $$a,b,c,d,e,f$$, you can transform any point in $$\Bbb R^2$$.

• If two of the points of the original triangle are collinear with the origin then the six equations you get from those two points will have too many solutions. But then you can replace one of those points with the third point of the triangle, assuming "triangle" means they are not all collinear. – David K Jan 16 '19 at 13:19
• But the transformation you get this way will not be a projection in general. It will usually involve rotation as well, which is also a linear transformation. – David K Jan 16 '19 at 13:21
• Thanks, incorporated the changes – Shubham Johri Jan 16 '19 at 13:28