use requestAnimationFrame and split draw_line