submission by jtoy for pyramids (View the other submissions)
function setup(){
  var myCanvas = createCanvas(800,800); //you must keep this line unmodified
}

function draw() {
  background(0,5)
  for(i=0;i<10;i++){
    push()
    translate(width/2*i*0.1,height/2*i*0.1)
    fill(random(255),random(255),random(255))
   triangle(-20,0,0,-20,20,0)
    pop()
  }
}