title: Plot convex hull given by quickhull algorithm in R (convhulln function)
body: <p>I need to plot the convex hull given by quickhull algorithm in R. Here is an example.</p>
  
  <pre><code>library(geometry)
  x1 &lt;- rnorm(100, 0.8, 0.3)
  y1 &lt;- rnorm(100, 0.8, 0.3)
  ConVexHull&lt;-convhulln(cbind(x1,y1),"FA")
  </code></pre>
  
  <p>ConVexHull$hull gives a m-by-dimension index matrix of which each row defines a
  dim-dimensional “triangle”.</p>
  
  <p>I know how to plot using chull function but I am not sure if chull gives the same hull as given by convhulln</p>
  
  <pre><code>  Plot_ConvexHull&lt;-function(xcoord, ycoord, lcolor){
    hpts &lt;- chull(x = xcoord, y = ycoord)
    hpts &lt;- c(hpts, hpts[1])
    lines(xcoord[hpts], ycoord[hpts], col = lcolor)
  } 
  xrange &lt;- range(c(x1))
  yrange &lt;- range(c(y1))
  par(tck = 0.02, mgp = c(1.7, 0.3, 0))
  plot(x1, y1, type = "p", pch = 1, col = "black", xlim = c(xrange), ylim =    c(yrange))
  Plot_ConvexHull(xcoord = x1, ycoord = y1, lcolor = "black")
  </code></pre>