Libraries for simulating line drawing

I guess it is possible but then you would lose programmatic control of the animation (i.e. start, stop, loop, go fast, go slow, go backwards etc).

BTW, there are many easier ways to make this kind of animation off-line if you just want to pre-record it and play it back like a video.