# Determine line crossing corner of cuboid and POV of a camera faced towards it, based on the angles in the photo

Say you were to take a picture to a corner of a room with 90 degree angled walls and ceiling.

In that picture you'd see three radial lines (the edges of the walls) starting in the same point (the corner) forming 3 angles between each other: alpha, beta, gamma (alpha + beta + gamma = 360 degrees)

That set of angles seems to uniquely identify the line (L) that crosses the corner of the ceiling and passes through the point where the picture was taken.

So assuming that:
1. the corner of the ceiling is the reference point O (Ox, Oy, Oz),
2. the reference axes (x, y, z) coincide with the edges of the walls,
3. Vx, Vy, Vz are the unit vectors and that
4. P (Px, Py, Pz) is any point in the line L

-> How to determine the equations of Px, Py and Pz based on Ox, Oy, Oz, Vx, Vy, Vz, alpha, beta and gamma only?

I suppose it is a matter of determining (Mx, My, Mz) in the equation: (Px, Py, Pz) = (Ox,Oy,Oz) + (Mx, My, Mz) * (Vx, Vy, Vz) but I've been trying to solve this problem for a long time without success. I even introduced it to a few math teachers in my university but this seems to be out of their comfort zone.

So I ask: is there anyone who can help me figure it out?

• Try math.stackexchange: they may appreciate this exercise. – Alex Degtyarev Mar 11 '14 at 11:59
• Dear @Alex and Nuno, it is always better to migrate than to repost. That avoids duplication of questions and of the effort answering them. – Ricardo Andrade Mar 11 '14 at 14:22