title: Draw a pie chart by percentage
body: <p>How can I draw a pie chart by percentage with ImageMagick?</p>
  
  <p>For example: if have a value like 45 given as percentage -- how do I draw a pie chart with just 45% with Ruby or bash command?</p>
  
  <p>If I use ImageMagick's <code>draw</code> operator, how do the arc values need to be set? Or how can I calculate the acr values from an integer value?</p>
  
  <p>E.G.:</p>
  
  <pre><code>convert -size 100x100 xc:none -fill white -stroke black/
  -draw "path 'M 30,40   A 1,1  0  0,0 70,20 ....  ??
  </code></pre>
  
  <p>I tried to read and understand the examples, but the arc calculation is a mystery for me.</p>