createTorus = function(u, v){
      var theta = 2 * Math.PI * u;
      var phi = 2 * Math.PI * v;
      var x = (radius + tubeRadius * Math.cos(phi)) * Math.cos(theta);
      var y = (radius + tubeRadius * Math.cos(phi)) * Math.sin(theta);
      var z = tubeRadius * Math.sin(phi);
      return new p5.Vector(x, y, z);
    }
draw a box with given widht, height and depth
@param  {Number} width  width of the box
@param  {Number} height height of the box
@param  {Number} depth  depth of the box
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);
  box(100, 100, 100);
  pop();
  theta += 0.05;
</code>
</div>