Refactor triangle drawing to drawTriangle()