# pixels in a projection of a triangle in 3d space onto a 3d plane through a pinhole camera

I have a triangle in 3d space. The x and y components of its vertices make a 2d right isoceles triangle. I am projecting it through a pinhole onto a plane. The projected triangles on the plane are now 2d triangles.

I have an algorithm to draw every pixel of a 2d triangle, what I'm wondering is how to find out the corresponding x and y coordinates of the original 3d triangle for each pixel of the 2d triangle.

Thanks for reading this. I only learned high school algebra and geometry, so I won't understand university-level math.

(edited)

-
Maybe this question can help you. math.stackexchange.com/questions/164700/… –  Mathlover Aug 29 '12 at 10:47
Waht do you mean by “x and y coordinates of the original 3d triangle”? If the triangle is 3d, you'll expect three coordinates, so why only two? In general, you'll want to connect the pixel with the pinhole position to form a line in 3d, and intersect that with the plane of the triangle to obtain the preimage position. Is this the kind of answer you're interested in? If so, I'll expand it a bit. –  MvG Sep 19 '12 at 20:31