how to draw a triangle in javascript