draw triangles dynamically