You have a points A and B, (ax, ay) and (bx, by). The vector between these two points is <ax - bx, ay - by>, going from B to A. Now what you need is the unit vector. To get this, we divide that vector by it's length. So let L = √( (ax - bx)² + (ay - by)² ), which is the length. <(ax - bx) / L, (ay - by) / L> is the unit vector. Then multiply this by the distance you want the camera, D: <D*(ax - bx) / L, D*(ay - by) / L>.

So Cx = bx + D*(ax - bx) / L and Cy = by + D*(ay - by) / L. This is because that vector will be the distance you have to travel from b to get to c, so to find the position of c, you just add the vector to that of b.

For all three planes, all you do is add in a z value:

A: (ax, ay, az)

B: (bx, by, bz)

Vector: <ax - bx, ay - by, az - bz>

L: √( (ax - bx)² + (ay - by)² + (az - bz)² )

Unit vector: <(ax - bx) / L, (ay - by) / L>

So you get Cx = bx + D*(ax - bx) / L, Cy = by + D*(ay - by) / L, and Cz = bz + D*(az - bz) / L.