title: How to calculate rounded corners for a polygon?
body: <p>I'm looking for an algorithm that allows me to create rounded corners from a polygon.</p>
  <p>I have an array of points that represents the polygon (outlined in red) and on output I want an array of points that represents the polygon with rounded corners (outlined in black).</p>
  <p>I would also like to have a way to control the radius of each corner.</p>
  <p>I tried to use Bézier curves and subdivision but it's not what I'm looking for. Bézier curves and subdivision are smoothing the polygon.</p>
  <p>What I want is to only make the corners rounded.</p>
  <p>Does somebody know any good algorithm for doing that?</p>
  <p>I'm working with C# but the code has to be independent from any .NET libraries.</p>
  <p><img src="https://i.stack.imgur.com/kyoI6.png" alt="Example" /></p>