triangular recursions over HTML5 canvas to create shapes and patterns using Javascript