title: How to figure out the bounding box of a rotated trapezoid using the rotation
body: <p>I'm trying to connect two rectangular object together which both have one corner cut off. After that operation they are practically trapezoids.</p>
  
  <p>One object is rotated a certain amount of degrees which can vary depending on what input the user provides. I managed to calculate the angle that the second object needs to have so that it aligns with the cut of side of the main object. </p>
  
  <p>The problem now is that there still is a gap between the objects. I think it is best to calculate the bounding box so I know how much I need to adjust the position in the x, y or z direction.</p>
  
  <p>I have no idea how I can calculate the bounding box of this trapezoid though. I have searched the internet/stack overflow but haven't found anything that fits my needs.</p>
  
  <p>The information that I have is the dimensions of the trapezoids and the angle of rotation.</p>
  
  <p>Here is a drawing to hopefully make my case a bit more clear:</p>
  
  <p><a href="https://i.stack.imgur.com/sO8dh.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sO8dh.jpg" alt="Drawing of the rotated trapezoid"></a></p>