title: How does inkscape calculate the coordinates for control points for "smooth edges"?
body: <p>I am wondering what algorithm (or formula) Inkscape uses to calculate the <em>control points</em> if the nodes on a path are made "smooth".</p>
  
  <p>That is, if I have a path with five nodes whose <code>d</code> attribute is</p>
  
  <pre><code>M 115.85065,503.57451
    49.653441,399.52543 
    604.56143,683.48319 
    339.41126,615.97628 
    264.65997,729.11336
  </code></pre>
  
  <p>And I change the nodes to smooth, the <code>d</code> attribute is changed to</p>
  
  <pre><code>M 115.85065,503.57451 
  C                     115.85065,503.57451 24.747417,422.50451
    49.653441,399.52543 192.62243,267.61777 640.56491,558.55577
    604.56143,683.48319 580.13686,768.23328 421.64047,584.07809
    339.41126,615.97628 297.27039,632.32348 264.65997,729.11336
    264.65997,729.11336
  </code></pre>
  
  <p>Obviously, Inkscape calculates the control point coordinates (second last and last coordinate pair on lines on or after <code>C</code>). I am interested in the algorithm Inkscape uses for it.</p>