title: Draw the arc of a circle in R
body: <p>Is there a bug in the grid.curve function? For the life of me I can't get it to draw an arc of a circle. Is there a fix for this?</p>
  
  <pre><code>library(grid)
  
  plot.new()
  #main viewport
  vp=viewport(x=0.5,y=0.5,width=1, height=1)
  pushViewport(vp)
  
  #Circle
  grid.circle(x=0.5, y=0.5, r=0.4,default.units="npc")
  
  #Coordinates for gene
  glength=100000
  start=0
  startrad=(start/glength)*2*pi
  end=20000
  endrad=(end/glength)*2*pi
  length=end-start
  
  xco1=0.5+0.4*cos(startrad)
  yco1=0.5+0.4*sin(startrad)
  xco2=0.5+0.4*cos(endrad)
  yco2=0.5+0.4*sin(endrad)
  
  
  grid.curve(xco1,yco1,xco2,yco2,curvature=arcCurvature((length/glength)*360),ncp=10,gp=gpar(col="blue",lwd=10,lineend=2))
  </code></pre>