title: Calculating 2D angles for 3D objects in perspective
body: <p>Imagine a photo, with the face of a building marked out.</p>
  
  <p>Its given that the face of the building is a rectangle, with 90 degree corners.  However, because its a photo, perspective will be involved and the parallel edges of the face will converge on the horizon.</p>
  
  <p>With such a rectangle, how do you calculate the angle in 2D of the vectors of the edges of a face that is at right angles to it?</p>
  
  <p>In the image below, the blue is the face marked on the photo, and I'm wondering how to calculate the 2D vector of the red lines of the other face:</p>
  
  <p><a href="http://img689.imageshack.us/img689/2060/leslievillestarbuckscor.jpg" rel="nofollow noreferrer">example http://img689.imageshack.us/img689/2060/leslievillestarbuckscor.jpg</a></p>
  
  <p>So if you ignore the picture for a moment, and concentrate on the lines, is there enough information in one of the face outlines - the interior angles and such - to know the path of the face on the other side of the corner?  What would the formula be?</p>
  
  <p><a href="https://i.stack.imgur.com/6MbtA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6MbtA.png" alt="example"></a>
  </p>
  
  <p>We know that both are rectangles - that is that each corner is a right angle - and that they are at right angles to each other.  So how do you determine the vector of the second face using only knowledge of the position of the first?</p>