I am trying to create a gif of a growing line, which changes direction. I drew the line using the path tool, so I need a way to animate drawing process of a Beziér curve. Essentially I need to create a similar animation to the the following one (just the red line and the black dot, however the black dot is optional):
In Photoshop, you have to do this the (somewhat) old-fashioned way, frame by frame, if you want to have the line animate in a mathematically precise way. That means extending the line piece by piece making it slightly longer in each frame, using the grid as a guide.
If all you need is a "reveal" of the line and you don't need mathematical precision, then you can draw the line, mask it out, and animate the mask. This allows you to take advantage of tweening and easing equations so you have good control over the animation.