createTop = function(u, v){
      var theta = 2 * Math.PI * u;
      var x = radius * Math.sin(-theta);
      var y = height;
      var z = radius * Math.cos(theta);
      if(v === 0){
        return new p5.Vector(0, height, 0);
      }
      else{
        return new p5.Vector(x, y, z);
      }
    }
draw a cone with given radius and height
@param  {Number} radius            radius of the bottom surface
@param  {Number} height            height of the cone
@param  {Number} detailX(optional) number of vertices on horizontal surface
@param  {Number} detailY(optional) number of vertices on vertical surface
example
<div class="norender">
<code>
function setup(){
  createCanvas(windowWidth, windowHeight, 'webgl');
}

var theta = 0;

function draw(){
  background(255, 255, 255, 255);
  translate(0, 0, -100);
  push();
  rotateZ(theta);
  rotateX(theta);
  rotateY(theta);
  cone(100, 200);
  pop();
  theta += 0.05;
</code>
</div>