title: What's the translation that brings one 2D polygon completely inside another?
body: <p>Given two 2D polygons, how do I calculate the shortest translation that brings the first inside the second? </p>
  
  <ol>
  <li>Assume there is a solution (i.e. the first does in fact fit inside the second)</li>
  <li>Prefer a simple algorithm over completeness of solution. For example if the algorithm is simplified by making assumptions about the shapes having a certain number of sides, being concave, etc. then make those assumptions. </li>
  </ol>
  
  <p>I can imagine a brute force solution, where I first calculate which are the offending vertices that lie outside the initial polygon. I'd then iterate through these external vertices and find the closest edge to each. Then I'm stuck. Each distance from an external vertex to an edge creates a constraint (a "need to move"). I then need to solve this system of constraints to find the movement that fulfills them all without creating any new violations. </p>