title: How to get width and height of the bounding box of a rotated rectangle
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/622140/calculate-bounding-box-coordinates-from-a-rotated-rectangle-picture-inside">Calculate Bounding box coordinates from a rotated rectangle, Picture inside</a><br>
    <a href="https://stackoverflow.com/questions/6657479/aabb-of-rotated-sprite">AABB of rotated sprite?</a>  </p>
  </blockquote>
  
  
  
  <p>I have a rectangle with a width of w and height of h. I rotate the rectangle r degrees(originating at its center point).</p>
  
  <p>How can I determine the width(w2) and height(h2) of the bounding box after the rotation.</p>
  
  <p><img src="https://i.stack.imgur.com/H5pB0.jpg" alt="enter image description here"></p>