title: How to "soften" the edges of a polyline?
body: <p>Given a line made up of several points, how do I make the line smoother/ curvier/ softer through adding intermediate points -- while keeping the original points completely intact and unmoved?</p>
  
  <p>To illustrate, I want to go from the above to the below in this illustration:</p>
  
  <p><img src="https://i.stack.imgur.com/lTCOr.png" alt="enter image description here"></p>
  
  <p>Note how in the above picture, if we start at the bottom there will be a sharper right turn. In the bottom image however, this sharp right turn is made a bit "softer" by adding an intermediate point which is positioned in the middle of the two points, and using averages of the angles of the other lines. (Differently put, imagine the lines a race car would drive, as it couldn't abruptly change direction.) Note how, however, none of the original points was "touched", I just added more points.</p>
  
  <p>Thanks!! For what it's worth, I'm implementing this using JavaScript and Canvas.</p>